pyaoscx.vxlan module

pyaoscx.vxlan.add_vni_mapping(vni, vxlan, vlan, **kwargs)

Perform POST call to create a Virtual Network ID and Map it to VLANs for a supplied VXLAN.

Parameters:
  • vni – Integer representing the Virtual Network ID
  • vxlan – Alphanumeric of the VXLAN that the VNI will be associated with
  • vlan – VLAN that the VNI will be mapped to
  • kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns:

True if successful, False otherwise

pyaoscx.vxlan.create_vxlan_interface(port_name, source_ipv4=None, port_desc=None, dest_udp_port=4789, **kwargs)

Perform POST calls to create a VXLAN table entry for a logical L3 Interface. If the VXLAN Interface already exists and an IPv4 address is given, the function will update the IPv4 address.

Parameters:
  • port_name – Alphanumeric Interface name
  • source_ipv4 – Source IPv4 address to assign to the VXLAN interface. Defaults to nothing if not specified.
  • port_desc – Optional description for the interface. Defaults to nothing if not specified.
  • dest_udp_port – Optional Destination UDP Port that the VXLAN will use. Default is set to 4789
  • kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns:

True if successful, False otherwise

pyaoscx.vxlan.delete_vni_mapping(vni, **kwargs)

Perform DELETE call to remove a Virtual Network ID for a VXLAN.

Parameters:
  • vni – Integer representing the Virtual Network ID
  • kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns:

True if successful, False otherwise

pyaoscx.vxlan.get_vni_list(**kwargs)

Perform a GET call to receive a list of Virtual Network IDs on the system.

Parameters:kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns:List of Virtual Network IDs