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.client 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='{:30} {:16} {}'
print(FORMAT.format('Device Name', 'IP Address', 'Vendor'))
for d in devices['devices']:
    print(FORMAT.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 and https://github.com/infobloxopen/infoblox-netmri/tree/master/examples/tutorial for examples.

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-3.7.0.0.tar.gz (9.2 MB view details)

Uploaded Source

Built Distribution

infoblox_netmri-3.7.0.0-py2.py3-none-any.whl (12.9 MB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: infoblox-netmri-3.7.0.0.tar.gz
  • Upload date:
  • Size: 9.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.6.7

File hashes

Hashes for infoblox-netmri-3.7.0.0.tar.gz
Algorithm Hash digest
SHA256 463affd12c49f2c913a18a0d63b0ff230d2f453b8c5e2693bf29908c69f1d0b1
MD5 f79a75f467420e433fb8bf779fa0246e
BLAKE2b-256 7d8be61665f69d2a6df3d3fb302b508e813d96e04da9d10f4597d29d4baeaa81

See more details on using hashes here.

File details

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

File metadata

  • Download URL: infoblox_netmri-3.7.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 12.9 MB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.6.7

File hashes

Hashes for infoblox_netmri-3.7.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7d3ece3ba365a74674399d2fe5596ae6b3a7071b7c810938f36d77f4f796e8ae
MD5 32d6b66e0624f7df6f57d6b75fe95f89
BLAKE2b-256 4c65f0d2becd837eef45bd6c1dc073d6599a277ee818e21b514c4468dc5141c0

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