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

Cisco IOS: Issue parsing vlans on Catalyst C3750E, IOS version 15.2(4) #52

Closed
svestenik opened this issue Aug 9, 2023 · 2 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@svestenik
Copy link

Ingest script errors out while ingesting vlans:

An exception occurred: `ValidationError: 'name' is a required property

Failed validating 'required' in schema: {'properties': {'name': {'type': 'string'}, 'status': {'enum': ['active', 'reserved', 'deprecated'], 'type': 'string'}, 'vid': {'type': 'integer'}}, 'required': ['vid', 'name', 'status'], 'type': 'object'}

On instance: {'status': 'active', 'vid': 1}`

Traceback (most recent call last):
  File "/opt/netbox/netbox/extras/scripts.py", line 476, in _run_script
    script.output = script.run(data=data, commit=commit)
  File "/opt/netbox/netbox/scripts/NetDoc.py", line 290, in run
    log_ingest(log)
  File "/opt/netbox/venv/lib/python3.9/site-packages/netdoc/utils.py", line 504, in log_ingest
    module.ingest(log)
  File "/opt/netbox/venv/lib/python3.9/site-packages/netdoc/ingestors/netmiko_cisco_ios_show_vlan.py", line 26, in ingest
    vlan_o = vlan.create(**data)
  File "/opt/netbox/venv/lib/python3.9/site-packages/netdoc/schemas/vlan.py", line 52, in create
    validate(data, get_schema_create(), format_checker=FormatChecker())
  File "/opt/netbox/venv/lib/python3.9/site-packages/jsonschema/validators.py", line 934, in validate
    raise error
jsonschema.exceptions.ValidationError: 'name' is a required property

Failed validating 'required' in schema:
    {'properties': {'name': {'type': 'string'},
                    'status': {'enum': ['active', 'reserved', 'deprecated'],
                               'type': 'string'},
                    'vid': {'type': 'integer'}},
     'required': ['vid', 'name', 'status'],
     'type': 'object'}

On instance:
    {'status': 'active', 'vid': 1}

Raw log file attached:

13194.json.txt

@dainok
Copy link
Owner

dainok commented Aug 10, 2023

NTC templates are changing a lot: NTC team is normalizing fields. So until the situation is stable again, you can experiment issues.

#53 fixes many issues.
I suggest to use latest NetDoc and NTC templates from this morning.
Let me know if works better.

@dainok dainok self-assigned this Aug 10, 2023
@dainok dainok added the bug Something isn't working label Aug 10, 2023
@dainok
Copy link
Owner

dainok commented Aug 18, 2023

I reviewed all templates (except IOS and Comware), test 0.10.27.
Let me know if you still have issues.

@dainok dainok closed this as completed Aug 23, 2023
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

No branches or pull requests

2 participants