pyaoscx.vsx module¶
-
pyaoscx.vsx.
create_vsx
(role, isl_port, keepalive_peer, keepalive_src, keepalive_vrf, vsx_mac, **kwargs)¶ Perform a POST call to create VSX commands.
Parameters: - role – Alphanumeric role that the system will be in the VSX pair. The options are “primary” or “secondary”
- isl_port – Alphanumeric name of the interface that will function as the inter-switch link
- keepalive_peer – Alphanumeric IP address of the VSX Peer that will be reached as the keepalive connection.
- keepalive_src – Alphanumeric IP address on the switch that will function as the keepalive connection source.
- keepalive_vrf – Alphanumeric name of the VRF that the keepalive connection will reside on.
- vsx_mac – Alphanumeric MAC address that will function as the VSX System MAC.
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise
-
pyaoscx.vsx.
delete_vsx
(**kwargs)¶ Perform a DELETE call to get get the current VSX information on a system.
Parameters: kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function Returns: True if successful, False otherwise
-
pyaoscx.vsx.
delete_vsx_interface_vlan
(vlan_id, **kwargs)¶ Perform PUT calls on a VLAN interface to remove VSX IPv4 settings.
Parameters: - vlan_id – Numeric ID of VLAN to that will be configured
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise
-
pyaoscx.vsx.
get_vsx
(depth=0, selector=None, **kwargs)¶ Perform a GET call to get get the current VSX information on a system.
Parameters: - depth – Integer deciding how many levels into the API JSON that references will be returned.
- selector – Alphanumeric option to select specific information to return. The options are ‘configuration’, ‘status’, or ‘statistics’. If running v10.04 or later, an additional option ‘writable’ is included.
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: JSON of VSX information
-
pyaoscx.vsx.
update_vsx_interface_vlan
(vlan_id, active_forwarding, vsx_sync, act_gw_mac, act_gw_ip, **kwargs)¶ Perform PUT calls on a VLAN interface to configure VSX IPv4 settings.
Parameters: - vlan_id – Numeric ID of VLAN to that will be configured
- active_forwarding – True or False Boolean to set VSX active forwarding
- vsx_sync – Set of alphanumeric values to enable VSX configuration synchronization. The options are any combination of ‘active-gateways’, ‘irdp’, and ‘policies’. VSX Sync is mainly used in the Primary.
- act_gw_mac – Alphanumeric value of the Virtual MAC address for the interface active gateway
- act_gw_ip – Alphanumeric value of the Virtual IP address for the interface active gateway
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise