mirror of
https://github.com/netbox-community/Device-Type-Library-Import.git
synced 2024-11-21 23:23:17 +01:00
Add more info to failed device_type creations (#81)
This commit is contained in:
parent
542a56a947
commit
e1e2d780bc
@ -89,7 +89,9 @@ class NetBox:
|
||||
self.handle.verbose_log(f'Device Type Created: {dt.manufacturer.name} - '
|
||||
+ f'{dt.model} - {dt.id}')
|
||||
except pynetbox.RequestError as e:
|
||||
self.handle.log(e.error)
|
||||
self.handle.log(f'Error {e.error} creating device type:'
|
||||
f' {device_type["manufacturer"]["name"]} {device_type["model"]}')
|
||||
continue
|
||||
|
||||
if "interfaces" in device_type:
|
||||
self.device_types.create_interfaces(device_type["interfaces"], dt.id)
|
||||
|
2
repo.py
2
repo.py
@ -75,7 +75,7 @@ class DTLRepo:
|
||||
vendor_dirs = os.listdir(base_path)
|
||||
|
||||
for folder in [vendor for vendor in vendor_dirs if not vendors or vendor.casefold() in vendors]:
|
||||
if folder.casefold() is not "testing":
|
||||
if folder.casefold() != "testing":
|
||||
discovered_vendors.append({'name': folder,
|
||||
'slug': self.slug_format(folder)})
|
||||
for extension in self.yaml_extensions:
|
||||
|
Loading…
Reference in New Issue
Block a user