Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pydantic validation errors reported on import of Service and PowerOutletTemplate models #8

Closed
glennmatthews opened this issue Mar 5, 2021 · 2 comments · Fixed by #6
Assignees
Labels
bug Something isn't working

Comments

@glennmatthews
Copy link
Contributor

Environment

  • Python version: n/a
  • Nautobot version: 1.0.0b1
  • nautobot-netbox-importer version: 1.0.0

(Spun off from a comment on #5)

Expected Behavior

Successful import of data with no errors or warning messages.

Observed Behavior

I had this similar error pop up many time with services and PowerOutletTemplates.

services example log message:

21:25:37 Invalid data according to internal data model. This may be an issue with your source data or may reflect a bug in this plugin. action=load model=<class 'nautobot_netbox_importer.diffsync.models.ipam.Service'> model_data={'created': '2020-10-09', 'last_updated': '2020-10-09T12:48:45.670Z', 'custom_field_data': {}, 'device': {'site': {'name': 'Equinix WA1'}, 'tenant': {'name': 'MegaFon'}, 'name': 'Megafon_WA1_Perle', 'rack': {'group': None, 'name': '0206'}, 'position': None, 'face': '', 'vc_position': None, 'vc_priority': None, 'device_type': {'manufacturer': {'name': 'Perle'}, 'model': 'IOLAN SDS2'}, 'device_role': {'name': 'Console Server'}, 'platform': {'name': 'Linux'}, 'serial': '', 'asset_tag': None, 'cluster': None}, 'virtual_machine': None, 'name': 'Serial1', 'protocol': 'tcp', 'ports': '["10001"]', 'description': 'Console for re0', 'ipaddresses': [{'address': IPNetwork('123.456.789.123/32'), 'vrf': None, 'tenant': None, 'assigned_object_type': {'app_label': 'dcim', 'model': 'interface'}, 'assigned_object_id': {'device': {'site': {'name': 'Equinix WA1'}, 'tenant': {'name': 'MegaFon'}, 'name': 'Megafon_WA1_Perle', 'rack': {'group': None, 'name': '0206'}, 'position': None, 'face': '', 'vc_position': None, 'vc_priority': None, 'device_type': {'manufacturer': {'name': 'Perle'}, 'model': 'IOLAN SDS2'}, 'device_role': {'name': 'Console Server'}, 'platform': {'name': 'Linux'}, 'serial': '', 'asset_tag': None, 'cluster': None}, 'name': 'eth0'}}], 'pk': 4}
1 validation error for Service
ports
  value is not a valid list (type=type_error.list)

Not sure which value is supposed to be a valid list here..

PowerOutletTemplate example log message:

21:25:17 Invalid data according to internal data model. This may be an issue with your source data or may reflect a bug in this plugin. action=load model=<class 'nautobot_netbox_importer.diffsync.models.dcim.PowerOutletTemplate'> model_data={'device_type': {'manufacturer': {'name': 'Raritan'}, 'model': 'PX3-5497V'}, 'name': 'Outlet24', '_name': 'Outlet00000024', 'label': '', 'description': '', 'type': 'iec-60320-c19', 'power_port': {'device_type': {'manufacturer': {'name': 'Raritan'}, 'model': 'PX3-5497V'}, 'name': 'Inlet1'}, 'feed_leg': 'C', 'pk': 804}
1 validation error for PowerOutletTemplate
type
  instance of staticmethod expected (type=type_error.arbitrary_type; expected_arbitrary_type=staticmethod)

In this case I'm also not sure which value its complaining about unfortunately.

@ndom91
Copy link

ndom91 commented Mar 5, 2021

My environment in which these errors appeared is the following:

  • Python version: 3.8.5
  • Nautobot version: git branch develop @ 24d4ec371fb10c6ac0d686dc9578284c8e9cf04f
  • nautobot-netbox-importer version: git branch gfm-error-handler @ 29a1031

The Service mentioned in the error message looks like this in my Netbox instance:

image

And the PowerOutletTemplate referenced in this error message is from a device I've imported 1:1 from the devicetemplate-library, a Raritan/PX3-5497V.

@glennmatthews
Copy link
Contributor Author

Thank you for the additional details!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants