Zenoss API client module
Project description
Zenoss API Client
Python module for interacting with the Zenoss API in an object-oriented way. Tested with Zenoss Cloud, no guarantees for earlier versions...
The philosophy here is to use objects to work with everything in the Zenoss API, and to try to normalize the various calls to the different routers.
Thus get
methods will always return an object, list
methods will return data.
All methods to add or create start with add
, all remove or delete start with delete
.
As much as possible the methods try to hide the idiosyncrasies of the JSON API, and to do the work for you, for example by letting you use a device name instead of having to provide the full device UID for every call.
Installing
pip install zenAPIClient
## Using
In [1]: from zenossapi import apiclient as zapi
In [2]: zenoss_client = zapi.Client(host=zenurl, collection_zone='cz0', api_key=zenApiKey)
In [3]: device_router = zenoss_client.get_router('device')
In [4]: device_class = device_router.get_device_class('Server/SSH/Linux')
In [5]: my_server = device_class.get_device('my.server.example.com')
In [6]: remodel_job = my_server.remodel()
In [7]: print(remodel_job)
9ba5c8d7-58de-4f18-96fe-d362841910d3
Supports the Zenoss JobsRouter, DeviceRouter, TemplateRouter, EventsRouter, PropertiesRouter, MonitorRouter, CMDBRouter, and DeviceManagementRouter.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file zenapiclient-1.0.3.tar.gz
.
File metadata
- Download URL: zenapiclient-1.0.3.tar.gz
- Upload date:
- Size: 33.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8762de13114923703613e6412742fe90bc229dc2ce44d41af4cef1775d89265 |
|
MD5 | af36ced59b0e4844c9f9f185d99f57ae |
|
BLAKE2b-256 | a92d3e8c51475d0c0e54aace0e220f14b03a173f14627cebca0a7164f7b9db60 |
File details
Details for the file zenAPIClient-1.0.3-py3-none-any.whl
.
File metadata
- Download URL: zenAPIClient-1.0.3-py3-none-any.whl
- Upload date:
- Size: 38.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0913e2065e3cdd2fdc8606b33acd47812a7ffed2099427249b8b30ba67013f5a |
|
MD5 | 4ec2ee5aef7778241c03d0560cdc5d37 |
|
BLAKE2b-256 | a4fc36cfeed1b2551057d041ba761d62453c54f9a227715345752f9eff732db0 |