pyaoscx.vsx module¶
-
class
pyaoscx.vsx.
Vsx
(session, **kwargs)¶ Bases:
pyaoscx.pyaoscx_module.PyaoscxModule
Provide configuration management for VSX protocol on AOS-CX devices.
-
apply
()¶ - Main method used to either create or update an existing VSX
- configuration. Checks whether the VSX configuration exists in the switch. Calls self.update() if VSX configuration being updated. Calls self.create() if a new VSX configuration is being created.
Return modified: True if object was created or modified.
-
base_uri
= 'system/vsx'¶
-
create
()¶ - Perform a POST call to create a new VSX. Only returns if no exception
- is raised.
return: True if entry was created.
-
delete
()¶ Perform DELETE call to delete VSX configuration.
-
classmethod
from_uri
(session, uri)¶ Create a Vsx object given a VSX URI. :param cls: Object’s class. :param session: pyaoscx.Session object used to represent a logical
connection to the device.Parameters: uri – a String with a URI. :return Vsx object.
-
get
(depth=None, selector=None)¶ - Perform a GET call to retrieve data for a VSX table entry and fill the
- class 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)¶ Not applicable for VSX.
-
get_info_format
()¶ Not applicable for VSX.
-
get_uri
()¶ Method used to obtain the specific VSX URI. return: Object’s URI.
-
modified
¶
-
path
= 'system/vsx'¶
-
update
()¶ Perform a PUT call to apply changes to an existing VSX inside switch. :return modified: True if Object was modified and a PUT request was
made.
-
was_modified
()¶ Getter method for the __modified attribute. :return: True if the object was recently modified.
-