Is there any way to outside the GUI to set all retired devices to active?
book
Article ID: 115988
calendar_today
Updated On:
Products
CA Infrastructure ManagementCA Performance Management - Usage and Administration
Issue/Introduction
Is there any way to outside the GUI to set all retired devices to active?
Environment
Release: Component: CAPRFC
Resolution
Here are the commands to set the devices to active. The first one gets all the Retired elements and puts them in a list. You will need to remove the fist line in the file /tmp/devices.txt it is a header. 1. mysql -unetqos -pnetqos netqosportal -e 'select itemid from t_device where LifeCycleState="Retired"';> /tmp/devices.txt 2. Edit /tmp/devices.txt to remove the first (header) line. 3. for ID in `cat /tmp/devices.txt`; do curl -v -X PUT -u admin:admin -H 'Content-type: acation/xml' http://<PC_SYSTEM>:8181/pc/center/webservice/devices/deviceItemId/$ID/lifeCycleState/Active; done