cisco-en-programmability / dnacentersdk

Cisco DNA Center Python SDK
https://dnacentersdk.readthedocs.io/en/latest/
MIT License
70 stars 33 forks source link

Need to be able to get full list of L2 and L3 VLANs from network device #47

Closed noziwatele closed 1 year ago

noziwatele commented 2 years ago

I would like to be able to retrieve a complete list of layer 2 VLANs configured on a network device. Currently the get_device_interface_vlans() function only returns VLAN interfaces.

Describe the solution you'd like get_device_interface_vlans() uses the api/v1/network-device/{{id}}/vlan endpoint. There is a v2 endpoint available on DNAC 2.2.3.4 (not sure about earlier versions) that returns all L2 and L3 VLANs configured on the device. Could get_device_interface_vlans() be updated, or a new get_device_vlans() method be created that uses the v2 endpoint?

I don't see the v2 endpoint in the current API documentation, but it works on our DNAC 2.2.3.4 system. Information was provided by Cisco.

Describe alternatives you've considered We can make the API call directly as a work-around.

zapodeanu commented 2 years ago

What is the v2 endpoint? If the API endpoint is not in API docs, it will not be part of the SDK.

bvargasre commented 1 year ago

@noziwatele Issue closed due to inactivity.