Cisco Systems 4.1 Dust Collector User Manual


 
19-90
User Guide for Resource Manager Essentials 4.1
OL-11714-01
Chapter 19 CLI Utilities
CWCLI
Example 2: To delete devices listed in a file
The input file, deletedevice contains list of device Display Name separated by a comma:
-device 3750-stack,rtr1000,rtr10005
cwcli inventory deletedevice -u admin -p admin -input deletedevice.csv
Example 3: To delete devices using cwcli get request
The password that you enter here must be in base64 encoded. In this example, YWRtaW4= is the base64
encoded password for admin.
Enter the following in your browser:
http://ciscowork_servername:1741/rme/cwcli?command=cwcli inventory deletedevice -u
admin -p YWRtaW4= -device 10.10.10.41,10.10.10.51
The output for this appears on your console:
<!-- Processing Starts -->
<cwcli> INFO - Total number of devices deleted successfully: 2
SUMMARY
========
Successful: Delete Device: Success
<!-- Processing complete -->
Example 4: To delete devices using cwcli post request
The password that you enter here must be in base64 encoded. In this example, YWRtaW4= is the base64
encoded password for admin.
The payload file, deletedevicestate.xml contains:
<payload>
<command>
cwcli inventory deletedevice -u admin -p YWRtaW4= -device
10.77.9.10,10.77.9.18,10.76.8.6
</command>
</payload>
At the command prompt enter:
perl samplepost.pl http://doclab2:1741/rme/cwcli deletedevice.xml
To invoke the servlet using a script, see the Sample Script to Invoke the Servlet.
<!-- Processing Starts -->
<cwcli> INFO - Total number of devices deleted successfully: 3
SUMMARY
========
Successful: Delete Device: Success
<!-- Processing complete -->