HomeGuidesAPI Reference
GuidesAPI ReferenceGitHubAirheads Developer CommunityLog In

Getting Started with pyaoscx v2

Overview of Python and pyaoscx

What is Python?

Python is a high-level programming language that is used widely across various disciplines. Highly regarded for its simplified syntax, beginner-friendliness, and abundance of third-party libraries, Python is among the most popular programming languages in the world. The networking community especially embraces Python due in no small part to extensive vendor support as well as a low barrier of entry for getting started with automation and scripting.

πŸ“˜

pyaoscx v2 on Pypi

The latest supported version of the pyaoscx package can be found here on Pypi.

Installing Python

Please refer to Python's official documentation for instructions on how to install Python3 to your machine.

Once Python is installed you're ready to install & use the pyaoscx package. For instructions on how to use the package follow Using the pyaoscx Package , for instructions on how to install the package follow Installing pyaoscx v2.

About the pyaoscx v2 Library

The pyaoscx package contains Python modules that can be called upon to access the REST API and configure various features on the switches. In order to use pyaoscx, Python 3 must be installed on your system. You can download and install Python here. The package has gone through a change in structure introduced in v2.0.0 of the package, follow the below guides that discuss how to use the package and write workflows to automate your AOS-CX switch.

🚧

The pyaoscx package is compatible with Python 3 only. Python 2 is not officially supported.

pyaoscx v2.0.0+ Module Support

πŸ“˜

Module Documentation on READTHEDOCS

Detailed module documentation can be found on the pyaoscx readthedocs here:

pyaoscx module documentation

Below is a table of all supported modules and platforms, for a complete feature supported list check out the Aruba Feature Navigator:

Module⁺8400836083258320640063006200610060004100i100009300
acl.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::x::x::white-check-mark::white-check-mark::white-check-mark:
acl_entry.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::x::x::white-check-mark::white-check-mark::white-check-mark:
aggregate_address.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark:
api.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark:
bgp_neighbor.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::x::x::x::white-check-mark::white-check-mark::white-check-mark:
bgp_router.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::x::x::x::white-check-mark::white-check-mark::white-check-mark:
configuration.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark:
device.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark:
dhcp_relay.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::x::x::white-check-mark::white-check-mark::white-check-mark:
dns.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark:
firmware:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark:
interface.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark:
ipv6.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::x::x::white-check-mark::white-check-mark::white-check-mark:
mac.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark:
ospf_area.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark:
ospf_interface.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::x::x::white-check-mark::white-check-mark::white-check-mark:
ospf_router.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::x::x::white-check-mark::white-check-mark::white-check-mark:
ospf_virtual_link.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::x::x::white-check-mark::white-check-mark::white-check-mark:
ospfv3_router.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::x::x::white-check-mark::white-check-mark::white-check-mark:
poe_interface.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::x::x::white-check-mark::white-check-mark::white-check-mark:
pyaoscx_factory.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark:
pyaoscx_module.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark:
qos.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::x::x::white-check-mark::white-check-mark::white-check-mark:
qos_cos.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::x::x::white-check-mark::white-check-mark::white-check-mark:
qos_dscp.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::x::x::white-check-mark::white-check-mark::white-check-mark:
queue.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::x::x::white-check-mark::white-check-mark::white-check-mark:
queue_profile.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::x::x::white-check-mark::white-check-mark::white-check-mark:
queue_profile_entry.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::x::x::white-check-mark::white-check-mark::white-check-mark:
session.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark:
static_mac.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark:
static_nexthop.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark:
static_route.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::x::x::white-check-mark::white-check-mark::white-check-mark:
tunnel_endpoint.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::x::x::white-check-mark::white-check-mark::white-check-mark:
vlan.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark:
vni.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::x::x::white-check-mark::white-check-mark::white-check-mark:
vrf.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::x::x::white-check-mark::white-check-mark::white-check-mark:
vrf_address_family.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark:
vsx.py:white-check-mark::white-check-mark::white-check-mark::white-check-mark::white-check-mark::x::x::x::x::x::white-check-mark::white-check-mark:

Workflows

Workflows are scripts that combine calls to functions in the pyaoscx modules to emulate large higher-level network configuration processes (e.g. create ACL and ACL entries, apply ACL on interface, and lastly enable interface). The workflows subfolder contains an example workflow showing a method on how to use the pyaoscx v2 package.

A walkthrough of the example workflow as well as guidance on creating custom workflows can be found in the Using the pyaoscx Package guide.

More example workflows will be added to this directory in the future as well as we are open to receiving community contributed workflows as well. If you are interested in contributing to this project please read the CONTRIBUTING.md within the repository and open a pull request. We also have the option for community members to contribute full projects through our Aruba devHub Code Exchange.