pyaoscx.queue_profile_entry module

class pyaoscx.queue_profile_entry.QueueProfileEntry(session, queue_number, parent_profile, **kwargs)

Bases: pyaoscx.pyaoscx_module.PyaoscxModule

Provide configuration management for Queue Profile Entries on AOS-CX
devices.
apply()
Main method used to either create or update an existing Queue
Profile Entry. Checks whether the Queue Profile exists in the switch and calls self.update() or self.create() accordingly.
Return modified:
 True if the object was modified.
collection_uri = 'system/q_profiles/{name}/q_profile_entries'
create()

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

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

Perform a DELETE call to remove a Queue Profile Entry 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 Entry 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 there is not an exception raised.

classmethod get_all(session, queue_profile_name)
Perform a GET call to retrieve all Queue Profile Entries of the same
profile and create a dictionary containing them.
Parameters:
  • cls – Object’s class.
  • session – pyaoscx.Session object used to represent a logical connection to the device.
  • queue_profile_name – Name of the profile to which the entries belong.
Returns:

Dictionary containing Queue Profile Entry names as keys and a Queue Profile Entry object as value.

classmethod get_facts(session, queue_profile_name)

Retrieve the information of all Queue profiles.

Parameters:
  • cls – Class reference.
  • session – Pyaoscx.Session object used to represent a logical connection to the device.
  • queue_profile_name – Name of the profile to which the entries belong.
Returns:

Dictionary containing the name as key and the facts as value.

indices = ['queue_number']
modified
object_uri = 'system/q_profiles/{name}/q_profile_entries/{queue_number}'
queue_number
resource_name = 'queue_number'
update()

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

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