pyaoscx.qos_cos module

class pyaoscx.qos_cos.QosCos(session, code_point, **kwargs)

Bases: pyaoscx.pyaoscx_module.PyaoscxModule

Provide configuration management for QoS COS trust mode on AOS-CX devices.

apply()
Main method used to update an existing QoS COS trust mode table entry.
Checks whether the QoS COS trust mode exists in the switch. Calls self.update if object is being updated.
Returns:Boolean, True if object was modified.
base_uri = 'system/qos_cos_map_entries'
code_point

Method used to retrieve object’s code point.

Returns:returns the code point of this QoS COS trust mode object.
color

Getter method for the color property.

create()
Perform a POST call to create a new <pyaoscx_module_type>. Only returns
if an exception is not raise.
Returns:Boolean, True if entry was created.
delete()

Perform DELETE call to delete <pyaoscx_module_type> table entry.

description

Getter method for the description property.

classmethod from_response(session, response_data)
Create a QoS COS trust mode object given a response_data related to the
existing QoS COS trust mode object.
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: { “3” : “/rest/v10.08/system/qos_cos_map_entries/3” }
Returns:

QoS COS trust mode object.

classmethod from_uri(session, uri)

Create an object given a QoS COS trust mode URI.

Parameters:
  • session – pyaoscx.Session object used to represent a logical connection to the device.
  • uri – s String with an URI.
Returns:

returns identifier and object.

get(depth=None, selector=None)
Perform a GET call to retrieve data for a QoS COS trust mode table
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 return.
Returns:

Returns True if no exception is raised.

classmethod get_all(session)
Perform a GET call to retrieve all system QoS COS trust mode
configurations from of a switch.
Parameters:session – pyaoscx.Session object used to represent a logical connection to the device.
Returns:Dictionary containing all system Schedule Profiles.
get_uri()

Method used to obtain object’s URI.

Returns:Object’s URI.
indices = ['code_point']
local_priority

Getter method for the local_priority.

modified

Return boolean with whether this object has been modified.

resource_uri_name = 'qos_cos_map_entries'
update()

Perform a PUT call to update an existing QoS COS trust mode object.

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.