pyaoscx
latest

Contents:

  • pyaoscx
pyaoscx
  • Docs »
  • pyaoscx.ospf_virtual_link module
  • Edit on GitHub

pyaoscx.ospf_virtual_link module¶

class pyaoscx.ospf_virtual_link.OspfVlink(session, peer_router_id, parent_ospf_area, **kwargs)¶

Bases: pyaoscx.pyaoscx_module.PyaoscxModule

Provide configuration management for OSPF VLink instance on AOS-CX devices.

apply()¶
Main method used to either create or update an existing Ospf Virtual
Link. Checks whether the OSPF Virtual Link exists in the switch. Calls self.update() if OSPF Virtual Link is being updated. Calls self.create() if a new OSPF Virtual Link is being created.
Returns:Boolean, True if object was created or modified.
collection_uri = 'system/vrfs/{name}/ospf{version}_routers/{instance_tag}/areas/{area_id}/ospf_vlinks'¶
create()¶
Perform a POST request to create a new OSPF Virtual Link. Only returns
if an exception is not raised.
Returns:Boolean, True if object was created.
delete()¶

Perform DELETE call to delete OSPF Virtual Link table entry.

classmethod from_uri(session, uri, parent_ospf_area=None)¶

Create an OspfVlink object given a URI.

Parameters:
  • session – pyaoscx.Session object used to represent a logical connection to the device.
  • parent_ospf_area – parent OspfArea object where OspfVlink object is stored.
  • uri – an OSPF VLink URI with its index (a peer_router_id).
Returns:

tuple with the OspfVlink ID, and the object.

get(depth=None, selector=None)¶
Perform a GET request to retrieve data for an OSPF VLink 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 there is not an exception raised.

classmethod get_all(session, parent_ospf_area)¶
Perform a GET request to retrieve all system OSPF Virtual Links inside
a OPSF Router, 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_ospf_area – parent OPSF Area object where OPSF VLink is stored.
Returns:

Dictionary containing OSPF Virtual Link IDs as keys and a OSPF Virtual Link objects as values.

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 OSPF Virtual Link URI.

Returns:Object’s URI.
modified¶

Return boolean with whether this object has been modified.

object_uri = 'system/vrfs/{name}/ospf{version}_routers/{instance_tag}/areas/{area_id}/ospf_vlinks/{peer_router_id}'¶
peer_router_id¶

Return this object’s identifier.

resource_uri_name = 'ospf_vlinks'¶
update()¶

Perform a PUT request to apply changes to an existing OSPF VLink.

Returns:True if Object was modified and a PUT request was made.
was_modified()¶

Getter method for the __modified attribute.

Returns:Boolean True if the object was recently modified.

© Copyright 2019-2023, HPE Aruba Revision 470cb423.

Built with Sphinx using a theme provided by Read the Docs.