Skip to main content

VIRL2 Client Library

Project description

CI

VIRL 2 Client Library

Note: The product has been renamed from VIRL to Cisco Modeling Labs / CML 2. References to VIRL still exist in the product documentation and within code or examples.

The name of the package itself has not been changed. Throughout the documentation it is referred to as "virl2_client", "Python Client Library" or "PCL".

Introduction

This is the client library for the Cisco Modeling Labs Platform (virl2_client). It provides a Python package to programmatically create, edit, delete and control network simulations on a CML 2 controller.

It is a pure Python implementation that requires Python 3. We've tested and written the package with Python 3.8.10.

The status of the package can be considered stable. Issues with the software should be raised via the GitHub issue tracker.

Use Case Description

The client library provides a convenient interface to control the life-cycle of a network simulation. This can be used for automation scripts directly in Python but also for third party integrations / plugins which need to integrate with a simulated network. Examples already existing are an Ansible plugin.

Installation

The package comes in form of a wheel that is downloadable from the CML 2 controller. The package can be installed either from PyPI using

pip3 install virl2_client

If you want to interact with devices via the client library, you need to also install the pyATS library. This can be achieved in one go using

pip3 install "virl2_client[pyats]"

Note that this does not pull in the full pyATS package... See below how that is achieved.

or, alternatively, the version that is bundled with the CML 2 controller can be downloaded to the local filesystem and then directly installed via

pip3 install ./virl2_client-*.whl

The bundled version is available on the index site of the docs when viewed directly on the CML 2 controller.

Ensure to replace and/or use the correct file name, replacing the wildcard with the proper version/build information. For example

pip3 install virl2_client-2.0.0b10-py3-none-any.whl

We recommend the use of a virtual environment for installation.

If you require the full version of the pyATS library including things like Genie then you need to do this in a subsequent step like shown here:

pip3 install "pyats[full]"

IMPORTANT: The version of the Python client library must be compatible with the version of the controller. If you are running an older controller version then it's likely that the latest client library version from PyPI can not be used. In this case, you need to either use the version available from the controller itself or by specifying a version constraint.

Example: When on a controller version 2.2.x, then you'd need to install with pip3 install "virl2-client<2.3.0". This will ensure that the version installed is compatible with 2.2.x.

Usage

The package itself is fairly well documented using docstrings. In addition, the documentation is available in HTML format on the controller itself, via the "Tools -> Client Library" menu.

Compatibility

This package and the used API is specific to CML 2. It is not backwards compatible with VIRL 1.x and therefore can not be used with VIRL 1.x. If you are looking for a convenient tool to interface with the VIRL 1 API then the CML Utils tool is recommended.

Known Issues

There are no major known issues at this point. See the comment in the Introduction section. Also, see the Issues section in GitHub to learn about known issues or raise new ones, if needed. Also see CHANGES.

Getting Help

If you have questions, concerns, bug reports, etc., please create an issue against the repository on GitHub

Getting Involved

We welcome contributions. Whether you fixed a bug, added a new feature or corrected a typo, all contributions are welcome. General instructions on how to contribute can be found in the CONTRIBUTING file.

Licensing Info

This code is licensed under the Apache 2.0 License. See LICENSE for details.

References

This package is part of the CML 2 Network Simulation platform. For details, go to https://developer.cisco.com/modeling-labs. Additional documentation for the product is available at https://developer.cisco.com/docs/modeling-labs

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

virl2_client-2.7.0.tar.gz (71.2 kB view details)

Uploaded Source

Built Distribution

virl2_client-2.7.0-py3-none-any.whl (92.6 kB view details)

Uploaded Python 3

File details

Details for the file virl2_client-2.7.0.tar.gz.

File metadata

  • Download URL: virl2_client-2.7.0.tar.gz
  • Upload date:
  • Size: 71.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.8.10 Linux/5.15.146.1-microsoft-standard-WSL2

File hashes

Hashes for virl2_client-2.7.0.tar.gz
Algorithm Hash digest
SHA256 7556e12ff0504b8fa4ba73291ae8d6e0f7f0246a0a5ecfae401d9429febe5dfe
MD5 a981748dabea8794d2b84cbd05d270d1
BLAKE2b-256 7d6b8cd06d2f751d8877895ac42268b01ce9d14b1f2e6f4e4f115c794d1dae31

See more details on using hashes here.

File details

Details for the file virl2_client-2.7.0-py3-none-any.whl.

File metadata

  • Download URL: virl2_client-2.7.0-py3-none-any.whl
  • Upload date:
  • Size: 92.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.8.10 Linux/5.15.146.1-microsoft-standard-WSL2

File hashes

Hashes for virl2_client-2.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3642d546ed762ed9263d1469476fd13c04e74b1a233ad173a4fb58df56a5d41b
MD5 69a05d765b42871140f12af362808b6b
BLAKE2b-256 8119517311193fb789ecff85530cf244124c7a8e5509055d2129cdef19a2dd08

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