pyaoscx.queue module¶
-
class
pyaoscx.queue.
Queue
(session, qos_name, queue_number, **kwargs)¶ Bases:
pyaoscx.pyaoscx_module.PyaoscxModule
Provide configuration management for Queues on AOS-CX devices.
-
apply
()¶ - Main method used to either create or update an existing Queue. Checks
- whether the Queue exists in the switch. Calls self.update() if object is being updated. Calls self.create() if a new object is being created.
Returns: Boolean, True if object was created or modified.
-
burst
¶
-
create
()¶ - Perform a POST request to create a new Queue using the object’s
- attributes as the request body. An exception is raised if object cannot be created.
Returns: Boolean, True if entry was created.
-
delete
()¶ Perform a DELETE call to delete Queue table entry.
-
classmethod
from_response
(session, response_data)¶ Create a Queue object given a related response_data.
Parameters: - session – pyaoscx.Session object used to represent a logical connection to the device.
- response_data – The response must be a dictionary of the form: { “strict”: “/rest/v10.08/system/qos/”<Qos name>/queues/7” }
Returns: Queue Object.
-
classmethod
from_uri
(session, uri)¶ Create a Queue object given a Queue URI.
Parameters: - session – pyaoscx.Session object used to represent a logical connection to the device.
- uri – a String with a URI.
Returns: tuple with the Queue object and its name.
-
get
(depth=None, selector=None)¶ - Perform a GET call to retrieve data for a Queue table entry and fill
- object with the incoming attributes.
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.
Returns: Returns True if no exception is raised.
-
classmethod
get_all
(session, qos_name)¶ - Perform a GET call to retrieve all system Queues for given Schedule
- Profile from a switch.
Parameters: session – pyaoscx.Session object used to represent a logical connection to the device. Returns: Dictionary containing all system Schedule Profile’s Queues.
-
get_uri
()¶ Method used to obtain this instance’s URI.
Returns: Object’s URI.
-
gmb_percent
¶
-
indices
= ['queue_number', 'qos_name']¶
-
modified
¶ Return boolean with whether this object has been modified.
-
qos_name
¶ Method to retrieve the qos_name identifier of this object.
Returns: returns the Qos name of this object.
-
queue_number
¶ Method to retrieve the queue_number identifier of this object.
Returns: returns the queue number of this object.
-
resource_uri_name
= 'queues'¶
-
update
()¶ Perform a PUT call to apply changes to an existing Queue table entry.
Returns: True if Object was modified and a PUT request was made.
-
was_modified
()¶ Getter method to check it object has been modified.
Returns: Boolean True if the object was recently modified.
-