pyaoscx.queue_profile module

class pyaoscx.queue_profile.QueueProfile(session, name, **kwargs)

Bases: pyaoscx.pyaoscx_module.PyaoscxModule

Provide configuration management for Queue profiles on AOS-CX devices.

apply()
Main method used to either create or update an existing Queue Profile.
Checks whether the Queue Profile exists in the switch and calls self.update() or self.create() accordingly.
Returns:True if the object was modified.
collection_uri = 'system/q_profiles'
create()

Perform a POST call to create a new Queue profile in the switch.

Returns:True if the object was modified.
delete()

Perform a DELETE call to remove a Queue Profile from the switch.

classmethod from_uri(session, uri)

Create a Queue profile object given an URI.

Parameters:
  • cls – Object’s class.
  • session – Pyaoscx.Session objec used to represent a logical connection to the device.
  • uri – a string with the URI
Returns:

tuple with the name and the Profile.

get(depth=None, selector=None)
Perform a GET call to retrieve data for a Queue profile and fill
the 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)
Perform a GET call to retrieve all Queue profiles and create a
dictionary containing each of them.
Parameters:
  • cls – Object’s class.
  • session – pyaoscx.Session object used to represent a logical connection to the device.
Returns:

Dictionary containing Queue profile names as keys and a Queue profile object as value.

classmethod get_facts(session)

Retrieve the information of all Queue profiles.

Parameters:
  • cls – Class reference.
  • session – Pyaoscx.Session object used to represent a logical connection to the device.
Returns:

Dictionary containing the name as key and the materialized object as value.

indices = ['name']
modified
name
object_uri = 'system/q_profiles/{name}'
resource_uri_name = 'name'
classmethod set_global_queue_profile(session, profile)

Sets the global queue profile for the switch.

Parameters:
  • session – pyaoscx.Session object used to represent a logical connection to the device.
  • profile – Name of a queue profile to set as the global queue profile.
update()

Perform a PUT call to apply changes to an existing Queue Profile.

Returns:True if the object was modified and a PUT request was made.
was_modified()