![]() |
![]() |
Subject: | Zenoss API - Setting icon on multiple devices - Need help |
Author: | [Not Specified] |
Posted: | 2016-02-22 18:11 |
I'm currently using Zenoss Core 4.2.5 and have run into a bit of a roadblock with attempting to change the icon displayed for each device via the Zenoss API.
I am attempting to change it via the following command:
zenoss_api device_router DeviceRouter setInfo '{"uid":"/zport/dmd/Devices/Network/Switch/devices/10.0.0.250","icon":"/zport/dmd/img/icons/cisco.png"}'And this is the error I receive:
{"uuid": "c2bb7b72-2596-40ef-a24a-5de957b6a9e7", "action": "DeviceRouter", "result": {"msg": "AttributeError: can't set attribute", "type": "exception", "success": false}, "tid": 1, "type": "rpc", "method": "setInfo"}Executing a similar command on a different key works.
Example:
zenoss_api device_router DeviceRouter setInfo '{"uid":"/zport/dmd/Devices/Network/Switch/devices/10.0.0.250","comments": "blah"}'{"uuid": "fb968550-c3b6-4209-9a65-384531acb650", "action": "DeviceRouter", "result": {"success": true}, "tid": 1, "type": "rpc", "method": "setInfo"}Any glaring issue that anybody can see I can confirm that the Zenoss user I'm using via the API is the same as the one I am using in the GUI, and am able to manually change the icon there without issue.
Subject: | Figured out where to mass |
Author: | [Not Specified] |
Posted: | 2016-02-23 10:58 |
Figured out where to mass change the icon by device tree in the GUI. Still couldn't figure out the API though.
< |
Previous Data Source Command in Core 5 |
Next Problem Reading Command Data Source |
> |