Skip to main content

A API abstraction package for NSX-T 3.0 and greater

Project description

NSXEZ

NSXEZ is a Python library to remotely manage/automate NSX-T platforms. The user is NOT required to be a Software Programmer, or have sophisticated knowledge of NSX-T environments, or have a complex understanding of the NSX-T REST API. It does however expect that someone has built a functional NSX-T environment which includes a functional Tier-0 router and potentially edge gatway services and VNI pool for VRF examples...if you expect to have any decent functionality. This is very much a work in progress and being updated daily at this stage.

The module will aim to provide functions of SET, DEL and GET for various API calls into the NSX-T manager, using common industry terminology. For example to read the routing table would be get_route_table() while creating an EVPN instance would be set_routing_instance(). As these are created an ongoing list of commands would/should be maintained.

Installation

Installation requires Python 2.7 or 3.X and the associated python pip tool. The only other requirements currently as the requests and uuid libraries which are installed automatically through pip. To install NSXEZ simply use the following command from your shell, provided pip is installed and operational.

pip install nsxez

Upgrade

Upgrading has the same requirements as installation and has the same format for install with the addition of -U

pip install -U nsxez

Inital usage

Teh library operates on a preexisting Tier0 router and when initiated it expects you to pass a valid NSX-T manager IP address, username, password and Tier0 router name. All ongoing operations are performed against this Tier0 router enviornment.

from nsxez import operations as nsx
dev = nsx.device("192.168.0.22","admin","VMware1!VMware1!","Peering")

Example creating a new VRF called "Blue". Values to be passed are the name of the VRF, the Route Target (used for import and export) as well as the unique route distinguisher and the VNI for VXLAN overlay from the edge node to the peer.

from nsxez import operations as nsx
dev = nsx.device("192.168.0.22","admin","VMware1!VMware1!","Peering")
dev.set_routing_instance("Blue","65000:7001","7001","79423")

Example output creating a new network segment called "Blue_Web_Servers" and attaching to existing VRF "Blue"

from nsxez import operations as nsx
dev = nsx.device("192.168.0.22","admin","VMware1!VMware1!","Peering")
dev.set_network("Blue_Web_Servers","192.168.123.1","24","Blue","Overlay_TZ")

Example of assigning a routing distribution policy to an existing VRF instance. Currently only supports the concept of "all routes".

from nsxez import operations as nsx
dev = nsx.device("192.168.0.22","admin","VMware1!VMware1!","Peering")
dev.set_route_policy("ALL","Blue","all")

Example output gathering EVPN routing instance details (VRF attached to a Tier0) for VRF "Blue"

from nsxez import operations as nsx
dev = nsx.device("192.168.0.22","admin","VMware1!VMware1!","Peering")
dev.get_routing_instance("Blue")

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

nsxez-1.1.tar.gz (5.2 kB view details)

Uploaded Source

File details

Details for the file nsxez-1.1.tar.gz.

File metadata

  • Download URL: nsxez-1.1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.1

File hashes

Hashes for nsxez-1.1.tar.gz
Algorithm Hash digest
SHA256 80917e9e985734d717e42067711b260422dd3ac5f9573a22da25a084b0e0cdcd
MD5 a03155dfa64daf07dd1f1dd4e6c30e14
BLAKE2b-256 56d48ec588ce5211a4b2ccfc64568b3b3411efbfa89142334d85992f5e535a89

See more details on using hashes here.

Supported by

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