Skip to main content

Midonet API client library for Python applications

Project description

Midonet API client library for Python applications
==================================================
Overview and pre-requisites

This is the client library which can be used by Python applications to interact with MidoNet, network virtualization platform.
MidoNet provides scalable distributed network services for OpenStack. In order to use this client you must have MidoNet configured and running.

How to Install
--------------

Run the following command:

::

$ sudo python ./setup.py

Package dependencies
--------------------

Standard library
logging
json
urllib
base64
threading

External packages
webob
httplib2

Examples
--------

# Instantiate a client. Project ID is required when the API
# is integrated with Keystone.
client = MidonetClient('http://api_uri'', 'username', 'password',
project_id='project_id')

# Create a network
net_id = "174a9db3-94e8-416e-8e48-0eabadfdf664"
input = {"id": net_id,
"name": "tenant",
"tenant_id": "tenant_id",
"admin_state_up": True,
"router:external": False}
output = client.create_network(input)

# Create a subnet
subnet_id = "dc313de0-86ef-4aac-9781-5ad25232777a"
input = {"id": subnet_id,
"name": "tenant",
"tenant_id": "tenant_id",
"ip_version": 4,
"network_id": net_id,
"cidr": "10.0.0.0/24",
"gateway_ip": "10.0.0.1",
"enable_dhcp": True,
"shared": False}
output = client.create_subnet(input)

# Delete subnet
client.delete_subnet(subnet_id)

# Delete network
client.delete_network(net_id)

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

midonetclient-5.1.0.tar.gz (114.6 kB view details)

Uploaded Source

Built Distribution

midonetclient-5.1.0-py2.py3-none-any.whl (149.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file midonetclient-5.1.0.tar.gz.

File metadata

File hashes

Hashes for midonetclient-5.1.0.tar.gz
Algorithm Hash digest
SHA256 0554720cd1ff341c098510fb735d2c87a24012c546ae3ba915ca6fc54f5b2630
MD5 f246705256cd6531b1905cf7b581005a
BLAKE2b-256 88495f757be9cecf8c20c86ce426c79bf058ce6963aeda7adef9849239d7db39

See more details on using hashes here.

File details

Details for the file midonetclient-5.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for midonetclient-5.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1a9d837b6a8ffa9415b8d64f43bf41a9e8f8b367102b35f3b70241dd7740498d
MD5 f6544d382131f5b44821f938b21d018b
BLAKE2b-256 42a1579e343edcfecda24ca4feb9dd9d169682c2490f84aa03b13c766fcce5c3

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