iamseth / python-zenoss

Python module to work the Zenoss API
Do What The F*ck You Want To Public License
22 stars 39 forks source link

Zenoss 5 Support? #13

Closed mpenning closed 7 years ago

mpenning commented 8 years ago

We have a functional Zenoss 5.1.5 installation... I have been trying to get even a basic device list out of this module, but it's not working at all...

from getpass import getpass
from zenoss import Zenoss

password = getpass('Zenoss password for mpenning: ')
zz = Zenoss('https://zenoss.mycompany.local/', 'mpenning', password,
    ssl_verify=False)
print zz.get_devices('/zport/dmd/Devices/Network/Switch/')

Running this with valid credentials returns nothing... I just get:

ValueError: No JSON object could be decoded

I know there were some REST API changes between Zenoss4 and Zenoss5... was this module only coded and tested against Zenoss4?

iamseth commented 8 years ago

was this module only coded and tested against Zenoss4?

Yes. I no longer use Zenoss for monitoring and do not have access to a 5.x installation for testing. Feel free to submit a PR to make this work for version 5.

tcaiazza commented 7 years ago

@mpenning The syntax should be zz.get_devices(device_class='/zport/dmd/Devices/Network/Switch/') . I've tested this on my zenoss 5 instance.

iamseth commented 7 years ago

This is no longer an actively maintained project. See README.