Change a description of device interface with Python SDK/Module
Hi
I'm looking for a bit of guidance here. I would like to do the following;
- Get a list of devices so I can find a specific device
- Get the interfaces of that device
- Find a specific interface and change the interface description of that device. I also want to disable the feature "Allow Active Discovery to overwrite the description"
Any help, pointers appreciated. I just need some rough pointers to get me going in the right direction, thank you.
MrJ
Posted 4 years ago·Last reply 4 years ago
5 comments
MrJ
OP4 years agoThis is awesome, just what I needed. Thanks so much.
MrJ
OP4 years agoThis is great thank you. That is a great tip about the portal, thanks a lot.
LM User
·4 years agoOh, and this makes use of my personal SDK helper.
LM User
·4 years agoHere's how you would do it in the sdk, you'll need to provide the logic to sort through the data and find the one you want to update. Also, this only accounts for pagination on the device list. If your datasource count per device, or your instance count per datasource per device is higher than 1000, you would need to include pagination on those gets (you can use the same method i used on the get_device_list call).
Mike Moniz
·4 years agoI can't help with python SDK/module specifically myself but I can point out the underlining REST calls. Perhaps the module uses similar names:
One neat trick when working with the API, is that the portal itself uses the API (although some calls are undocumented or newer than we have access to). So if you open the web console in your browser (F12) and for example edit a interface description, you can see the actual call and parameters from the browser as a stepping stone.