netbox-cisco-support icon indicating copy to clipboard operation
netbox-cisco-support copied to clipboard

Netbox 3.5 Support

Open arcticash opened this issue 1 year ago • 3 comments

Expanding on issue #13 this plugin is no longer working with Netbox v3.5.x

The Cisco API endpoint itself also seems to be throwing some errors (#14) so may need extensive work to get working again.

Has this plugin been abandoned?

arcticash avatar Jun 20 '23 10:06 arcticash

Cisco made some changes to the urls used. See https://apiconsole.cisco.com/docs/read/overview/Migrating_Applications. Most notably was the change from https://api.cisco.com to https://apix.cisco.com.

Lon1 avatar Jun 20 '23 12:06 Lon1

Two changes are needed at least in the sync_eox_data script:

Update following line:

token_url = "https://id.cisco.com/oauth2/default/v1/token"

Update the 'url' line to have a fqdn of 'apix.cisco.com' instead of 'api.cisco.com'. Eg something like:

url = 'https://apix.cisco.com/........

Currently working through a fixup of these scripts. WIll post a PR against this repo hopefully in the next week.

uck9 avatar Jul 16 '23 12:07 uck9

Hi, I have made these changes but I still get errors.

netbox]$ python3 manage.py sync_eox_data Found manufacturer "Cisco" Found device type "1841" WITHOUT Part Number - SKIPPING Found device type "3925" WITHOUT Part Number - SKIPPING Found device type "891F" WITHOUT Part Number - SKIPPING Found device type "892FSP" WITHOUT Part Number - SKIPPING Found device type "AIR-AP1131AG-E-K9" WITHOUT Part Number - SKIPPING Found device type "AIR-AP1562E-E-K9" WITHOUT Part Number - SKIPPING Found device type "AIR-AP1562I-E-K9" WITHOUT Part Number - SKIPPING Found device type "AIR-AP1832I-E-K9" WITHOUT Part Number - SKIPPING Found device type "AIR-AP1852E-E-K9" WITHOUT Part Number - SKIPPING Found device type "AIR-AP1852I-E-K9" WITHOUT Part Number - SKIPPING Found device type "AIR-AP1852I-H-K9" WITHOUT Part Number - SKIPPING Found device type "AIR-CAP1702I-E-K9" WITHOUT Part Number - SKIPPING Found device type "AIR-CT2504-K9" WITHOUT Part Number - SKIPPING Found device type "AIR-CT3504-K9" WITHOUT Part Number - SKIPPING Found device type "C2960X-48LPD-L" WITHOUT Part Number - SKIPPING Found device type "C800 - C886VAJ-K9" WITHOUT Part Number - SKIPPING Found device type "C9200L-24P-4G-E" WITHOUT Part Number - SKIPPING Found device type "C9200L-24T-4X" with Part Number "C9200L-24T-4X" Found device type "C9200L-48P-4G" WITHOUT Part Number - SKIPPING Found device type "C9300-24S" WITHOUT Part Number - SKIPPING Found device type "C9300-24S-E" WITHOUT Part Number - SKIPPING Found device type "C9300-48P-E" WITHOUT Part Number - SKIPPING Found device type "C9800-CL" WITHOUT Part Number - SKIPPING Found device type "ISR4321" WITHOUT Part Number - SKIPPING Found device type "ISR4331/K9" WITHOUT Part Number - SKIPPING Found device type "ISR4331-V/K9-RF" WITHOUT Part Number - SKIPPING Found device type "VG310" WITHOUT Part Number - SKIPPING Found device type "VG320" WITHOUT Part Number - SKIPPING Found device type "WS-C2960-24TC-L" WITHOUT Part Number - SKIPPING Found device type "WS-C2960-48PST-L" WITHOUT Part Number - SKIPPING Found device type "WS-C2960C-8TC-L" WITHOUT Part Number - SKIPPING Found device type "WS-C2960CX-8PC-L" WITHOUT Part Number - SKIPPING Found device type "WS-C2960S-24TS-S" WITHOUT Part Number - SKIPPING Found device type "WS-C2960S-48LPS-L" WITHOUT Part Number - SKIPPING Found device type "WS-C2960S-48TD-L" WITHOUT Part Number - SKIPPING Found device type "WS-C2960S-F24PS-L" WITHOUT Part Number - SKIPPING Found device type "WS-C2960X-24PD-L" WITHOUT Part Number - SKIPPING Found device type "WS-C2960X-24PS-L" WITHOUT Part Number - SKIPPING Found device type "WS-C2960X-24TD-L" WITHOUT Part Number - SKIPPING Found device type "WS-C2960X-24TS-L" WITHOUT Part Number - SKIPPING Found device type "WS-C2960X-24TS-LL" WITHOUT Part Number - SKIPPING Found device type "WS-C2960X-48FPS-L" WITHOUT Part Number - SKIPPING Found device type "WS-C2960X-48LPS-L" WITHOUT Part Number - SKIPPING Found device type "WS-C2960X-48TD-L" WITHOUT Part Number - SKIPPING Found device type "WS-C2960X-48TS-L" WITHOUT Part Number - SKIPPING Found device type "WS-C3560-24PS-S" WITHOUT Part Number - SKIPPING Found device type "WS-C3560-24TS" WITHOUT Part Number - SKIPPING Found device type "WS-C3560CX-12PC-S" WITHOUT Part Number - SKIPPING Found device type "WS-C4500X-32SFP+" WITHOUT Part Number - SKIPPING Found device type "WS-C4506-E" WITHOUT Part Number - SKIPPING Gathering data for these PIDs: C9200L-24T-4X Call https://apix.cisco.com/supporttools/eox/rest/5/EOXByProductID/1/C9200L-24T-4X?responseencoding=json Traceback (most recent call last): File "manage.py", line 10, in execute_from_command_line(sys.argv) File "/usr/local/lib/python3.8/site-packages/django/core/management/init.py", line 446, in execute_from_command_line utility.execute() File "/usr/local/lib/python3.8/site-packages/django/core/management/init.py", line 440, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 402, in run_from_argv self.execute(*args, **cmd_options) File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 448, in execute output = self.handle(*args, **options) File "/usr/local/lib/python3.8/site-packages/netbox_cisco_support/management/commands/sync_eox_data.py", line 312, in handle data = json.loads(api_call_response.text) File "/usr/local/lib/python3.8/json/init.py", line 357, in loads return _default_decoder.decode(s) File "/usr/local/lib/python3.8/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/local/lib/python3.8/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

tmp06276512 avatar Nov 19 '23 16:11 tmp06276512