Open ShadowSZ72 opened 11 months ago
A temporary fix is:
diff --git a/nb-dt-import.py b/nb-dt-import.py
index 8255528..5b32d4a 100755
--- a/nb-dt-import.py
+++ b/nb-dt-import.py
@@ -29,7 +29,7 @@ def main():
files, vendors = settings.dtl_repo.get_devices(
f'{settings.dtl_repo.repo_path}/module-types/', args.vendors)
settings.handle.log(f'{len(vendors)} Module Vendors Found')
- module_types = settings.dtl_repo.parse_files(files, slugs=args.slugs)
+ module_types = settings.dtl_repo.parse_files(files, slugs='')
settings.handle.log(f'{len(module_types)} Module-Types Found')
netbox.create_manufacturers(vendors)
netbox.create_module_types(module_types)`
The interesting thing is that if you give only vendor modules are imported without complaints. The issue ocurs only on slugs.
If you run the script with the argument model-type ./nb-dt-import.py --slugs cisco-ws-c2960-24tc-l
Then I will get an error:
I think it's because of "module-types". The files in it do not have the "slug" attribute.