opennms_client
==============
.. image:: https://travis-ci.org/mvillarejo/opennms_client.png?branch=master
:target: https://travis-ci.org/mvillarejo/opennms_client
.. image:: https://readthedocs.org/projects/opennms_client/badge/?version=latest
:target: http://opennms_client.readthedocs.org/en/latest/?badge=latest
opennms_client is a simple package to manage openNMS.
Usage
=====
.. code-block:: python
>>> import opennms_client
>>> c = opennms_client.OpenNMSClient("http://demo.opennms.org/opennms", "demo", "demo")
>>> print c
http://demo.opennms.org/opennms (demo) <Response [200]>
>>> len(c.get_nodes())
10
>>> len(c.get_nodes(limit=0))
56
>>> c.get_services()
{u'Amazon': 35,
u'BingSearch': 38,
u'DNS': 12,
u'Dell-OpenManage': 24,
u'FTP': 10,
u'GoogleSearch': 36,
...
>>> c.get_node("www.amazon.com")
{ ...
u'createTime': 1355967495052,
u'foreignId': u'1355756384535',
u'foreignSource': u'Minimal Detectors',
u'id': u'53',
u'label': u'www.amazon.com',
u'labelSource': u'U',
u'lastCapsdPoll': 1447528445225,
u'type': u'A'}
>>> c.get_node_ipinterfaces("www.amazon.com")
[{u'hostName': u'205.251.242.54',
u'id': u'66463',
u'ifIndex': None,
u'ipAddress': u'205.251.242.54',
u'isDown': False,
u'isManaged': u'M',
u'lastCapsdPoll': 1447528445225,
u'monitoredServiceCount': 1,
u'nodeId': 53,
u'snmpPrimary': u'P'}]
>>> In [21]: c.get_node_services("www.amazon.com")
[{u'applications': [],
u'down': False,
u'lastFail': None,
u'lastGood': None,
u'notify': None,
u'qualifier': None,
u'serviceType': {u'id': 35, u'name': u'Amazon'},
u'source': None,
u'status': u'N',
u'statusLong': u'Not Monitored'}]
>>> c.get_node_services_list("www.amazon.com")
[u'Amazon']
>>> c.set_node_service("www.amazon.com ", "ICMP")
<Response [200]>
>>> c.delete_node("www.amazon.com")
<Response [200]>
Requirements
============
.. code-block:: bash
pip install -r requirements.txt
Errors
======
You might experience some errors tyring ot build ssl support, try this before installing:
Mac
.. code-block:: bash
export LDFLAGS="-L$(brew --prefix openssl)/lib"
export CFLAGS="-I$(brew --prefix openssl)/include"
Linux
.. code-block:: bash
yum install gcc python-devel libffi-devel openssl-devel -y
Releases
========
Download pre-built releases on the [releases](https://github.com/mvillarejo/opennms_client/releases) page
Contributors
============
[Manuel Villarejo](https://github.com/mvillarejo) - Core Development
License
=======
MIT License
.. :changelog:
Changelog
---------
0.1 (2015-11-20)
++++++++++++++++
* client: version 0.1
0.1.1 (2015-11-20)
++++++++++++++++++
* client: added set_service(hostname, service_name)
0.2 (2015-11-24)
++++++++++++++++
* Package renamed from opennms-client.client to opennms_client.opennms_client
* Fixed installation of dependencies using pip
* readthedocs.org documentation integrated now: http://opennms-client.readthedocs.org/en/latest/
0.2.1 (2015-11-24)
++++++++++++++++++
* delete_node(hostname)
* get_node_services,_list()
* delete_node_service(hostname, service_name)
0.2.2 (2016-03-9)
+++++++++++++++++
* set_node_service now has a index argument to set the service under interface you want to
0.2.3 (2016-03-9)
+++++++++++++++++
* added instructions to avoid SSL errors in Mac and Linux
0.3 (2016-07-18)
+++++++++++++++++
* added alarms to the class
Metadata
Release files for opennms-client 0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| opennms_client-0.3.tar.gz | 8.5 kB | Without provenance | Details |
Release files / opennms_client-0.3.tar.gz
| Download URL | opennms_client-0.3.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0d80ff17627eee2ebb91d40203f265d2aadecc260ca5a7e378cfe12132f9e317
|
|
BLAKE2b-256 checksum How to use checksums |
fb09e85399abca97badbe80538911de1634264f3f22815f1cbc73d467109cad0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for opennms-client 0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.