PDA

View Full Version : Device Name Change API



aligzaidi
January 13 2010, 08:20 AM
Hi,

I need to change device name for more than hundred devices, first i thought to provision these devices with new name then remove old devices, but that way i will lose all previous device history, so i jumped into DeGuide-48.pdf.

I was reading Traverse-DeGuide-48.pdf and found following....

Device.update
Update configuration information for one or more existing device(s).
If deviceSerial and deviceName are both given, then the device
name will be updated

i tried couple of API commands to see if this really works.....

device.list "deviceName=MyTestServer"

"serialNumber=1771606", "deviceName=MyTestServer"
I noticed device.list print out serialNumber,deviceName,.... and bunch of other information.

Now for example i want to change the name for "MyTestServer" with "MyTestServer500" and i issue following command...

device.update "serialNumber=1771606" "deviceName=MyTestServer500"
ERR 414 Parameter name 'serialnumber' invalid.

"ERR 414" serialnumber is invalid, I'm think this serial number is correct that i got from "device.list"

Am i using a wrong syntax..... please help....

AGZ....

rajib
January 13 2010, 12:37 PM
You are on the right path with "device.update" command - just need to change the "serialNumber" parameter to "deviceSerial" like this:



device.update "deviceSerial=1771606" "deviceName=MyTestServer500"


and then device name should be changed as intended.

aligzaidi
January 15 2010, 11:42 AM
You are on the right path with "device.update" command - just need to change the "serialNumber" parameter to "deviceSerial" like this:



device.update "deviceSerial=1771606" "deviceName=MyTestServer500"


and then device name should be changed as intended.
Thanks Rajib,.... i had to add one more field to make it work.

device.update "deviceSerial=1771606" "deviceName=MyTestServer500", "address=192.168.10.50"