Cisco Cisco Security Manager 4.7 Guía Del Usuario

Descargar
Página de 290
 
 
 
  
 
Cisco Security Manager 4.7 API Specification (Version 2.0) 
 
OL- 32164-01 
Page  198
 
5.2.2 Method execDeviceReadOnlyCLICmds 
The execDeviceReadOnlyCLICmds method executes a set of commands against a list identified devices and returns 
the result of each command back to the CSM Client. This method will use the read-only credentials the CSM server 
has and therefore may not be used to execute any commands that require credentials beyond read-only for the 
device. This method is not implemented for IPS/IDS devices. 
 
The set of commands that can be executed by this method is read-only commands such as statistics, monitoring 
commands that provide additional information about the operation of the particular device. For example, a client 
application may invoke CLI commands to gather statistics from the device via this command. A CSM view_cli and 
view_device privilege is necessary to use this method. This method fetches configuration information for one device 
at a time. 
 
NOTE: If show command output has any W3C XML standard reserved symbols then the API response will encode 
any such special characters as per W3C standards. For example, the  “show version” output from a multi-context 
device can have output as <context>; then the response will appear with the named character reference as &lt; 
context>. For more details refer to http://www.w3.org/TR/REC-xml/#syntax 
 
5.2.2.1 Request 
An example of the method execDeviceReadOnlyCLICmds request is shown in the figure below.  The fields in these 
messages are described in the table below. 
 
Figure 156: Method execDeviceReadOnlyCLICmds Request Example  
URL: 
 
https://hostname/nbi/utilservice/execDeviceReadOnlyCLICmds 
  
HTTP Header: 
 
Set-Cookie: asCookie=732423sdfs73242; expires=Fri, 31-Dec-2010 23:59:59 GMT; path=/; 
domain=.hostdomain.com  
 
XML Argument: 
 
<?xml version=”1.0” encoding=”UTF-8”?> 
<execDeviceReadOnlyCLICmdsRequest> 
 
<protVersion>1.0</protVersion>  
 
<reqId>123</reqId> 
 
<deviceReadOnlyCLICmd> 
 
  <deviceIP>12.1.1.1</deviceIP> 
 
  <cmd>show</cmd> 
 
  <argument>run all</argument> 
 
  <execTimeout>5</execTimeout> 
 
</deviceReadOnlyCLICmd> 
 
 
</execDeviceReadOnlyCLICmdsRequest>