dainok / netdoc

Automatic Network Documentation plugin for NetBox
GNU General Public License v3.0
91 stars 14 forks source link

Library directory removed/missing after upgrade #37

Closed Lurick73 closed 1 year ago

Lurick73 commented 1 year ago

After upgrading netdoc the library directory keeps getting removed and I need to add it back manually. Should it not be downloaded and extracted with the installer?

An exception occurred: FileNotFoundError: [Errno 2] No such file or directory: '/opt/netbox/venv/lib/python3.10/site-packages/netdoc/library/Cisco.yml'

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.10/site-packages/netdoc/utils.py", line 384, in log_ingest
    module.ingest(log)
  File "/opt/netbox/venv/lib/python3.10/site-packages/netdoc/ingestors/netmiko_cisco_nxos_show_inventory.py", line 30, in ingest
    device.update(
  File "/opt/netbox/venv/lib/python3.10/site-packages/netdoc/schemas/device.py", line 119, in update
    model_o = create_manufacturer_and_model(
  File "/opt/netbox/venv/lib/python3.10/site-packages/netdoc/schemas/device.py", line 168, in create_manufacturer_and_model
    netbox_model = utils.find_model(
  File "/opt/netbox/venv/lib/python3.10/site-packages/netdoc/utils.py", line 326, in find_model
    with open(library_file, "r", encoding="utf-8") as vendor_fh:
FileNotFoundError: [Errno 2] No such file or directory: '/opt/netbox/venv/lib/python3.10/site-packages/netdoc/library/Cisco.yml'
cat /opt/netbox/venv/lib/python3.10/site-packages/netdoc/
api/                 ingestors/           navigation.py        schemas/             tables.py            tests/               views.py             
discoverers/         __init__.py          nornir_inventory.py  scripts/             tasks.py             topologies.py        
filtersets.py        migrations/          __pycache__/         search.py            templates/           urls.py              
forms.py             models.py            reports/             static/              templatetags/        utils.py 

As you can see the entire directory is missing.

dainok commented 1 year ago

This is curious, the CI/CD process didn't changed. I forced the inclusion in the manifest (https://github.com/dainok/netdoc/pull/38)

dainok commented 1 year ago

Let me know if it works

Lurick73 commented 1 year ago

Yes, that appears to have fixed it!