19-39
User Guide for Resource Manager Essentials 4.1
OL-11714-01
Chapter 19 CLI Utilities
CWCLI
</Task>
cwcli netconfig Remote Access
You can also perform the cwcli netconfig tasks using the servlet. You will have to upload a payload
XML file, which contains the cwcli netconfig command arguments and CiscoWorks user credentials.
You have to write your own script to invoke the servlet with a payload of this XML file and the servlet
returns the output either on the console or in the specified output file, if the credentials are correct and
arguments are valid.
The name of the servlet is /rme/cwcli.
The following is the servlet to be invoked to execute any command:
For post request,
perl samplepost.pl http://rme-server:rme-port/rme/cwcli payload_XML_file
The default port for CiscoWorks server in HTTP mode is 1741.
If you have enabled SSL on CiscoWorks server, you can also use https protocol for secured connection.
perl samplepost.pl https://rme-server:rme-port/rme/cwcli payload_XML_file
The default port for CiscoWorks server in HTTPS mode is 443.
The schema for creating the payload file in XML format is:
<payload>
<command>
cwcli inventory commandname -u user -p BAse64 encoded pwd -args1 arg1value...
</command>
</payload>
To invoke the servlet using a script, see the Sample Script to Invoke the Servlet.
The script and the payload file should be residing in the client machine.
For get request,
http://<rme-server>:<rme-port>/rme/cwcli?command=cwcli netconfig commandname -u user -p
BAse64 encoded pwd -args1 arg1value...
The default port for CiscoWorks server in HTTP mode is 1741.
If you have enabled SSL on CiscoWorks server, you can also use https protocol for secured connection.
https://rme-server:rme-port/rme/cwcli?command=cwcli netconfig commandname -u user -p
BAse64 encoded pwd -args1 arg1value...
The default port for CiscoWorks server in HTTPS mode is 443.
The BAse64 encoded for “admin” is YWRtaW4=.
The URL encode for,
• Double quotes (“) is %22
• Percentage sign (%) is %25