Esempio n. 1
0
 def __init__(self,
              session,
              address_family,
              ip_prefix,
              parent_bgp_router,
              uri=None,
              **kwargs):
     self.session = session
     # Assign ID
     self.address_family = address_family
     self.__set_name(ip_prefix)
     # Assign parent BGP Router
     self.__set_bgp_router(parent_bgp_router)
     self._uri = uri
     # List used to determine attributes related to the Aggregate Address
     # configuration
     self.config_attrs = []
     self.materialized = False
     # Attribute dictionary used to manage the original data
     # obtained from the GET
     self.__original_attributes = {}
     # Set arguments needed for correct creation
     utils.set_creation_attrs(self, **kwargs)
     # Attribute used to know if object was changed recently
     self.__modified = False
Esempio n. 2
0
    def __init__(self,
                 session,
                 area_id,
                 parent_ospf_router,
                 uri=None,
                 **kwargs):

        self.session = session
        # Assign ID
        self.area_id = area_id
        # Assign parent OSPF Router
        self.__set_ospf_router(parent_ospf_router)
        self._uri = uri
        # List used to determine attributes related to the OPSF configuration
        self.config_attrs = []
        self.materialized = False
        # Attribute dictionary used to manage the original data
        # obtained from the GET
        self.__original_attributes = {}
        # Set arguments needed for correct creation
        utils.set_creation_attrs(self, **kwargs)
        # Use to manage OSPF Interfaces
        self.ospf_interfaces = []
        # Attribute used to know if object was changed recently
        self.__modified = False
Esempio n. 3
0
File: vsx.py Progetto: aruba/pyaoscx
    def __init__(self, session, uri=None, **kwargs):

        self.session = session
        self._uri = uri
        # List used to determine attributes related to the VSX configuration
        self.config_attrs = []
        self.materialized = False
        # Attribute dictionary used to manage the original data
        # obtained from the GET
        self.__original_attributes = {}
        # Set arguments needed for correct creation
        utils.set_creation_attrs(self, **kwargs)
        # Attribute used to know if object was changed recently
        self.__modified = False
Esempio n. 4
0
    def __init__(self, session, _id, parent_static_route, uri=None, **kwargs):

        self.session = session
        # Assign IP
        self.id = _id
        # Assign parent StaticRoute object
        self.__set_static_route(parent_static_route)
        self._uri = uri
        # List used to determine attributes related to the Static Nexthop
        # configuration
        self.config_attrs = []
        self.materialized = False
        # Attribute dictionary used to manage the original data
        # obtained from the GET
        self.__original_attributes = {}
        # Set arguments needed for correct creation
        utils.set_creation_attrs(self, **kwargs)

        # Attribute used to know if object was changed recently
        self.__modified = False
Esempio n. 5
0
    def __init__(self, session, instance_tag, parent_vrf, uri=None, **kwargs):

        self.session = session
        # Assign ID
        self.instance_tag = instance_tag
        # Assign parent Vrf object
        self.__set_vrf(parent_vrf)
        self._uri = uri
        # List used to determine attributes related to the OSPF
        # configuration
        self.config_attrs = []
        self.materialized = False
        # Attribute dictionary used to manage the original data
        # obtained from the GET
        self.__original_attributes = {}
        # Set arguments needed for correct creation
        utils.set_creation_attrs(self, **kwargs)
        # Use to manage Areas
        self.areas = []
        # Attribute used to know if object was changed recently
        self.__modified = False
Esempio n. 6
0
    def __init__(self, session, prefix, parent_vrf, uri=None, **kwargs):

        self.session = session
        # Assign IP
        self.__set_name(prefix)
        # Assign parent Vrf object
        self.__set_vrf(parent_vrf)
        self._uri = uri
        # List used to determine attributes related to the Static Route
        # configuration
        self.config_attrs = []
        self.materialized = False
        # Attribute dictionary used to manage the original data
        # obtained from the GET
        self.__original_attributes = {}
        # Set arguments needed for correct creation
        utils.set_creation_attrs(self, **kwargs)
        # Use to manage Ospf routers
        self.static_nexthops = []

        # Attribute used to know if object was changed recently
        self.__modified = False
Esempio n. 7
0
    def __init__(self, session, asn: int, parent_vrf, uri=None, **kwargs):

        self.session = session
        # Assign id
        self.asn = asn
        # Assign parent Vrf object
        self.__set_vrf(parent_vrf)
        self._uri = uri
        # List used to determine attributes related to the BGP configuration
        self.config_attrs = []
        self.materialized = False
        # Attribute dictionary used to manage the original data
        # obtained from the GET
        self.__original_attributes = {}
        # Set arguments needed for correct creation
        utils.set_creation_attrs(self, **kwargs)
        # Use to manage BGP Neighbors
        self.bgp_neighbors = []
        # Use to manage Aggregate Addresses
        self.aggregate_addresses = []
        # Attribute used to know if object was changed recently
        self.__modified = False
Esempio n. 8
0
    def __init__(self, session, name, uri=None, **kwargs):

        self.session = session
        self._uri = uri
        self.name = name
        # List used to determine attributes related to the VRF configuration
        self.config_attrs = []
        self.materialized = False
        # Attribute dictionary used to manage the original data
        # obtained from the GET
        self.__original_attributes = {}
        # Set arguments needed for correct creation
        utils.set_creation_attrs(self, **kwargs)

        # Use to manage BGP Routers
        self.bgp_routers = []
        # Use to manage Vrf Address Families
        self.address_families = []
        # Use to manage OSPF Routers
        self.ospf_routers = []
        # Use to manage Static Routes
        self.static_routes = []
        # Attribute used to know if object was changed recently
        self.__modified = False
Esempio n. 9
0
    def __init__(self,
                 session,
                 sequence_number,
                 parent_acl,
                 uri=None,
                 **kwargs):

        self.session = session
        # Assign ID
        self.sequence_number = sequence_number
        # Assign parent Acl object
        self.__set_acl(parent_acl)
        self._uri = uri
        # List used to determine attributes related to the acl_entry
        # configuration
        self.config_attrs = []
        self.materialized = False
        # Attribute dictionary used to manage the original data
        # obtained from the GET
        self.__original_attributes = {}
        # Set arguments needed for correct creation
        utils.set_creation_attrs(self, **kwargs)
        # Attribute used to know if object was changed recently
        self.__modified = False
Esempio n. 10
0
    def __init__(self,
                 session,
                 interface_name,
                 parent_ospf_area,
                 uri=None,
                 **kwargs):

        self.session = session
        # Assign ID
        self.interface_name = interface_name
        # Assign parent OspfArea object
        self.__set_ospf_area(parent_ospf_area)
        self._uri = uri
        # List used to determine attributes related to the OSPF Interface
        # configuration
        self.config_attrs = []
        self.materialized = False
        # Attribute dictionary used to manage the original data
        # obtained from the GET
        self.__original_attributes = {}
        # Set arguments needed for correct creation
        utils.set_creation_attrs(self, **kwargs)
        # Attribute used to know if object was changed recently
        self.__modified = False
Esempio n. 11
0
    def __init__(self, session, name, uri=None, **kwargs):
        self.session = session
        self._uri = None

        # List used to determine attributes related to the port configuration
        self.config_attrs = []
        # List used to determine attributes related to the interface
        # configuration
        self.config_attrs_int = []
        self.materialized = False

        # Attribute dictionary used to manage the original data
        # obtained from the GET
        self.__original_attributes_int = {}
        self.__original_attributes_port = {}

        # Set name, percents name and determine if Interface is a LAG
        self.__set_name(name)

        # List of previous interfaces before update
        # used to verify if a interface is deleted from lag
        self.__prev_interfaces = []

        # Use to manage IPv6 addresses
        self.ip6_addresses = []

        # Type required for configuration
        self.type = None
        # Set type
        self.__set_type()

        # Check if data should be added to object
        if self.__is_special_type:
            utils.set_creation_attrs(self, **kwargs)
        # Attribute used to know if object was changed recently
        self.__modified = False