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.
Returns: 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.
Returns: 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.
Parameters: - cls – Object’s class.
- session – pyaoscx.Session object used to represent a logical connection to the device.
- uri – a String with a URI.
Returns: 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.
Returns: Object’s URI.
-
modified
¶
-
path
= 'system/vsx'¶
-
update
()¶ Perform a PUT call to apply changes to an existing VSX inside switch.
Returns: True if Object was modified and a PUT request was made.
-
was_modified
()¶ Getter method for the __modified attribute.
Returns: True if the object was recently modified.
-