Skip to content
Zenoss API client for python
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
.travis.yml
LICENSE
MANIFEST.in
README.md
requirements.txt
setup.cfg
setup.py
zenoss_client.py

README.md

python-zenoss-client

PyPI version Build Status

Zenoss API client for python

Installation

pip install python-zenoss-client

Usage

  • Connect
from zenoss_client import ZenossClient

api = ZenossClient(host="localhost", user="zenuser", passwd="*****")
  • API call: The long way
endpoint = api.endpoint('device_router')
action = endpoint.action('DeviceRouter')
method = action.method('getDevices')

method(params={'name': 'testdevice'})
  • API call: The sorter way
api.endpoint('device_router').action('DeviceRouter').method('getDevices')(params={'name': 'testdevice'})
  • API call: The sortest way
api.device_router.DeviceRouter.getDevices(params={'name': 'testdevice'})
  • With timeout
api.device_router.DeviceRouter.getDevices(params={'name': 'testdevice'}, timeout=10)

Documentation

This module is inspired by json_api.sh SHELL script published on zenoss official wiki

For full documentation of zenoss API, kindly refer to the link below:

zenoss official documentation

  • Conventional naming of routers
Products.Zuul.routers.device -> device_router
Products.Zuul.routers.users -> users_router
Products.Zuul.routers.triggers -> triggers_router
You can’t perform that action at this time.