Paragon-neo/100G: Mixing REST and Compatibility Commands

The compatibility commands implemented for Paragon-neo/100G are largely intended to make it easy to re-use existing Paragon-X scripts. However, these compatibility commands do not support all the functionality available in your Paragon-neo/100G instrument.

The full functionality of your Paragon-neo/100G is exposed through the native RESTful interface using the calnexRest wrappers.

A useful feature is that compatibility and REST commands can be used in the same script. A simple Python example is shown below:

# ------------------------------------------------------------------------------ # Import the REST wrapper functions # It is assumed that the wrapper exists in the current folder import calnexRest as paragon_rest # ------------------------------------------------------------------------------ # Import the compatibility wrapper functions # It is assumed that the wrapper exists in the current folder import paragon as paragon_compatibility # Globals ---------------------------------------------------------------------- # The IP address of the instrument IP_ADDR = "192.168.207.15" # Initialise the REST wrapper paragon_rest.calnexInit(IP_ADDR) # Connect to the instrument using the compatibility command paragon_compatibility.connect("localhost", IP_ADDR) # Set the line rate / interface using the compatibility command paragon_compatibility.paragonset('Physical InterfaceExtended', "SFP28") # Enable FEC using the REST command paragon_rest.calnexSet("/physical/port/ethernet/Port1/sfp28?Fec=true") paragon_compatibility.disconnect()

Related pages