netbox-community / Device-Type-Library-Import

This library is intended to assist with importing device and module types into NetBox from the NetBox Community DeviceType-Library
https://github.com/netbox-community/devicetype-library
MIT License
256 stars 77 forks source link

Import script issue #35

Closed blackbicbiro closed 1 year ago

blackbicbiro commented 2 years ago

Afternoon, Using the super admin account (default account during setup) to run . Every time i try to import either all off the device or just Cisco i get the following error. The effect of the script is that the user account becomes deactivated.

I have changed the MAX_PAGE_SIZE = 0 thinking it was an issue with the API requesting to much at once but it doesnt seem to have solved it. Anyone else seen this?

When checking Netbox it seems to have imported the manufacture and devices ok

Package devicetype-library is already installed, updating /home/met1/Netbox-Device-Type-Library-Import/repo
Pulled Repo https://github.com/netbox-community/devicetype-library.git
Vendor Specified, Gathering All Matching Device-Types
1 Vendors Found
400 Device-Types Found
Traceback (most recent call last):
  File "./nb-dt-import.py", line 432, in <module>
    main()
  File "./nb-dt-import.py", line 421, in main
    createManufacturers(vendors, nb)
  File "./nb-dt-import.py", line 76, in createManufacturers
    all_manufacturers = {str(item): item for item in nb.dcim.manufacturers.all()}
  File "/home/met1/Netbox-Device-Type-Library-Import/venv/lib/python3.8/site-packages/pynetbox/core/endpoint.py", line 101, in all
    return [self._response_loader(i) for i in req.get()]
  File "/home/met1/Netbox-Device-Type-Library-Import/venv/lib/python3.8/site-packages/pynetbox/core/query.py", line 300, in get
    return req_all()
  File "/home/met1/Netbox-Device-Type-Library-Import/venv/lib/python3.8/site-packages/pynetbox/core/query.py", line 279, in req_all
    req = self._make_call(add_params=add_params)
  File "/home/met1/Netbox-Device-Type-Library-Import/venv/lib/python3.8/site-packages/pynetbox/core/query.py", line 263, in _make_call
    raise RequestError(req)
pynetbox.core.query.RequestError: The request failed with code 403 Forbidden: {'detail': 'You do not have permission to perform this action.'}

Looks to be failing at Manufacture detail due to not having permision to do it. This could be just to do with the account already being getting to that point

Cheers Rob

danner26 commented 1 year ago

Hello @blackbicbiro, the NetBox Community will be taking over this repository. Due to the fact that this issue has been around for a very long time and we have updated the requirements within this repository as well as the new codebase for NetBox and DeviceType-Library, I am going to close it. Should you encounter any further issues, please feel free to contact us. Thank you!