pyaoscx.qos module¶
-
pyaoscx.qos.
apply_profile_interface
(port_name, schedule_profile_name, **kwargs)¶ Perform GET and PUT calls to apply QoS schedule profile on an interface. If there is a globally applied schedule profile, this function will override the specified interface with the specified schedule profile.
Parameters: - port_name – Alphanumeric name of the Port on which the schedule profile is to be applied
- schedule_profile_name – Alphanumeric name of the schedule profile
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise
-
pyaoscx.qos.
apply_profiles_globally
(queue_profile_name, schedule_profile_name, **kwargs)¶ Perform GET and PUT calls to apply a QoS queue profile and schedule profile on all interfaces.
Parameters: - queue_profile_name – Alphanumeric name of the queue profile
- schedule_profile_name – Alphanumeric name of the schedule profile
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise
-
pyaoscx.qos.
clear_port_policy
(port_name, **kwargs)¶ Perform GET and PUT calls to clear a Port’s policy
Parameters: - port_name – Alphanumeric name of the Port
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise
-
pyaoscx.qos.
clear_port_rate_limits
(port_name, **kwargs)¶ Perform GET and PUT calls to clear a Port’s rate limits
Parameters: - port_name – Alphanumeric name of the Port
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise
-
pyaoscx.qos.
clear_trust_globally
(**kwargs)¶ Perform GET and PUT calls to remove global setting of QoS trust mode on all interfaces.
Parameters: kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function Returns: True if successful, False otherwise
-
pyaoscx.qos.
clear_trust_interface
(port_name, **kwargs)¶ Perform GET and PUT calls to clear QoS trust mode on an interface.
Parameters: - port_name – Alphanumeric name of the Port on which the trust mode is to be set
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise
-
pyaoscx.qos.
create_policy
(policy_name, **kwargs)¶ Perform a POST call to create a classifier policy
Parameters: - policy_name – Alphanumeric name of policy
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise
-
pyaoscx.qos.
create_policy_entry
(policy_name, class_name, class_type, sequence_num, **kwargs)¶ Perform a POST call to create a policy entry
Parameters: - policy_name – Alphanumeric name of the policy
- class_name – Alphanumeric name of the traffic class
- class_type – Class type should be one of “ipv4,” “ipv6,” or “mac”
- sequence_num – Integer ID for the entry
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise
-
pyaoscx.qos.
create_policy_entry_action
(policy_name, sequence_num, dscp=None, pcp=None, **kwargs)¶ Perform a POST call to create a policy entry action
Parameters: - policy_name – Alphanumeric name of the policy
- sequence_num – Integer ID for the entry
- dscp – Optional integer DSCP value to set matched packets to
- pcp – Optional integer PCP value to set matched packets to
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise
-
pyaoscx.qos.
create_queue_profile
(profile_name, **kwargs)¶ Perform a POST call to create a QoS queue profile with no entries
Parameters: - profile_name – Alphanumeric name of the queue profile
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise
-
pyaoscx.qos.
create_queue_profile_entry
(profile_name, queue_num, local_priorities, desc=None, **kwargs)¶ Perform a POST call to create a QoS queue profile entry
Parameters: - profile_name – Alphanumeric name of the queue profile
- queue_num – Integer number of the entry
- local_priorities – List of integers, each item being a local priority
- desc – Optional description for the entry
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise
-
pyaoscx.qos.
create_schedule_profile
(profile_name, **kwargs)¶ Perform a POST call to create a QoS schedule profile with no entries
Parameters: - profile_name – Alphanumeric name of the schedule profile
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise
-
pyaoscx.qos.
create_schedule_profile_entry
(profile_name, queue_num, algorithm='strict', bandwidth=None, burst_size=None, weight=None, **kwargs)¶ Perform a POST call to create a QoS schedule profile entry
Parameters: - profile_name – Alphanumeric name of the schedule profile
- queue_num – Integer number of queue
- algorithm – Algorithm type should be “strict,” “dwrr,” or “wfq.” Defaults to “strict” if not specified.
- bandwidth – Optional bandwidth limit (in kilobits/s) to apply to egress queue traffic
- burst_size – Optional burst size (in kilobytes) allowed per bandwidth-limited queue
- weight – Optional weight value for the queue. The maximum weight is hardware-dependent.
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise
-
pyaoscx.qos.
create_traffic_class
(class_name, class_type, **kwargs)¶ Perform a POST call to create a traffic class
Parameters: - class_name – Alphanumeric name of the traffic class
- class_type – Class type should be one of “ipv4,” “ipv6,” or “mac”
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise
-
pyaoscx.qos.
create_traffic_class_entry
(class_name, class_type, action, sequence_num, ip_protocol=None, src_ip=None, dest_ip=None, **kwargs)¶ Perform a POST call to create a traffic class entry
Parameters: - class_name – Alphanumeric name of the traffic class
- class_type – Class type should be one of “ipv4,” “ipv6,” or “mac”
- action – Action should be either “match” or “ignore”
- sequence_num – Integer ID for the entry.
- ip_protocol – Optional integer IP protocol number. Defaults to None if not specified. Excluding this parameter will make the entry associate to all IP protocols.
- src_ip – Optional source IP address. Defaults to None if not specified.
- dest_ip – Optional destination IP address. Defaults to None if not specified.
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise
-
pyaoscx.qos.
delete_policy
(policy_name, **kwargs)¶ Perform a DELETE call to delete a classifier policy
Parameters: - policy_name – Alphanumeric name of policy
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise
-
pyaoscx.qos.
delete_policy_entry
(policy_name, sequence_num, **kwargs)¶ Perform a DELETE call to delete a policy entry
Parameters: - policy_name – Alphanumeric name of the policy
- sequence_num – Integer ID for the entry
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise
-
pyaoscx.qos.
delete_policy_entry_action
(policy_name, sequence_num, **kwargs)¶ Perform a PUT call to set no action on a policy entry
Parameters: - policy_name – Alphanumeric name of the policy
- sequence_num – Integer ID for the entry
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise
-
pyaoscx.qos.
delete_queue_profile
(profile_name, **kwargs)¶ Perform a DELETE call to delete a QoS queue profile
Parameters: - profile_name – Alphanumeric name of the queue profile
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise
-
pyaoscx.qos.
delete_queue_profile_entry
(profile_name, queue_num, **kwargs)¶ Perform a DELETE call to delete a QoS queue profile entry
Parameters: - profile_name – Alphanumeric name of the queue profile
- queue_num – Integer number of the entry
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise
-
pyaoscx.qos.
delete_schedule_profile
(profile_name, **kwargs)¶ Perform a DELETE call to delete a QoS schedule profile
Parameters: - profile_name – Alphanumeric name of the schedule profile
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise
-
pyaoscx.qos.
delete_schedule_profile_entry
(profile_name, queue_num, **kwargs)¶ Perform a DELETE call to delete a QoS schedule profile entry
Parameters: - profile_name – Alphanumeric name of the schedule profile
- queue_num – Integer number of the entry
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise
-
pyaoscx.qos.
delete_traffic_class
(class_name, class_type, **kwargs)¶ Perform a DELETE call to delete a traffic class
Parameters: - class_name – Alphanumeric name of the traffic class
- class_type – Class type should be one of “ipv4,” “ipv6,” or “mac”
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise
-
pyaoscx.qos.
delete_traffic_class_entry
(class_name, class_type, sequence_num, **kwargs)¶ Perform a DELETE call to delete a traffic class entry
Parameters: - class_name – Alphanumeric name of the traffic class
- class_type – Class type should be one of “ipv4,” “ipv6,” or “mac”=
- sequence_num – Integer ID for the entry.
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise
-
pyaoscx.qos.
get_all_classes
(**kwargs)¶ Perform a GET call to get a list of all traffic classes
Parameters: kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function Returns: List of all traffic classes in the table
-
pyaoscx.qos.
get_all_policies
(**kwargs)¶ Perform a GET call to get a list of all classifier policies
Parameters: kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function Returns: List of all classifier policies in the table
-
pyaoscx.qos.
get_all_policy_entries
(policy_name, **kwargs)¶ Perform a GET call to get a list of all policy entries
Parameters: - policy_name – Alphanumeric name of the classifier policy
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: List of all policy entries in the table
-
pyaoscx.qos.
get_all_queue_profile_entries
(profile_name, **kwargs)¶ Perform a GET call to get all entries of a QoS queue profile
Parameters: - profile_name – Alphanumeric name of the queue profile
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: Dictionary containing queue profile entry URIs
-
pyaoscx.qos.
get_all_queue_profiles
(**kwargs)¶ Perform a GET call to get a list of all QoS queue profiles
Parameters: kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function Returns: List of all QoS queue profiles in the table
-
pyaoscx.qos.
get_all_schedule_profile_entries
(profile_name, **kwargs)¶ Perform a GET call to get all entries of a QoS schedule profile
Parameters: - profile_name – Alphanumeric name of the schedule profile
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: Dictionary containing schedule profile entry URIs
-
pyaoscx.qos.
get_all_schedule_profiles
(**kwargs)¶ Perform a GET call to get a list of all QoS schedule profiles
Parameters: kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function Returns: List of all QoS schedule profiles in the table
-
pyaoscx.qos.
get_all_traffic_class_entries
(class_name, class_type, **kwargs)¶ Perform a GET call to get a list of all traffic class entries
Parameters: - class_name – Alphanumeric name of traffic class
- class_type – Class type should be one of “ipv4,” “ipv6,” or “mac”
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: List of all traffic class entries in the table
-
pyaoscx.qos.
get_policy
(policy_name, **kwargs)¶ Perform a GET call to get details of a particular policy
Parameters: - policy_name – Alphanumeric name of the policy
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: Dictionary containing data about a particular policy
-
pyaoscx.qos.
get_policy_entry_action
(policy_name, sequence_num, **kwargs)¶ Perform a GET call to get the action set on a particular policy entry
Parameters: - policy_name – Alphanumeric name of policy
- sequence_num – Integer ID for the entry.
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: Dictionary containing data about the action of a particular policy entry
-
pyaoscx.qos.
get_traffic_class
(class_name, class_type, **kwargs)¶ Perform a GET call to get details of a particular traffic class
Parameters: - class_name – Alphanumeric name of the traffic class
- class_type – Class type should be one of “ipv4,” “ipv6,” or “mac”
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: Dictionary containing data about a particular traffic class
-
pyaoscx.qos.
remap_dscp_entry
(code_point, color=None, desc=None, local_priority=None, **kwargs)¶ Perform PUT call to modify the DSCP code point entry.
Parameters: - code_point – Integer identifying the DSCP map code point entry.
- color – Optional color used for packet-drop decisions. Should be one of “red,” “yellow,” or “green.” If not specified, defaults to the factory default color for the given code point.
- desc – Optional description for the DSCP code point entry. If not specified, defaults to the factory default description for the given code point.
- local_priority – Optional local priority to associate to incoming packets. If not specified, defaults to the factory default local priority for the given code point.
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise
-
pyaoscx.qos.
reset_dscp_entry
(code_point, **kwargs)¶ Perform a PUT call to reset the DSCP code point entry to its default setting.
Parameters: - code_point – Integer identifying the DSCP map code point entry.
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise
-
pyaoscx.qos.
set_trust_globally
(trust_mode, **kwargs)¶ Perform GET and PUT calls to set QoS trust mode on all interfaces.
Parameters: - trust_mode – Trust mode should be one of “none,” “cos,” or “dscp.”
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise
-
pyaoscx.qos.
set_trust_interface
(port_name, trust_mode, **kwargs)¶ Perform GET and PUT calls to set QoS trust mode on an interface. If there is a globally applied trust mode, this function will override the specified interface with the specified trust mode.
Parameters: - port_name – Alphanumeric name of the Port on which the trust mode is to be set
- trust_mode – Trust mode should be one of “none,” “cos,” or “dscp.”
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise
-
pyaoscx.qos.
unapply_profiles_globally
(**kwargs)¶ Perform GET and PUT calls to remove global application of QoS queue profile and schedule profile on all interfaces.
Parameters: kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function Returns: True if successful, False otherwise
-
pyaoscx.qos.
update_policy
(policy_name, **kwargs)¶ Perform a PUT call to version-up a policy
Parameters: - policy_name – Alphanumeric name of the policy
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise
-
pyaoscx.qos.
update_port_policy
(port_name, policy_name, **kwargs)¶ Perform GET and PUT calls to update a Port’s policy
Parameters: - port_name – Alphanumeric name of the Port
- policy_name – Alphanumeric name of the policy
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise
-
pyaoscx.qos.
update_port_rate_limits
(port_name, broadcast_limit=None, broadcast_units=None, multicast_limit=None, multicast_units=None, unknown_unicast_limit=None, unknown_unicast_units=None, **kwargs)¶ Perform GET and PUT calls to update a Port’s rate limits
Parameters: - port_name – Alphanumeric name of the Port
- broadcast_limit – Rate limit for broadcast ingress traffic
- broadcast_units – Units for broadcast rate limit; should be either “kbps” (kilobits/second) or “pps” (packets/second)
- multicast_limit – Rate limit in pps for multicast ingress traffic
- multicast_units – Units for multicast rate limit; should be either “kbps” (kilobits/second) or “pps” (packets/second)
- unknown_unicast_limit – Rate limit in pps for unknown_unicast ingress traffic
- unknown_unicast_units – Units for unknown unicast rate limit; should be either “kbps” (kilobits/second) or “pps” (packets/second)
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise
-
pyaoscx.qos.
update_traffic_class
(class_name, class_type, **kwargs)¶ Perform a PUT call to version-up a traffic class. This is required whenever entries of a traffic class are changed in any way.
Parameters: - class_name – Alphanumeric name of the traffic class
- class_type – Class type should be one of “ipv4,” “ipv6,” or “mac”
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise