Skip to main content

Zenoss API client module

Project description

Zenoss API Client

Tests badge Documentation Status Coverage Status PyPI - Version GitHub Release TestPyPI - Version

NOTE: This project is a fork of the excellent ZenossAPIClient by Zuora-TechOps and the fork contributed by boblickj.

-dan-smalley

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zenapiclient-1.2.0a0.tar.gz (33.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zenapiclient-1.2.0a0-py3-none-any.whl (39.5 kB view details)

Uploaded Python 3

File details

Details for the file zenapiclient-1.2.0a0.tar.gz.

File metadata

  • Download URL: zenapiclient-1.2.0a0.tar.gz
  • Upload date:
  • Size: 33.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for zenapiclient-1.2.0a0.tar.gz
Algorithm Hash digest
SHA256 a5904c3d0f9c82440d23dbf2b05d724443635e4e89e5cbbf93e94edbec610b79
MD5 1ded33a8b3f6b809187f5e66f3f578af
BLAKE2b-256 ebaa35e4bd52b667148467de8ee7e775e0d855e2ccbc7baef4cb14989381f6ff

See more details on using hashes here.

File details

Details for the file zenapiclient-1.2.0a0-py3-none-any.whl.

File metadata

  • Download URL: zenapiclient-1.2.0a0-py3-none-any.whl
  • Upload date:
  • Size: 39.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for zenapiclient-1.2.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 09dd2bc1076753b80448a5e1a7994b129308c989119b0d8cb66ec46db07aa814
MD5 a01a6eaf02b359b5b2bfc306ea0a2132
BLAKE2b-256 0013ee3e5667a21f30354a1bb28290967717d59879dd124604b4c111c0d6d31d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page