ExtremeSwitching (Other)

 View Only

 VSP-7400 OpenConfig

RedDirt's profile image
RedDirt posted 12-12-2021 12:07
After a discussion on Reddit about a script I wrote in Python to automate the uploading of a configuration to some VSP switches, it was suggested I come here and get some details on OpenConfig.

The problem I have encountered with such approaches is that they require network connectivity.  As I had mentioned in the Reddit post, I am pulling these switches out of the box, racking them, powering them up and dropping a configuration on them via console.

The manner in which OpenConfig was brought up lead me to think that it might be something available to tap into via the console.  Is this possible?  If so, what devices?  I have been working mainly with ERS 4900's and now VSP-7400-48y and VSP-7432CQ's.  

I had never heard of OpenConfig until now so I am basically starting from scratch.  Any help and direction would be greatly appreciated.
Ludovico Stevens's profile image
Ludovico Stevens
Hi, had a peek at your Reddit thread.
I'm not sure your approach of trying to automate via the serial port is the best. The serial interface is CLI and is quite hard to automate as the output is peppered with unexpected console messages, which renders prompt detection tricky. To answer your question, there is no RESTconf available from the serial port, the only thing available on the serial port is the CLI itself.
A better approach is to use ZTP+. All Extreme switches (EXOS, VOSS, ERS) support ZTP+. Basically a switch out of the box, with no config, will boot up, get an IP address via DHCP (either on OOB mgmt port or front inband ports; for VOSS the switch can even join an existing fabric and then do DHCP on a special "onboarding" ETREE L2VSN) + DNS servers. The switch then tries to reach extremecontrol.<domain-name> and that DNS record needs to point to XMC (now XIQ-SE).
You can then onboard the switch into XIQ-SE, which takes care of all of: upgrading the switch to whatever baseline firmware you've set for that switch type, setting the SNMP & SSH credentials to what they need to be, assigning a permanent mgmt IP, and then you can automatically trigger a Python script/workflow (note, these run on XIQ-SE itself) to take care of any further config or customization you need to apply to the switch (including using REST calls, which are now possible).