How to Use the Microservice Order Stack Management API

Overview

When using the microservice console to configure a device, the user is actually stacking order and the actual configuration will be built and pushed once he clicks on the button "apply conf".

This allow the user to do all the configuration he needs before triggering the change on the device.

The stack management used by the Microservice GUI is also available via the MSA SOAP API (REST API are not yet available)

The SOAP webservice endpoint is available at http://MSA_IP/webapi/OrderStackManagement?wsdl

The SOAP API wrapping scripts are available at /opt/ubi-jentreprise/bin/api/orderstackmanagement/

How to use the API

use case: do route management on a FW

initial state: no route on the device:

Objects_Stack_Management_route_1.png

use the WS to add a route: SOAP request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.ubiqube.com">
   <soapenv:Header/>
   <soapenv:Body>
      <ws:pushOrderCommand>
         <deviceId>338</deviceId>
         <commandName>CREATE</commandName>
         <objectParameters>{"routing":{"1":{"subnet":"10.20.50.0","comment":"","interface":"port1","object_id":"1","gateway":"10.20.50.254","mask":"255.255.255.0"}}}</objectParameters>
      </ws:pushOrderCommand>
   </soapenv:Body>
</soapenv:Envelope>
 

returns the stack position ID for this order

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
   <env:Header/>
   <env:Body>
      <ns2:pushOrderCommandResponse xmlns:ns2="http://ws.ubiqube.com">
         <return>1</return>
      </ns2:pushOrderCommandResponse>
   </env:Body>
</env:Envelope>

other order can be pushed and once all order are pushed, it is possible to go to the GUI to trigger the configuration with the button "Apply configuration":

Objects_Stack_Management_route_2.png

or with a SOAP call:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.ubiqube.com">
   <soapenv:Header/>
   <soapenv:Body>
      <ws:executeStack>
         <deviceId>338</deviceId>
      </ws:executeStack>
   </soapenv:Body>
</soapenv:Envelope>

and clean the stack

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.ubiqube.com">
   <soapenv:Header/>
   <soapenv:Body>
      <ws:clearStack>
         <deviceId>338</deviceId>
      </ws:clearStack>
   </soapenv:Body>
</soapenv:Envelope>

the GUI (after a browser refresh) should look like:

Objects_Stack_Management_route_3.png