跳转到主要内容

Python的Zenoss API客户端

项目描述

python-zenoss-client

PyPI version Build Status

Python的Zenoss API客户端

安装

pip install python-zenoss-client

使用

  • 连接
from zenoss_client import ZenossClient

api = ZenossClient(host="localhost", user="zenuser", passwd="*****")
  • API调用:长方法
endpoint = api.endpoint('device_router')
action = endpoint.action('DeviceRouter')
method = action.method('getDevices')

method(params={'name': 'testdevice'})
  • API调用:简短方法
api.endpoint('device_router').action('DeviceRouter').method('getDevices')(params={'name': 'testdevice'})
  • API调用:最短方法
api.device_router.DeviceRouter.getDevices(params={'name': 'testdevice'})
  • 带超时
api.device_router.DeviceRouter.getDevices(params={'name': 'testdevice'}, timeout=10)

文档

本模块受json_api.sh SHELL脚本启发,该脚本发布于Zenoss官方维基

有关Zenoss API的完整文档,请参阅以下链接

Zenoss官方文档

  • 路由器的传统命名
Products.Zuul.routers.device -> device_router
Products.Zuul.routers.users -> users_router
Products.Zuul.routers.triggers -> triggers_router

项目详情


下载文件

下载您平台的文件。如果您不确定选择哪一个,请了解有关 安装软件包 的更多信息。

源分布

python-zenoss-client-1.0.1.tar.gz (4.3 kB 查看哈希值)

上传时间

构建分布

python_zenoss_client-1.0.1-py3-none-any.whl (4.4 kB 查看哈希值)

上传时间 Python 3

支持