- Looking for a suggestion of the best way to implement a method to change the assigned Voice VLAN on a port. Here are the assumptions:
- - All switches are Catalyst switches, but of various models and IOS versions
- - The program will be written in Node.JS
- - know the switchport name, IP address of the switch, IP address and MAC Address of a currently connected endpoint to that switch port, and any credentials to the switch
- - know the Voice VLAN that we want to set on the port
- looked into APIC-EM as an option, but cannot find the Northbound APIs to make these kinds of changes.
- Looking for some opinions on whether to implement a SSH client in Node.JS, or possibly use SNMP. In addition, if there are any other ideas of other tools or methods to simplify the effort, it would be greatly appreciated.
APIC-EM does not expose a "VLAN" change API.
There are two other options:
1) If you have Prime Infrastructure, it will let you run command templates that would do this via a REST API.
2) You could use something like WSMA to talk to the switch as well. I wrote a little WSMA python library that shows you how this can be done. GitHub - aradford123/wsma_python: a python module and examples for using the Cisco WSMA protocol for device programabili…
If looking for Prime option See some code below on how that works with a template.
Some sample code here. .https://github.com/aradford123/cisco-prime-infrastructure-examples.git
auto_templates/configure_interface.py shows the API calls you can use. It is actually pretty simple.
Will add more info on the README