WADL
URL
http://hostname:8888/opennaas/{resourcetype}/{resourcename}/queue?_wadl
Description
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://wadl.dev.java.net/2009/02" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<grammars>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified">
<xs:element name="modifyParams" type="modifyParams" />
<xs:element name="queueResponse" type="queueResponse" />
<xs:complexType name="modifyParams">
<xs:sequence>
<xs:element minOccurs="0" name="params" type="xs:anyType" />
<xs:element name="posAction" type="xs:int" />
<xs:element minOccurs="0" name="queueOper" type="operations" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="queueResponse">
<xs:sequence>
<xs:element minOccurs="0" name="prepareResponse" type="actionResponse" />
<xs:element minOccurs="0" name="confirmResponse" type="actionResponse" />
<xs:element minOccurs="0" name="restoreResponse" type="actionResponse" />
<xs:element minOccurs="0" name="refreshResponse" type="actionResponse" />
<xs:element maxOccurs="unbounded" minOccurs="0" name="responses" nillable="true" type="actionResponse" />
<xs:element minOccurs="0" name="user" type="xs:string" />
<xs:element name="totalTime" type="xs:long" />
<xs:element name="timestamp" type="xs:int" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="actionResponse">
<xs:sequence>
<xs:element minOccurs="0" name="actionID" type="xs:string" />
<xs:element minOccurs="0" name="information" type="xs:string" />
<xs:element maxOccurs="unbounded" minOccurs="0" name="responses" nillable="true" type="response" />
<xs:element minOccurs="0" name="result" type="xs:anyType" />
<xs:element minOccurs="0" name="status" type="status" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="response">
<xs:sequence>
<xs:element minOccurs="0" name="commandName" type="xs:string" />
<xs:element maxOccurs="unbounded" minOccurs="0" name="errors" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="information" type="xs:string" />
<xs:element minOccurs="0" name="sentMessage" type="xs:string" />
<xs:element minOccurs="0" name="status" type="ResponseStatus" />
</xs:sequence>
</xs:complexType>
<xs:simpleType name="operations">
<xs:restriction base="xs:string">
<xs:enumeration value="REMOVE" />
<xs:enumeration value="UP" />
<xs:enumeration value="DOWN" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ResponseStatus">
<xs:restriction base="xs:string">
<xs:enumeration value="OK" />
<xs:enumeration value="ERROR" />
<xs:enumeration value="WAIT" />
<xs:enumeration value="QUEUED" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="status">
<xs:restriction base="xs:string">
<xs:enumeration value="ERROR" />
<xs:enumeration value="OK" />
<xs:enumeration value="PENDING" />
</xs:restriction>
</xs:simpleType>
</xs:schema>
</grammars>
<resources base="http://localhost:8888/opennaas/router/myre/queue/">
<resource path="/">
<resource path="clear">
<method name="POST">
<response status="204" />
</method>
</resource>
<resource path="execute">
<method name="POST">
<response>
<representation mediaType="application/xml" />
</response>
</method>
</resource>
<resource path="getActionsId">
<method name="GET">
<response>
<representation mediaType="application/xml" />
</response>
</method>
</resource>
<resource path="modify">
<method name="POST">
<request>
<representation mediaType="application/xml" />
</request>
<response status="204" />
</method>
</resource>
</resource>
</resources>
</application>
Methods
Execute
Executes all actions the queue contains, providing rollback if some of them fail.
Response Example
Following message is the response of a queue execution, which queued actions were "createSuinterface" and "setIp" to this new interface.
<?xml version="1.0" encoding="UTF-8"?>
<queueResponse>
<prepareResponse>
<actionID>prepare</actionID>
<responses>
<commandName>DiscardNetconfCommand</commandName>
<sentMessage><rpc message-id="1">
<discard-changes/>
</rpc></sentMessage>
<status>OK</status>
</responses>
<responses>
<commandName>LockNetconfCommand</commandName>
<sentMessage><rpc message-id="2">
<lock>
<target>
<candidate/>
</target>
</lock>
</rpc></sentMessage>
<status>OK</status>
</responses>
<status>OK</status>
</prepareResponse>
<confirmResponse>
<actionID>confirm</actionID>
<responses>
<commandName>CommitNetconfCommand</commandName>
<sentMessage><rpc message-id="5">
<commit/>
</rpc></sentMessage>
<status>OK</status>
</responses>
<responses>
<commandName>UnlockNetconfCommand</commandName>
<sentMessage><rpc message-id="6">
<unlock>
<target>
<candidate/>
</target>
</unlock>
</rpc></sentMessage>
<status>OK</status>
</responses>
<status>OK</status>
</confirmResponse>
<restoreResponse>
<actionID>restore</actionID>
<status>PENDING</status>
</restoreResponse>
<refreshResponse>
<actionID>refresh</actionID>
<status>OK</status>
</refreshResponse>
<responses>
<actionID>configureSubInterface</actionID>
<responses>
<commandName>EditNetconfCommand</commandName>
<sentMessage><rpc message-id="3">
<edit-config>
<target>
<candidate/>
</target>
<config>
<configuration>
<interfaces>
<interface>
<name>gr-1/1/0</name>
<unit>
<name>18</name>
</unit>
</interface>
</interfaces>
</configuration>
</config>
</edit-config>
</rpc></sentMessage>
<status>OK</status>
</responses>
<status>OK</status>
</responses>
<responses>
<actionID>setIPv4</actionID>
<responses>
<commandName>EditNetconfCommand</commandName>
<sentMessage><rpc message-id="4">
<edit-config>
<target>
<candidate/>
</target>
<config>
<configuration>
<interfaces>
<interface>
<name>gr-1/1/0</name>
<unit>
<name>18</name>
<family>
<inet operation="replace">
<address>
<name>192.168.25.1/24</name>
</address>
</inet>
</family>
</unit>
</interface>
</interfaces>
</configuration>
</config>
</edit-config>
</rpc></sentMessage>
<status>OK</status>
</responses>
<status>OK</status>
</responses>
<totalTime>5484</totalTime>
<timestamp>0</timestamp>
</queueResponse>
GetActionsId
Returns the list of actions the queue contains.
Response Example
Here's an example of the respone of this method when configureSubinterface and setIPv4 are queued actions.
[configureSubInterface, setIPv4]
Clear
Removes all actions of the queue.
Modify
Used to modify the queue by removing the action allocated in a specific queue position.
Body Example
Following message would remove the first action of the queue.
<?xml version="1.0" encoding="UTF-8"?>
<modifyParams>
<posAction>0</posAction>
<queueOper>REMOVE</queueOper>
</modifyParams>