What are my options for EXOS Network Management Automation

  • 0
  • 1
  • Question
  • Updated 2 days ago
  • Answered
Hello, my team has developed an automated system for testing my company's networked products. I am in the process of integrating this system with EXOS switches, so that our tests will be able to track which switch ports are connected to which Devices Under Test (DUTs), and provide an API (in python) to facilitate making runtime configuration changes to the switches and their individual ports. We are planning to use the Management port of all switches to provide a dedicated backdoor in case a test makes an error in the switch configuration.

Before I just go off and implement a solution based on the EXOS telnet command interface, I am looking to the community for advice on whether this is the "best" switch interface to use for this purpose, what the alternatives and pros and cons of each are.

I am only aware of the SNMP alternative. I have not considered it very seriously yet because we are using these switches for, among other things, AVB media transport and monitoring, and the last I checked, the MIB does not yet support AVB-related interfaces, e.g. MSRP/MVRP and stream status.

Thanks for your consideration,
Tim
Photo of Tim Black

Tim Black

  • 478 Points 250 badge 2x thumb

Posted 3 weeks ago

  • 0
  • 1
Photo of SH

SH

  • 4,792 Points 4k badge 2x thumb
Hello Tim,

If I understand you correct then you still only need the ability to configure the XOS switches.

As you point out correct you can use the CLI or SNMP.

In my opinion the CLI is the better way:

  • Your have a well formed documentation
  • Easy access to all settings
  • Read/Write ability
  • Feedback in case of an failure

With SNMP you can

  • write many values directly, but not all
  • Have the difficulty do find the correct values or setting
  • No feedback what's going wrong in case of an failure
  • No special documentation


Do you know XMC?

With the Management solution XMC from Extreme you can read out a lot of information's from the devices.
In combination with NAC even the mentioned information's like which device is on which port (IP, MAC, ...). Furthermore there is a script engine to use python scripts directly in management system.
You can trigger the scripts on different ways (manual, scheduled or within an workflow (e. consisting of different event, alarm or scripts).
There are a lot of variables which you can use directly for the communication with the switches. Therefore you have not to think about how the communications work 

In addition there is a GraphQL-API  to receive a lot of information's from the XOS devices (via the XMC management)
and a REST-API for receiving and writing data to XMC.

I know this is not comprehensive answer. But I am not sure if you knowing these different way to communicate directly and indirectly with XOS.

Additionally you have the ability to execute Python scripts directly on the XOS switches maybe this is useful for your need.

Best regards
Stephan

Photo of Grosjean, Stephane

Grosjean, Stephane, Employee

  • 13,516 Points 10k badge 2x thumb
In a "DevOps" mindset approach, restconf and jsonrpc are interesting, and jsonrpc is currently a more complete approach as you have all CLI accessible, by definition (as you send CLI commands). You have the json output of the CLI commands. Internally, I had made a demo-tool with a web front-end that allows to program groups of switches using Python from a linux host (OoB mgmt network preferred). Very easy and fast to do. Did it in Python, and if you are an experienced programmer with a large scale network, golang would be a better choice.

As for XMC, yes this is Extreme Management Center. With recent releases (8.1+) you have Python scripting integrated. That's nice if you have older switches that cannot upgrade to 21.1+ (for jsonrpc) or some other vendor switches. XMC would manage for you access to the devices, just handle in your code the type of platform (XMC provides variable for that too). With the coming 8.2 version, Workflows will be also provided in XMC. So you'll be able to have several scripts running with conditional gateways, alarm trigerring, etc.
(Edited)
Photo of Tim Black

Tim Black

  • 478 Points 250 badge 2x thumb
Thanks Stephane. So it sounds like I made a good decision to use JSONRPC for my automation-centric needs. So far it's working great, but in the extreme switch python package that I've provided for my team, I've so far only implemented control for "enable/disable port" and "enable/disable inline-power ports" so far. We will eventually also be needing to create vlans, and read statistics from the switch, but with the jsonrpc, it looks elegant and simple.

I'm curious about your internal work (the demo-tool you mention) to generalize the pushing configuration to switches via jsonrpc interface. How doess your demo tool model configuration changes? Are they represented by just a sequence of CLI commands? 

Right now, we are only toggling ports from our test automation, however we will shortly be needing to implement more complicated dynamic configuration changes, which will happen during the setup phase of a particular test suite. Is it appropriate in this case to model these as a simple sequence of CLI commands that get executed? Is there a "reset switch" command that you would you recommend we prepend to the command sequence to ensure the same starting point each time? 

We are using the OOB Mgmt port, BTW, to ensure we maintain connectivity during these operations.
Photo of Erik Auerswald

Erik Auerswald, Embassador

  • 13,636 Points 10k badge 2x thumb
To reset the switch to a base configuration, you can use the combination of "unconfigure switch all" (results in a reboot into an empty configuration) and a file named "default.xsf" (will be executed if a switch starts without config) that adds management port configuration and user credentials.
Photo of Grosjean, Stephane

Grosjean, Stephane, Employee

  • 13,516 Points 10k badge 2x thumb
The tool I made uses an home-made json-formatted task file, where I have several keys such as IP list, CLI commands with dynamic variables (increment/decrease values in the CLI command at each iteration when multiple IPs are processed - to change IP value, ASN, etc), option (for example, do I allow a downgrade, or what partition to use...).

So you create your own task files and run them with the tool (shell or web). The web front-end was also able to create the json task file.

The tool tries to find if an error occurred, but that's a tricky part, I need to parse the output. I think I also have an option to stop on an error, or not.
Photo of Tim Black

Tim Black

  • 478 Points 250 badge 2x thumb
Thanks, guys. Erik, I may try the "put desired config into default.xsf and then unconfigure switch all" approach, as this seems very elegant, concise yet extensible, and intuitive. My only concern is for the time this takes. We'll see.. thanks again.
(Edited)