TECHZEN Zenoss User Community ARCHIVE  

Zenoss API 6.2 addDevice() return BUG?

Subject: Zenoss API 6.2 addDevice() return BUG?
Author: Rodrigo Moreira
Posted: 2018-11-02 10:24

Hello,
 
If you try to add a device (api: addDevice()) to a new deviceClass when that device is already registered in a different class, the device will not be moved to the new class.

Problem: The HTTP DirectResponse you will receive will have:
 - ['result']['success']: TRUE (it shouldn't since the device was not registered in the specified class)
 - ['result']['new_jobs']['description']:   "Create $(deviceName) under $(new deviceClass)"

So, despite not doing what is asked, zenoss will tell you that your operation succeded (the device was created in the desired device class), when in fact the device stays in the same class it was before.
    -> Possible solution (?): move the device to the new class or give a different response. 


Regards,

Rodrigo Moreira

------------------------------
Rodrigo Moreira
Instituto Superior Técnico
Lisbon
------------------------------

< Previous
ZenApiLib updates
  Next
Unable to get >1000 events from API query
>