Skip to main content

A simple client for the Infoblox NetMRI RESTful API.

Project description

https://codecov.io/github/infobloxopen/infoblox-netmri/coverage.svg?branch=master https://img.shields.io/travis/infobloxopen/infoblox-netmri.svg https://img.shields.io/pypi/v/infoblox-netmri.svg

A simple client for the Infoblox NetMRI RESTful API.

Features

  • Enables execution of RESTful API calls on the NetMRI via Python.

  • HTTP and HTTPS

Installation

Install infoblox-netmri using pip:

pip install infoblox-netmri

Usage

It’s simple to use. Just create an InfobloxNetMRI object and then call the api_request method. Almost every API request will return a dictionary. It will contain the outputs documented in the online API documentation.

from infoblox_netmri import InfobloxNetMRI

c = InfobloxNetMRI(host="netmri",
                   username="admin",
                   password="password")

devices = c.api_request('devices/index', {'limit': 10})

Now, devices contains a dictionary of the API call outputs. In this case, it contains the standard keys returned by “list” style methods (index, search, find - see the docs): current, start, limit, and the plural form of the model, devices. This last is an array of dictionaries with the device details, while the others describe the “paging” information of the result. So, we really want to loop through devices['devices']:

FORMAT='%30s %16s %10s'
print FORMAT % ('Device Name', 'IP Address', 'Vendor')
for d in devices['devices']:
    print FORMAT % (d['DeviceName'], d['DeviceIPDotted'], d['DeviceVendor'])

NetMRI Documentation

To see documentation on the calls available, visit the page /api/docs on your NetMRI.

Please also see https://github.com/infobloxopen/netmri-toolkit for examples.

History

0.1.3 (2016-02-19)

  • Implement authentication caching

0.1.2 (2016-01-07)

  • Fix issue passing strings to show and delete methods

  • Add Python 3 compatibility

0.1.1 (2015-11-11)

  • Fix module naming issue

0.1.0 (2015-11-09)

  • First release on PyPI.

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

infoblox-netmri-0.1.3.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

infoblox_netmri-0.1.3-py2.py3-none-any.whl (6.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file infoblox-netmri-0.1.3.tar.gz.

File metadata

File hashes

Hashes for infoblox-netmri-0.1.3.tar.gz
Algorithm Hash digest
SHA256 9ebdd49c013d4e3a179a26c6ce418aecd69b5c756f6c22d251d886c1d13aa4bd
MD5 6716c94965a2bf8a7f51bebaba84dd05
BLAKE2b-256 07d677fc1e9c9e95260d7bda6bcd593945d3e02fa4ac5d44e36236023ffb07eb

See more details on using hashes here.

File details

Details for the file infoblox_netmri-0.1.3-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for infoblox_netmri-0.1.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2ad191d9c6506fa95f42196fe45dba97d3d9d3a133db7cd824fc4f9e101e46e4
MD5 dad7c19d5936495eafc16629bd8861da
BLAKE2b-256 e3cbea87592bee99a970716a67137002c8b8eebe84de8bf0b08cbabdbf0e7967

See more details on using hashes here.

Supported by

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