Skip to main content

IxNetwork REST API Python Client

Project description

IxNetwork REST API Client

This package is an IxNetwork object oriented pure python client package over a REST transport.
To get started browse the class and samples documentation here.

What's New!

  • The following is a summary of major changes.
  • Jun 2019 - 1.0.35
  • May 2019 - 1.0.31
    • StatViewAssistant class allows alternate csv download storage to be specified
  • Apr 2019 - 1.0.30
    • eCPRI protocol classes
    • QuickTest classes that allow for apply, start, stop, report generation and results
  • Mar 2019 - 1.0.27
    • StatViewAssistant fix filter evaluation, normalize csv snapshot names
    • Lag class has been updated with missing child classes
    • traffic over lags sample demonstrates how to create a raw traffic item with lags as endpoints
    • some classes had duplicate method names which is not supported by python, this consolidates multiple methods into one method by using args and kwargs, use the method docstring to ensure the correctness of the args being supplied to the method.
  • Feb 2019 - 1.0.23
    • TestPlatform supports Connection Manager
    • iterator fixes
    • Session file upload and file down load functionality
    • Multivalue.Steps fixes that allow for setting/enabling steps such as port step
    • samples for connecting to Connection Manager platform and session file transfer
  • Jan 2019 - 1.0.17
    • StatViewAssistant class that has ease of use features when working with statistics, such as row filters and condition checking, check out the sample.
    • container and iterator fixes with an iterator sample demonstrating some use cases
  • Nov 2018 - 1.0.10
    • Base class infrastructure to allow for getting a list of device ids using regex searches that can be used on NGPF class methods that require device ids. See the sample ngpf_device_ids.py for multiple examples of retrieving device ids and using them in ngpf methods.

Features

Static classes

  • classes are generated from the latest released version of IxNetwork
    • the only class that can be directly instantiated is the TestPlatform class
    • all other classes are accessed via a child property on the parent class
    • classes have helper methods depending on the type of class
      • classes that represent a required node are automatically populated with one and only one instance of the node's data
      • classes that represent a user managed list have add, remove, find helper methods
      • classes that represent a system managed list have a find helper method
    • every instantiated class encapsulates instances retrieved from the server
    • encapsulated instances can be accessed using iterators or indexes
    • class iterator/index support includes: __iter__ __next__ __getitem__ __len__

Find method

  • the main premise of the package is based around the .find() method
  • it offers named parameters for all properties in the class
  • each named parameter supports a regex to allow for finding specific instances
  • this allows the encapsulated data to be reduced to specific instances that you are interested in
  • some examples:
    • IxNetwork.Vport.find(Type='ethernet') uses regex on the server to find and return all vports whose type is ethernet
    • IxNetwork.Vport.find(Name='^Ethernet - 001$') uses regex on the server to find and return a vport whose name exactly matches Ethernet - 001
    • IxNetwork.Vport.find(ConnectionState='connectedLinkUp') uses regex on the server to find and return all vports whose state is connectedLinkUp

Documentation

Samples

  • samples are distributed with the package under the samples folder

Limitations

  • python support >= 2.7, 3.x
  • IxNetwork support >= 8.52

Getting Started

Install the package (pip install -U ixnetwork-restpy) and review the samples under ixnetwork_restpy/samples/...

The samples demonstrate how to do the following:

  • create a TestPlatform
  • get an IxNetwork Sessions object and either find a session or add a new one
  • get the root Ixnetwork object of the hierarchy
  • add virtual ports, topologies, traffic

Finally visit the OpenIxia IxNetwork restpy site for in depth end-to-end samples that demonstrate the following:

  • building a configuration
    • from scratch
    • from an existing IxNetwork configuration
  • running the configuration
    • connecting ports to hardware
    • starting protocols
    • starting traffic
  • getting statistics
    • port stats
    • traffic stats

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ixnetwork_restpy-1.0.36.tar.gz (1.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ixnetwork_restpy-1.0.36-py2.py3-none-any.whl (4.8 MB view details)

Uploaded Python 2Python 3

File details

Details for the file ixnetwork_restpy-1.0.36.tar.gz.

File metadata

  • Download URL: ixnetwork_restpy-1.0.36.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.15

File hashes

Hashes for ixnetwork_restpy-1.0.36.tar.gz
Algorithm Hash digest
SHA256 a1e6121b8913fbb57fcf3043c7192ce90d7908ad202631d1832de320cbf186f5
MD5 40a03cadf3a4c22cc3fa01246dc84f42
BLAKE2b-256 a86ca7f9b3ebe099546059c2820472b74c2bfa67e51551300ea4b549875517fa

See more details on using hashes here.

File details

Details for the file ixnetwork_restpy-1.0.36-py2.py3-none-any.whl.

File metadata

  • Download URL: ixnetwork_restpy-1.0.36-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.8 MB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.15

File hashes

Hashes for ixnetwork_restpy-1.0.36-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9cc1df558bd19ecde2d4c816cdf48a804b1150f4270bedd271a7154324f1b5a8
MD5 cd4606377e29d1d7338d12fcabfb4412
BLAKE2b-256 4be2c85e330240d18e6920d6170fff627d1da6c748844327ff289cae1dafb2ba

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