Service Manual

exec-command — to congure the exec commands on the system.
NOTE: Interactive CLIs (for example, clear counters, reload, and so on) are not supported via the REST API framework.
Also, the commands sent in XML payload are restricted to a maximum of 1000 characters length.
To execute REST-CLI on the device, the HTTP username and password needs the appropriate privilege. The REST-CLI request returns
HTTP/1.1 200 OK on a successful completion. All the other HTTP error codes are treated as failure. Multiple command tags are not
allowed inside the <input> tag.
The tree structure of the REST CLI is as follows:
module: dell
+--rw dell?
|
+--ro cli
+--ro input
| +--ro config-commands? string
| +--ro show-command? dell:show-cmd-str
| +--ro exec-command? dell:cli-cmd-str
+--ro output
+--ro command string
Samples of the cong-command
Following is the sample output of CONFIG command:
To congure an IP address:
Input.xml:
<input>
<config-commands>
interface vlan 100\r\n
ip address 1.2.3.4/24
</config-commands>
</input>
curl -u demo:demo -X POST -T Input.xml http://<IP>:8008
/api/running/dell/
_operations/cli
<output xmlns='http://www.dell.com/ns/dell:0.1/root'>
<command>conf
Dell(conf)#interface vlan 100
Dell(conf-if-vl-100)#ip address 1.2.3.4/24
Dell(conf-if-vl-100)#end
To congure MTU:
Input.xml
<input>
<config-commands>
interface vlan 100\r\n
mtu 10000
</config-commands>
</input>
curl -u demo:demo -X POST -T Input.xml http://<IP>:8008
/api/running/dell/
_operations/cli
<output xmlns='http://www.dell.com/ns/dell:0.1/root'>
<command>conf
Dell(conf)#interface vlan 100
Dell(conf-if-vl-100)#mtu 10000
Dell(conf-if-vl-100)#end
REST API
183