pyaoscx.ipv6 module¶
-
class
pyaoscx.ipv6.
Ipv6
(session, address, parent_int, uri=None, **kwargs)¶ Bases:
pyaoscx.pyaoscx_module.PyaoscxModule
Provide configuration management for IPv6 on AOS-CX devices.
-
apply
()¶ - Main method used to either create or update an existing IPv6. Checks
- whether the IPv6 exists in the switch. Calls self.update() if IPv6 is being updated. Calls self.create() if a new IPv6 is being created.
-
create
()¶ - Perform a POST call to create a new IPv6 using the object’s attributes
- as POST body. Only returns if an exception is not raised.
Returns: Boolean, True if entry was created.
-
delete
()¶ - Perform DELETE call to delete IPv6 address from interface on the
- switch.
-
classmethod
from_response
(session, parent_int, response_data)¶ Create a IPv6 object given a response_data related to the IP6 address.
Parameters: - cls – Object’s class.
- session – pyaoscx.Session object used to represent a logical connection to the device.
- parent_int – parent Interface object where IPv6 is stored
- response_data – The response must be a dictionary of the form: { <address>: “/rest/v10.04/interface/ip6_addresses/<address>” }
Returns: IPv6 object.
-
classmethod
from_uri
(session, parent_int, uri)¶ Create a Ipv6 object given a URI.
Parameters: - cls – Object’s class.
- session – pyaoscx.Session object used to represent a logical connection to the device.
- parent_int – Parent Interface class where IPv6 is stored.
- uri – a String with a URI.
Returns: tuple containing both the Ipv6 Object and the ipv6’s address.
-
get
(depth=None, selector=None)¶ - Perform a GET call to retrieve data for a IPv6 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 to return.
Returns: Returns True if no exception is raised.
-
classmethod
get_all
(session, parent_int)¶ - Perform a GET call to retrieve all system IPv6 addresses inside an
- Interface, and create a dictionary containing them.
Parameters: - cls – Object’s class.
- session – pyaoscx.Session object used to represent a logical connection to the device.
- parent_int – parent Interface object where IPv6 is stored
Returns: Dictionary containing IPv6 IDs as keys and a Ipv6 object as value.
-
get_info_format
()¶ - Method used to obtain correct object format for referencing inside
- other objects.
Returns: Object format depending on the API Version.
-
get_uri
()¶ Method used to obtain the specific IPv6 URI.
Returns: Object’s URI.
-
indices
= ['address']¶
-
modified
¶ Return boolean with whether this object has been modified.
-
resource_uri_name
= 'ip6_addresses'¶
-
update
()¶ Perform a PUT call to apply changes to an existing IPv6 table entry
Returns: True if Object was modified and a PUT request was made.
-
was_modified
()¶ Getter method for the __modified attribute :return: Boolean True if the object was recently modified.
-