Module connect

connect

  • License: Inmanta EULA

  • Version: 2.6.4

Typedefs

typedef connect::backend_type
  • Base type string

  • Type constraint (self in ['LDP', 'EVPN'])

typedef connect::connection_type
  • Base type string

  • Type constraint (self in ['POINT_TO_POINT', 'MULTIPOINT'])

typedef connect::services::user_network_interface::encapsulation_type
  • Base type string

  • Type constraint (self in ['untagged', 'dot1q', 'qinq'])

typedef connect::evc_id
  • Base type std::ascii_word

  • Type constraint ((std::length(self) >= 1) and (std::length(self) <= 45))

typedef connect::vlan_id_list_type
  • Base type string

  • Type constraint (self in ['LIST', 'ALL', 'UNTAGGED'])

typedef connect::vlan_id_type
  • Base type int

  • Type constraint std::validate_type('pydantic.conint',self,{'ge': 1, 'le': 4094})

typedef connect::constraints::service_name_t
  • Base type string

  • Type constraint (self in ['carrierEthernetEvc', 'DirectInternetAccess'])

typedef connect::infra::device_kind_t
  • Base type string

  • Type constraint (self in ['nokia-sros', 'cisco-xe', 'cisco-xr', 'juniper-mx'])

typedef connect::services::direct_internet_access::routing_protocol_t
  • Base type string

  • Type constraint (self in ['static', 'bgp'])

typedef connect::services::l2_connect::vlan_tag_type
  • Base type string

  • Type constraint /^((\d+)|[*])([.]((\d+)|[*]))?$/

typedef connect::services::user_network_interface::lag_id_type
  • Base type string

  • Type constraint /^((\d+)|auto)$/

Entities

entity connect::CarrierEthernetEvc

Parents: connect::CarrierEthernetService, lsm::ServiceBase

An EVC is an association of two or more EVC End Points (EVC EPs). Reference MEF 10.4 Section 7.8 Ethernet Virtual Connection, EVC End Point and EVC EP Map Service Attribute.

attribute connect::evc_id identifier

Used to identify an EVC within the SP Network. Reference MEF 10.4 Section 8.1 EVC ID Service Attribute.

attribute lsm::attribute_modifier identifier__modifier='rw'
attribute std::positive_int? service_id=null
attribute lsm::attribute_modifier service_id__modifier='r'
relation connect::CarrierEthernetEvcEndPoint evcEndPoints [2:*]

Pointer to EvcEndPoint.

other end: connect::CarrierEthernetEvcEndPoint._carrierEthernetEvc [1]

relation std::Resource shared_network_resources [0:*]

Relation holding network resources that are shared between multiple services

relation std::Resource service_network_resources [0:*]

Relation holding network resources that are only used by this service

relation connect::Ext_networkBackend ext_networkBackend [1]

other end: connect::Ext_networkBackend._parent_service [1]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity connect::CarrierEthernetEvcEndPoint

Parents: lsm::EmbeddedEntity, lsm::ServiceBase

An EvcEndPoint is a construct at a UNI that selects a subset of the Service Frames that pass over the UNI.An EvcEndPoint represents the logical attachment of an Evc to a UNI. Reference MEF 10.4 Section 10 EVC EP Service Attributes.

attribute connect::evc_id identifier

A string that is used to allow the Subscriber and Service Provider to uniquely identify the EvcEndPoint for operations purposes. Reference MEF 10.4 Section 10.1 EVC EP ID Service Attribute.

attribute lsm::attribute_modifier identifier__modifier='rw'
attribute dict? allocated_uni=null

A dictionary holding the allocated values of the endpoint uni.

attribute lsm::attribute_modifier allocated_uni__modifier='r'
relation connect::CarrierEthernetEvc _carrierEthernetEvc [1]

Pointer to EvcEndPoint.

other end: connect::CarrierEthernetEvc.evcEndPoints [2:*]

relation connect::CarrierEthernetEvcEndPoint _peer [0:1]

other end: connect::CarrierEthernetEvcEndPoint._peer [0:1]

relation connect::EgressBwpFlow egressBandwidthProfilePerEndPoint [0:*]

Attribute used to limit the rate of all Egress Service Frames mapped to an EVC EP at a UNI. Reference MEF 10.4 Section 10.10 EVC EP Egress Bandwidth Profile Service Attribute.

other end: connect::EgressBwpFlow._endpoint [1]

relation connect::infra::UserNetworkInterface _uni [1]
relation connect::VlanIdListOrUntag evcEndPointMap [1]

other end: connect::VlanIdListOrUntag._endpoint [1]

relation connect::CarrierEthernetSubscriberUniRef carrierEthernetSubscriberUni [1]
relation connect::CarrierEthernetEvcEndPointProvider providers [0:*]

The different part of the vpn that should be configured for this endpoint

other end: connect::CarrierEthernetEvcEndPointProvider._parent [1]

relation std::Resource endpoint_network_resources [0:*]

Relation holding network resources that are only used by this endpoint

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity connect::CarrierEthernetEvcEndPointProvider

Parents: std::Entity

Base entity for other entities for VPNs

attribute string backend_type

The type of backend to use for this endpoint

attribute bool multi_homed

Whether the side of the service this provider is on is multi-homed.

attribute bool local_switching

Whether the router this provider is on also has the other side of the circuit attached to it.

attribute bool first_endpoint

Whether this provider is on the side that we consider to be the first.

attribute int local_tag

The local eth tag.

attribute int remote_tag

The remote eth tag.

attribute int? mep_id

The identifier for the mep on this provider. Or null if eth-cfm configuration is not enabled.

attribute string? mep_mac_address

The mac address for the local mep of this provider. Or null if eth-cfm configuration is not enabled.

attribute bool purge_resources

Whether the provider should cleanup the resources it manages.

attribute bool own_service=false

Whether this provider can consider it owns the configuration of this service on the device. This means that it can freely create/delete any part of the service that might be shared between multiple providers of this service. This should always be true when active_service is true.

attribute bool active_service=false

Whether this provider is part of the service current desired state, as defined in the active_attributes of the service.

relation connect::CarrierEthernetEvcEndPoint _parent [1]

The different part of the vpn that should be configured for this endpoint

other end: connect::CarrierEthernetEvcEndPoint.providers [0:*]

relation connect::infra::Port port [1]

The port this part of the vpn should be configured on

relation connect::CarrierEthernetEvcEndPointProvider peer_providers [0:*]

The providers attached to the peer of our endpoint. We only consider there the “relevant” providers. The relevant providers are those who activaly deploy the configuration of the service (in opposition to some cleanup helpers that might have been instantiated for endpoint migration.)

relation netbox::Credentials _netbox_credentials [0:1]
relation netbox::resources::Site _netbox_site [0:1]
relation netbox::resources::Device _netbox_device [0:1]
relation netbox::resources::Interface _netbox_main_interface [0:1]
relation netbox::resources::Interface _netbox_interface [0:1]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity connect::CarrierEthernetEvcService

Parents: connect::CarrierEthernetEvc, lsm::ServiceEntity

The following implements statements select implementations for this entity:

entity connect::CarrierEthernetService

Parents: std::Entity

attribute connect::connection_type connectionType
attribute lsm::attribute_modifier connectionType__modifier='rw'
entity connect::CarrierEthernetSubscriberUniRef

Parents: lsm::EmbeddedEntity

attribute string href

The following implements statements select implementations for this entity:

entity connect::EgressBwpFlow

Parents: lsm::EmbeddedEntity

Bandwidth Profile for egress interfaces that support the tuple set of cir, cirMax, rank and envelope.

attribute std::positive_int cir

Attribute represents Committed Information Rate. When added to unused committed bandwidth provided from higher-ranked Bandwidth Profile Flows (depending on the value of CF for the higher-ranked Bandwidth Profile Flows), limits the average rate in bits per second at which Service Frames for this Bandwidth Profile Flow can be declared Green.

attribute lsm::attribute_modifier cir__modifier='rw'
relation connect::CarrierEthernetEvcEndPoint _endpoint [1]

Attribute used to limit the rate of all Egress Service Frames mapped to an EVC EP at a UNI. Reference MEF 10.4 Section 10.10 EVC EP Egress Bandwidth Profile Service Attribute.

other end: connect::CarrierEthernetEvcEndPoint.egressBandwidthProfilePerEndPoint [0:*]

The following implements statements select implementations for this entity:

entity connect::Ext_networkBackend

Parents: lsm::EmbeddedEntity

The entity represents network backend

attribute connect::backend_type? type=null

Can be LDP or EVPN

attribute string _selected_type
relation connect::CarrierEthernetEvc _parent_service [1]

other end: connect::CarrierEthernetEvc.ext_networkBackend [1]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity connect::ExternalWait

Parents: std::PurgeableResource

Dummy resource used to keep a service in a state that would normally be transient. It is always creating ‘skipped’ resource.

attribute string name_or_id

Name for resource identification

attribute string agent_name
attribute bool send_event=true
attribute bool purge_on_delete=false

The following implements statements select implementations for this entity:

entity connect::VlanId

Parents: lsm::EmbeddedEntity

Data type with single attribute, vlanId which is defined as a PostiveInteger. Value 1 to 4094. Ref-erence MEF 10.4 Section 10.4 EVC EP Map Service Attribute and MEF 26.2 Section 14.9 Opera-tor UNI Default CE-VLAN ID Service Attribute.

attribute connect::vlan_id_type vlanId

The vlan id to match on this endpoint.

attribute connect::vlan_id_type? ext_innerVlanId=null

A second vlan tag to match on this endpoint.

relation connect::VlanIdListOrUntag _vlanList [1]

There is a constraint on this relation: constraints::check_vlan_id_number raise an exception if we don’t have exactly one VlandId in this relation. We do it like this to match the spec of the northbound api. (This element should be a list, not a single object)

other end: connect::VlanIdListOrUntag.vlanIdList [0:*]

The following implements statements select implementations for this entity:

entity connect::VlanIdListOrUntag

Parents: lsm::EmbeddedEntity

VLAN ID types, ALL for all VLAN IDs, LIST for a list of VLAN IDs, EXCEPT for all VLAN IDs except the listed, UNTAGGED to indicate that untagged and priority-tagged frames are mapped to this end point. Reference MEF 10.4 Section 10.4 EVC EP Map Service Attribute.

attribute connect::vlan_id_list_type type
attribute connect::encapsulation_type? ext_encapsulation=null

The type of encapsulation to configure for this interface. If set to null, picks dot1q of qinq depending on the other attributes: - type == ‘ALL’ –> dot1q - type == ‘LIST’ –> qinq The value is ignored when type == ‘UNTAGGED’

relation connect::CarrierEthernetEvcEndPoint _endpoint [1]

other end: connect::CarrierEthernetEvcEndPoint.evcEndPointMap [1]

relation connect::VlanId vlanIdList [0:*]

There is a constraint on this relation: constraints::check_vlan_id_number raise an exception if we don’t have exactly one VlandId in this relation. We do it like this to match the spec of the northbound api. (This element should be a list, not a single object)

other end: connect::VlanId._vlanList [1]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity connect::constraints::ServiceSupportedDeviceKindsHolder

Parents: std::Entity

Entity dedicated for each service to store supported device kinds

To register a new supported device kind, the model should attach one more instance of SupportedDeviceKind entity to the relation supported_device_kinds of this entity. All the supported device kinds names can be accessed in the kinds attribute of this entity.

attribute connect::constraints::service_name_t service_name
attribute connect::infra::device_kind_t[] kinds
relation connect::constraints::SupportedDeviceKind supported_device_kinds [0:*]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity connect::constraints::SupportedDeviceKind

Parents: std::Entity

This entity can be used to register a new supported vendor kind. It should be instanciated in the top level sub-module which adds support for this kind and be attached to the supported kind holder defined above.

..code-block:

holder = SupportedDeviceKindsHolder()
holder.supported_device_kinds += SupportedDeviceKind(name='Nokia')
attribute string name

The following implements statements select implementations for this entity:

entity connect::infra::Device

Parents: std::Entity

A managed device reachable and configurable in the infra.

attribute std::ipv4_address mgmt_ip

The mgmt ip to which the orchestrator can reach the device

attribute std::port mgmt_port

The mgmt port to which the orchestrator can reach the device

attribute string vendor

The vendor of the device

attribute string model

The model of the device

attribute string os

The operating system of the device

attribute string version

The version of the device

attribute string username_env

The name of the environment variable containing the username that should be used to connect to the device

attribute string password_env

The name of the environment variable containing the password that should be used to connect to the device

attribute connect::infra::device_kind_t _kind

An attribute that should not be provided by the user, it shows which kind of device this instance is belonging to. This is later used to see if a specific device is supported by the project using the connect module.

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity connect::infra::NetworkElement

Parents: std::Entity

This entity models the inventory data of a Network Equimpent (NE). The NE is the physical equipment of the Service Provider.

attribute string id

The identifier of the network equipment

attribute string name

The name of the network equipment

attribute std::ipv4_address router_ip

The network equipment ip address

relation connect::infra::Device device [1]

The managed device the network element is build upon

relation connect::infra::Port ports [0:*]

The network element to which this port is attached

other end: connect::infra::Port.network_element [1]

The following implements statements select implementations for this entity:

entity connect::infra::Port

Parents: std::Entity

attribute string id

An id of a port.

attribute string name

A name of a port.

relation connect::infra::NetworkElement network_element [1]

The network element to which this port is attached

other end: connect::infra::NetworkElement.ports [0:*]

The following implements statements select implementations for this entity:

entity connect::infra::UserNetworkInterface

Parents: std::Entity

This entity models the inventory data of a User Network Interface (UNI). The UNI is the physical demarcation point between the responsibility of the Subscriber (UNI-C, the Customer Edge or CE) and the responsibility of the Service Provider (UNI-N).

attribute string id

The value of the Subscriber UNI ID Service Attribute is a string that is used to allow the Subscriber and Service Provider to uniquely identify the UNI for operations purposes.

attribute int? lag_id=null
attribute string? es_id=null
attribute string? es_name=null
relation connect::infra::Port ports [0:*]

The ports this uni is composed of

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity connect::inventory::netbox::l2_connect::NetboxInterface

Parents: netbox::resources::Interface

L2connect interface has a netbox subinterface resource that requires the parent interface from the uni service. However they are not in same resource set so they cannot depend on each other. This entity resolves this issue by not selecting netbox::resources::interface_parent implementation. One limitation is that we loose the dependency at the resource level, which means the parent interface may be deployed after the subinterface during repair.

The following implements statements select implementations for this entity:

entity connect::main::ServiceBuilder

Parents: std::Entity

This entity allow to build all the connect services.

TODO: Once it has been defined, it sould also get an additonal relation,

holding the configuration of the network.

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity connect::services::direct_internet_access::DirectInternetAccess

Parents: lsm::ServiceBase

Direct Internet Access service

This service creates a VRF for a customer. Routes to the Internet and prefixes assigned to the customer (prefixes attribute) are leaked between default and customer’s VRFs.

attribute string identifier

Unique identifier of the service.

attribute lsm::attribute_modifier identifier__modifier='rw'
attribute connect::services::direct_internet_access::routing_protocol_t routing_protocol

Routing protocol used to exchange route information with customer.

attribute lsm::attribute_modifier routing_protocol__modifier='rw'
attribute std::ipv_any_network[] prefixes

List of prefixes assigned to customer.

attribute lsm::attribute_modifier prefixes__modifier='rw+'
attribute int? bgp_remote_as=null

Customer’s BGP AS number

attribute lsm::attribute_modifier bgp_remote_as__modifier='rw'
relation connect::services::direct_internet_access::DirectInternetAccessEndPoint endpoints [1:*]

other end: connect::services::direct_internet_access::DirectInternetAccessEndPoint._dia [1]

The following implements statements select implementations for this entity:

  • constraint true

entity connect::services::direct_internet_access::DirectInternetAccessEndPoint

Parents: lsm::EmbeddedEntity

Direct Internet Access Endpoint

attribute string identifier

Identifier of the endpoint.

attribute lsm::attribute_modifier identifier__modifier='rw'
attribute connect::vlan_id_type vlan_id

VLAN id used for communication with customer.

attribute lsm::attribute_modifier vlan_id__modifier='rw'
attribute std::ipv_any_network? p2p_network=null

P2P network used on provider-customer edge. The first IP is assigned on provider’s device, second one should be used by customer.

attribute lsm::attribute_modifier p2p_network__modifier='r'
attribute int bfd_interval=0

BFD interval in ms. Set to 0 to disable BFD.

attribute lsm::attribute_modifier bfd_interval__modifier='rw+'
relation connect::services::direct_internet_access::DirectInternetAccess _dia [1]

other end: connect::services::direct_internet_access::DirectInternetAccess.endpoints [1:*]

relation connect::services::user_network_interface::UserNetworkInterface uni [1]

An instance of User Network Interface service that identifies physical access port

other end: connect::services::user_network_interface::UserNetworkInterface._dia_endpoint [0:*]

relation connect::infra::UserNetworkInterface _uni [1]
relation connect::services::direct_internet_access::DirectInternetAccessEndPointProvider providers [0:*]

other end: connect::services::direct_internet_access::DirectInternetAccessEndPointProvider._parent [1]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity connect::services::direct_internet_access::DirectInternetAccessEndPointProvider

Parents: std::Entity

Base entity for vendor-specific implementations of Direct Internet Access service

attribute bool purge_resources
relation connect::services::direct_internet_access::DirectInternetAccessEndPoint _parent [1]

other end: connect::services::direct_internet_access::DirectInternetAccessEndPoint.providers [0:*]

relation connect::infra::Port port [1]
relation connect::services::direct_internet_access::DirectInternetAccessEndPointProvider peer_providers [0:*]

The following implements statements select implementations for this entity:

entity connect::services::direct_internet_access::DirectInternetAccessService

Parents: connect::services::direct_internet_access::DirectInternetAccess, lsm::ServiceEntity

This entity extends the DirectInternetAccess entity, and exposes it to the lsm api.

The following implements statements select implementations for this entity:

  • constraint true

entity connect::services::l2_connect::Connection

Parents: lsm::ServiceBase

This entity represents an l2 connection in between two endpoints (each referencing a uni). The entity can be instanciated via the lsm api (using the ConnectionService superclass) or in the model, using this entity.

attribute connect::evc_id identifier

The unique identifier of the service.

attribute lsm::attribute_modifier identifier__modifier='rw'
attribute std::positive_int? service_id=null

A unique service id, automatically allocated.

attribute lsm::attribute_modifier service_id__modifier='r'
attribute connect::connection_type connection_type

The type of connection the service should deploy.

attribute lsm::attribute_modifier connection_type__modifier='rw'
attribute std::positive_int bandwidth

The bandwidth (kbps) that should be configured for the connection between each endpoints.

attribute lsm::attribute_modifier bandwidth__modifier='rw+'
attribute connect::backend_type backend

The backend technology to use to establish the connection.

attribute lsm::attribute_modifier backend__modifier='rw+'
attribute string documentation=''
attribute lsm::attribute_modifier documentation__modifier='r'
dict connect::services::l2_connect::Connection.documentation__annotations={'web_presentation': 'documentation', 'web_title': 'Topology', 'web_icon': 'FaNetworkWired', 'web_content_type': 'text/markdown'}
relation connect::services::l2_connect::Endpoint endpoints [2:*]

The set of endpoints that compose the connection.

other end: connect::services::l2_connect::Endpoint._connection [1]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity connect::services::l2_connect::ConnectionService

Parents: connect::services::l2_connect::Connection, lsm::ServiceEntity

This entity extends the Connection entity, and exposes it to the lsm api.

The following implements statements select implementations for this entity:

  • constraint true

entity connect::services::l2_connect::Endpoint

Parents: lsm::EmbeddedEntity, lsm::ServiceBase

attribute connect::evc_id identifier

The unique identifier of this endpoint amonst the other endpoints of a connection.

attribute lsm::attribute_modifier identifier__modifier='rw'
attribute connect::services::l2_connect::vlan_tag_type? vlan

The vlan that should be configured on the port of the previously mentioned equipment. The supported values are: - null: untagged traffic - : any dot1q traffic - X: dot1q traffic with given outer (X) vlan - *.: any qinq traffic - X.*: any qinq traffic within given outer (X) vlan - X.Y: qinq traffic with given outer (X) and inner (Y) vlans equipment.

attribute lsm::attribute_modifier vlan__modifier='rw'
attribute string[]? __lsm_key_attributes=List()
relation connect::services::l2_connect::Connection _connection [1]

The set of endpoints that compose the connection.

other end: connect::services::l2_connect::Connection.endpoints [2:*]

relation connect::services::user_network_interface::UserNetworkInterface uni [1]

The user network equipment service that allows us to find the device and port that should be configured for this end of the connection.

relation netbox::resources::Interface _netbox_interfaces [1:*]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity connect::services::user_network_interface::Port

Parents: lsm::EmbeddedEntity

attribute string port_name

The name of the port, used as identifier and vendor specific.

attribute lsm::attribute_modifier port_name__modifier='rw'
attribute int? port_id=null

A unique numerical identifier for the port.

attribute lsm::attribute_modifier port_id__modifier='r'
attribute string device_name

Reference of the device, usually the name, on which the port is located.

attribute lsm::attribute_modifier device_name__modifier='rw'
attribute dict? network_element=null

Information about the device where the port is located. Retrieved via allocation using device_name.

attribute lsm::attribute_modifier network_element__modifier='r'
relation connect::services::user_network_interface::UserNetworkInterface _uni [1]

List of port references, minimum one, room for extension with LAG (Link aggregation).

other end: connect::services::user_network_interface::UserNetworkInterface.ports [1:*]

relation netbox::resources::Site _netbox_site [1]
relation netbox::resources::Device _netbox_device [1]
relation netbox::resources::Interface _netbox_main_interface [1]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity connect::services::user_network_interface::UniDetails

Parents: lsm::EmbeddedEntity

attribute connect::services::user_network_interface::lag_id_type lag_id='auto'

The id of the lag, if set to auto it is allocated and the value is saved in allocated_lag_id attribute. For single-homed unis, the allocated value will be -1, which will be recognized internally as “not a lag-id”, for multi-homed unis, the allocated value will be picked from the lag range specified in the config.

attribute lsm::attribute_modifier lag_id__modifier='rw'
attribute int? allocated_lag_id=null

Lag id retrieved via allocation.

attribute lsm::attribute_modifier allocated_lag_id__modifier='r'
attribute string? es_id=null

Ethernet segment id, provided by user.

attribute lsm::attribute_modifier es_id__modifier='rw'
relation connect::services::user_network_interface::UserNetworkInterface _uni [1]

Details about the uni LAG and ethernet segment, relevant only in case of multi-homed Uni.

other end: connect::services::user_network_interface::UserNetworkInterface.details [1]

The following implements statements select implementations for this entity:

  • constraint true

entity connect::services::user_network_interface::UserNetworkInterface

Parents: lsm::ServiceBase

attribute string name

The name of the network interface, used as identifier.

attribute lsm::attribute_modifier name__modifier='rw'
attribute int mtu

Maximum transmission size of the interface.

attribute lsm::attribute_modifier mtu__modifier='rw+'
attribute connect::services::user_network_interface::encapsulation_type encapsulation

Type of encapsulation supported.

attribute lsm::attribute_modifier encapsulation__modifier='rw+'
attribute string documentation=''
attribute lsm::attribute_modifier documentation__modifier='r'
dict connect::services::user_network_interface::UserNetworkInterface.documentation__annotations={'web_presentation': 'documentation', 'web_title': 'Topology', 'web_icon': 'FaNetworkWired', 'web_content_type': 'text/markdown'}
relation connect::services::user_network_interface::Port ports [1:*]

List of port references, minimum one, room for extension with LAG (Link aggregation).

other end: connect::services::user_network_interface::Port._uni [1]

relation connect::services::user_network_interface::UniDetails details [1]

Details about the uni LAG and ethernet segment, relevant only in case of multi-homed Uni.

other end: connect::services::user_network_interface::UniDetails._uni [1]

relation connect::infra::UserNetworkInterface _infra_uni [1]

Infrastructure uni entity.

relation connect::services::direct_internet_access::DirectInternetAccessEndPoint _dia_endpoint [0:*]

An instance of User Network Interface service that identifies physical access port

other end: connect::services::direct_internet_access::DirectInternetAccessEndPoint.uni [1]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity connect::services::user_network_interface::UserNetworkInterfaceService

Parents: connect::services::user_network_interface::UserNetworkInterface, lsm::ServiceEntity

This entity extends the UserNetworkInterface entity, and exposes it to the lsm api.

The following implements statements select implementations for this entity:

  • constraint true

entity connect::used_values_aggregator::ServiceUsedValues

Parents: std::Entity

Contains the necessary attributes to retrieve all the used_values of a specific service type attribute.

attribute string attributes_path

The path of the attribute where to check the used_values.

relation lsm::ServiceEntityBindingV2 binding [1]

Binding of the service.

relation connect::used_values_aggregator::UsedValuesAggregator aggregator [1]

The different used_values of the service, one per service type.

other end: connect::used_values_aggregator::UsedValuesAggregator.service_used_values [0:*]

The following implements statements select implementations for this entity:

entity connect::used_values_aggregator::UsedValuesAggregator

Parents: std::Entity

Aggregate all the used_values of a specific attribute across different service types. The main used case is when the allocation of a service attribute is also constrained by the attribute from another service.

relation connect::used_values_aggregator::ServiceUsedValues service_used_values [0:*]

The different used_values of the service, one per service type.

other end: connect::used_values_aggregator::ServiceUsedValues.aggregator [1]

The following implements statements select implementations for this entity:

entity connect::vendors::YangEnvCredentials

Parents: std::Entity

https://code.inmanta.com/solutions/modules/yang/-/issues/107

The yang credentials doesn’t have any index, which means that if we create multiple idetncial devices (which have an index) they will aggregate into one entity, but the credentials won’t.

This entity is a workaround, its constructor can be called as much as needed, it will be contracted with index on username and password.

attribute string username_env_var

The env var on the agent that contains the credentials to log into the device.

attribute string password_env_var

The env var on the agent that contains the credentials to log into the device.

relation yang::Credentials credentials [1]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity connect::vendors::cisco::xe::CiscoEndPointProvider

Parents: connect::CarrierEthernetEvcEndPointProvider

relation cisco_xe::NetconfDevice _device [1]
relation cisco_xe::Resource _resource [1]
relation cisco_xe::native::policy::PolicyMap _policy_map [0:1]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity connect::vendors::cisco::xr::CiscoEndPointProvider

Parents: connect::CarrierEthernetEvcEndPointProvider

relation cisco_xr::NetconfDevice _device [1]
relation cisco_xr::Resource _resource [1]
relation cisco_xr::InterfaceConfiguration _interface [1]
relation cisco_xr::l2vpn::database::xconnect_group::P2pXconnect _xconnect [0:1]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity connect::vendors::juniper::DIAEndPointProvider

Parents: connect::services::direct_internet_access::DirectInternetAccessEndPointProvider

attribute std::ipv_any_network p2p_network

IP network for P2P connection

attribute std::ipv_any_interface p2p_pe_interface

IP address with prefixlen of provider P2P interface

attribute std::ipv_any_address p2p_ce_address

IP address of customer in P2P network

attribute string vrf_name

Routing instance name

relation juniper_mx::NetconfDevice _device [1]
relation juniper_mx::Resource _resource [1]
relation juniper_mx::routing_instances::Instance _routing_instance [1]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity connect::vendors::juniper::JuniperEndPointProvider

Parents: connect::CarrierEthernetEvcEndPointProvider

attribute string interface_name

The name of the interface on the routing instance

relation juniper_mx::NetconfDevice _device [1]
relation juniper_mx::Resource _resource [1]
relation juniper_mx::interfaces::Interface _interface [1]
relation juniper_mx::interfaces::interface::Unit _unit [0:1]
relation juniper_mx::firewall::Policer _policer [1]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity connect::vendors::nokia::NokiaEndPointProvider

Parents: connect::CarrierEthernetEvcEndPointProvider

relation nokia_sros::NetconfDevice _device [1]
relation nokia_sros::Resource _resource [1]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

  • constraint true

entity connect::vendors::nokia::NokiaMPEndPointProvider

Parents: connect::vendors::nokia::NokiaEndPointProvider

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity connect::vendors::nokia::NokiaP2PEndPointProvider

Parents: connect::vendors::nokia::NokiaEndPointProvider

attribute bool configure_endpoint_attribute
relation nokia_sros::service::Epipe _epipe [0:1]
relation nokia_sros::service::epipe::Sap _sap [0:1]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

entity connect::vendors::nokia::YangEnvCredentials

Parents: std::Entity

https://code.inmanta.com/solutions/modules/yang/-/issues/107

The yang credentials doesn’t have any index, which means that if we create multiple idetncial devices (which have an index) they will aggregate into one entity, but the credentials won’t.

This entity is a workaround, its constructor can be called as much as needed, it will be contracted with index on username and password.

This is a duplicated of connect::vendors::YangEnvCredentials. We can’t drop it as it is a breaking change, to be done in next major version bump. https://code.inmanta.com/solutions/modules/connect/-/issues/151

attribute string username_env_var

The env var on the agent that contains the credentials to log into the device.

attribute string password_env_var

The env var on the agent that contains the credentials to log into the device.

relation yang::Credentials credentials [1]

The following implementations are defined for this entity:

The following implements statements select implementations for this entity:

Implementations

implementation connect::backendTypeSelection
implementation connect::carrierEthernetEvcEndPoint
implementation connect::carrierEthernetEvc_resource_set
implementation connect::constraints::check_endpoints_number
implementation connect::constraints::check_provider_vendor_support_dia

Ensure any instance of DirectInternetAccess endpoint will be assigned a provider.

implementation connect::constraints::check_provider_vendor_support_evc

Make sure that any instance of a carrier ethernet evc endpoint will be assigned a provider. If it is not the case, we raise a proper exception about it.

implementation connect::constraints::check_vlan_id_number
Per request on this ticket: https://code.inmanta.com/solutions/modules/connect/-/issues/2

> evcEndPointMap with only supported type LIST and the vlanIdList exactly one vlan tag

implementation connect::constraints::gather_supported_device_kinds
implementation connect::infra::resolve_device_kind
implementation connect::infra::constraints::assert_single_uni_port
implementation connect::inventory::netbox::carrier_ethernet_evc::document_netbox_l2vpn

Attach the circuit l2vpn to the interfaces where it terminates.

implementation connect::inventory::netbox::carrier_ethernet_evc::document_netbox_sub_interface

Document the sub interfaces where this endpoint is attached.

implementation connect::inventory::netbox::carrier_ethernet_evc::netbox_credentials

Load and construct the netbox credentials for this provider, but only if this endpoint href references netbox. If it is not the case, set the credentials and all the netbox relations to null.

implementation connect::inventory::netbox::carrier_ethernet_evc::resolve_netbox_network_element

Resolve the device, site and interface that our endpoint is deployed on.

implementation connect::inventory::netbox::l2_connect::document_netbox_l2vpn

Attach the circuit l2vpn to the interfaces where it terminates.

implementation connect::inventory::netbox::l2_connect::document_netbox_sub_interface

Document the sub interfaces where this endpoint is attached.

implementation connect::inventory::netbox::user_network_interface::resolve_netbox_network_element

Resolve the device, site and interface that our endpoint is deployed on.

implementation connect::main::unroll_lsm_services
implementation connect::mock::mock
implementation connect::services::l2_connect::carrierEthernetEvc

Convert our connection to the equivalent CarrierEthernetEvc entity.

implementation connect::services::l2_connect::carrierEthernetEvcEndPoint

Convert our endpoint to the equivalent CarrierEthernetEvcEndpoint entity.

implementation connect::services::l2_connect::validate_vlan

Validate that vlan has correct format depending on the uni encapsulation

implementation connect::services::user_network_interface::create_infra

Create the connect::infra::UserNetworkInterface containing all the information about this uni, and attach it to our service.

implementation connect::vendors::eth_cfm

Compute the mep id and mac address for this provider.

implementation connect::vendors::resolve_peer_providers

Get all the providers which are part of the main configuration of the service, on the other side of the service with respect to our endpoint.

implementation connect::vendors::resolve_provider_attributes
implementation connect::vendors::yang_credentials

Attach the yang::Credentials entity to our workaround entity;

implementation connect::vendors::cisco::xe::cisco_device

Load the cisco device for this endpoint. The device entity might be reused by different endpoints on the same device. Also create the resource that will contain all the service specific configuration for this device.

implementation connect::vendors::cisco::xe::device_global_interface

As soon as we start managing a device in the network, we must make sure that any later configuration we deploy will not change the shared global resources. So we need to already emit the evpn-bgp base config even if no carrier ethernet is deployed on the device yet.

implementation connect::vendors::cisco::xe::endpoint_policymap
implementation connect::vendors::cisco::xe::ldp_xconnect
implementation connect::vendors::cisco::xe::carrier_ethernet_evc::build_point_to_point_providers
implementation connect::vendors::cisco::xr::cisco_device

Load the cisco device for this endpoint. The device entity might be reused by different endpoints on the same device. Also create the resource that will contain all the service specific configuration for this device.

implementation connect::vendors::cisco::xr::device_shared

Configure all the parts of the configuration which are shared between different services, it must be present in the global configuration at all time.

implementation connect::vendors::cisco::xr::eth_cfm

Configure eth_cfm on the service interface.

implementation connect::vendors::cisco::xr::evpn

Configure the evpn for our service.

implementation connect::vendors::cisco::xr::interface_configuration

Configure the vlan sub interface for our port.

implementation connect::vendors::cisco::xr::l2vpn

Configure the l2vpn on the side of our port.

implementation connect::vendors::cisco::xr::ldp

Configure ldp for our service.

implementation connect::vendors::cisco::xr::policies

Configure the bandwidth limitation on the port.

implementation connect::vendors::cisco::xr::carrier_ethernet_evc::build_point_to_point_providers
implementation connect::vendors::juniper::dia_base
implementation connect::vendors::juniper::dia_bgp
implementation connect::vendors::juniper::dia_device
implementation connect::vendors::juniper::dia_fill_common_attributes
implementation connect::vendors::juniper::dia_resource
implementation connect::vendors::juniper::dia_static
implementation connect::vendors::juniper::evpn_juniper
implementation connect::vendors::juniper::interface_unit

Configure the unit for this endpoint provider.

implementation connect::vendors::juniper::juniper_device
implementation connect::vendors::juniper::l2circuit_juniper
implementation connect::vendors::juniper::policer
implementation connect::vendors::juniper::carrier_ethernet_evc::build_providers
implementation connect::vendors::juniper::direct_internet_access::build_providers
implementation connect::vendors::juniper::direct_internet_access::set_resources
implementation connect::vendors::nokia::device_domain

As soon as we start managing a device in the network, we must make sure that any later configuration we deploy will not change the shared global resources. So we need to already emit the eth-cfm resource even if no carrier ethernet is deployed on the device yet.

implementation connect::vendors::nokia::device_evpn_base

As soon as we start managing a device in the network, we must make sure that any later configuration we deploy will not change the shared global resources. So we need to already emit the evpn-bgp base config even if no carrier ethernet is deployed on the device yet.

implementation connect::vendors::nokia::epipe_nokia

Configure the epipe on the device.

implementation connect::vendors::nokia::epipe_nokia_evpn
implementation connect::vendors::nokia::epipe_nokia_ldp
implementation connect::vendors::nokia::epipe_nokia_ldp_sdp

This implementation defines the SDP as an assertion that it exists is consistent for all services. If the SDP does not exist, it will be created by the orchestrator.

implementation connect::vendors::nokia::eth_cfm
implementation connect::vendors::nokia::multi_homing_ethernet_segment_all_active
implementation connect::vendors::nokia::nokia_device

Load the nokia device for this enpoint. This is done for every endpoint. Only the first one creates a new instance, all other instances are verfied to be identical.

implementation connect::vendors::nokia::set_configure_endpoint
implementation connect::vendors::nokia::vpls
implementation connect::vendors::nokia::yang_credentials

Attach the yang::Credentials entity to our workaround entity;

implementation connect::vendors::nokia::carrier_ethernet_evc::build_multipoint_providers
implementation connect::vendors::nokia::carrier_ethernet_evc::build_point_to_point_providers
implementation connect::vendors::nokia::user_network_interface::nokia_interface

Plugins

connect.allocate_dia_p2p_network(service: 'lsm::ServiceEntity', attribute_path: 'string', *, used_values: 'any') 'std::ipv4_network'

Get the first p2p network (/31) from pools defined in config for DirectInternetAccess service.

Parameters:

used_values – A UsedValues object, as defined in inmanta_plugins.lsm.allocators.

connect.cisco_mtu(mtu: 'int', tags_count: 'int') 'int'

Compute the mtu that should be configured for a service on a cisco interface given an expected traffic mtu and depending on the number of tags that ethernet frames have.

Parameters:
  • mtu – The desired mtu, for the ethernet frames content.

  • tags_count – The number of tags that the ethernet frames will have attached to them.

connect.combine_used_values(used_list: 'list') 'any'
connect.determine_mac(end_point: 'connect::CarrierEthernetEvcEndPoint', port: 'infra::Port') 'string'

Calculate the local mac

connect.determine_mep_id(end_point: 'connect::CarrierEthernetEvcEndPoint', port: 'infra::Port') 'int'

Determine the mep_id for a port of an endpoint. The mep_id is the last octet of the ip of the router this port is on, except if this last octet is equal to zero, then the mep_id will be equal to 256. If a port of the other endpoint is also located on this router, then this additional step is applied:

  1. If the endpoint is on side A (its identifier is greater than it’s peer’s one) then return the calculated mep_id of the router.

  2. If the endpoint is on side B (its identifier is smaller than it’s peer’s one) then return the calculated mep_id of the router plus 1000.

If an endpoint has multiple ports on the same router, they will get the same mep_id. The value returned is an integer between 1 and 1256

connect.format(string: 'string', *args: 'any', **kwargs: 'any') 'string'

Format a string using python’s str.format method. Pass all positional and keyworkd arguments to the python function.

Parameters:

string – The format string

connect.generate_l2connect_topology(service: 'connect::services::l2_connect::Connection') 'string'

This plugin is used to generate the topology of the l2connect infra in mermaid using all the information available via the service in the model.

connect.generate_uni_topology(service: 'connect::services::user_network_interface::UserNetworkInterface') 'string'

This plugin is used to generate the topology of the UNI infra in mermaid using all the information available via the service in the model.

connect.get_allocated_lag_id(service: 'lsm::ServiceEntity', attribute_path: 'string', *, lag_id: 'string', n_ports: 'int', range_start: 'int', range_end: 'int', used_values: 'any') 'int'

Return the lag_id if it is specified, otherwise get the first free integer in the given lag_id range. If the lag_id is set to auto and the uni is not multi_home, we don’t allocate it but we return lag_id of -1 to clearly indicate that a valid lag couldn’t be allocated. This allocator contains duplicated logic from lsm allocator get_first_free_integer.

Parameters:
  • lag_id – The lag_id specified by user, if no value specified then it is equal to auto.

  • n_ports – The number of ports the uni service contains.

  • range_start – The lowest value that can be allocated.

  • range_end – The highest value that can be allocated.

  • used_values – A UsedValues object, as defined in inmanta_plugins.lsm.allocators.

connect.get_cisco_policy_rate(bandwidth: 'int') 'dict'

Compute the policy rate to configure on cisco devices for a given bandwidth. The returned value is a dict of two elements. The first one is the rate value and the second the rate unit.

Parameters:

bandwidth – The bandwidth, in kbps, to convert into cisco notation.

connect.get_config() 'dict'

Load the config file from the project and validate it using pydantic. Return it as a dict.

connect.get_network_element(service: 'lsm::ServiceEntity', attribute_path: 'string', *, device_name: 'string') 'dict'

Allocator used to retrieve the network_element of a device in the netbox inventory using the device_name.

connect.get_peer_endpoint(endpoints: 'connect::CarrierEthernetEvcEndPoint[]', endpoint: 'connect::CarrierEthernetEvcEndPoint') 'connect::CarrierEthernetEvcEndPoint'
connect.get_port_id(service: 'lsm::ServiceEntity', attribute_path: 'string', *, device_name: 'string', port_name: 'string') 'int'

Get the id of this port from the netbox inventory.

Parameters:
  • device_name – The name of the device the port is on.

  • port_name – The name of the port we are looking for.

connect.get_provider_ip(providers: 'connect::CarrierEthernetEvcEndPointProvider[]') 'string'
connect.get_provider_ips(providers: 'connect::CarrierEthernetEvcEndPointProvider[]') 'std::ipv4_address[]'
connect.get_the_first_cir(cirs: 'connect::EgressBwpFlow[]') 'connect::EgressBwpFlow?'
connect.get_the_first_vlan(vlans: 'connect::VlanId[]') 'connect::VlanId?'
connect.get_uni_dict(service: 'lsm::ServiceEntity', attribute_path: 'string', *, uniref: 'string') 'dict'

UNI resolver function for AllocatorV3, using decorated functions to resolve UNI reference strings to an object of UserNetworkInterface.

uni_resolver decorator can be used to “register” existence of a resolver in this function. The decorator takes one argument, scheme, which defines for which schemes the resolver should be used. To use custom resolver, its scheme needs to be added to configuration file under main.allowed_uni_resolvers.

connect.gt(a: 'any', b: 'any') 'bool'

Simple python comparison operation

connect.inventory_file() 'string'
connect.kbps_bandwidth(cir: 'int') 'int'

Calculates the bps bandwidth into kbps bandwidth.

Parameters:

bandwidth – Bandwidth in bps.

Returns:

Bandwidth in kbps.

connect.lists_intersection(list_a: 'list', list_b: 'list') 'list'
connect.max_length(original: 'string', max_length: 'int') 'string'

Truncate the string passed in original if it is longer than max_length. The returned string will then be the first max_length characters of the string.

Parameters:
  • original – The string to truncate if too long

  • mex_length – The maximum length the returned string can have

connect.maximum_one_vlan_id_or_raise(vlan_id_list_or_untag: 'connect::VlanIdListOrUntag')
connect.nokia_port_tag(evcEndPointMap: 'connect::VlanIdListOrUntag') 'string?'

This logic is used in the sap_id.j2 template to build the correct sap id based on the vlan tagging that is applied to the port.

connect.port_encapsulation(evcEndPointMap: 'connect::VlanIdListOrUntag') 'connect::encapsulation_type?'

Get the encapsulation type for the given endpoint map. If the encapsulation is specified on the entity, we use this one, otherwise we try to guess it based on the filtering that is defined.

  • type == ‘ALL’ –> dot1q

  • type == ‘LIST’ –> qinq

  • type == ‘UNTAGGED’ –> null

Parameters:

evcEndPointMap – The entity defining the encapsulation to configure on the endpoint.

connect.qinq_mark_top_only(sap_id: 'string') 'bool?'

Compute the value that should be given for the qinq_mark_top_only qos attribute for nokia services, based on the sap id. Check if the vlan tag is of the form X.*, if so returns true, else returns null. cf. https://code.inmanta.com/solutions/bics/bics_ce/-/issues/183

connect.select_backend_type(candidate_backend: 'string?', carrier_ethernet_evc_endpoints: 'connect::CarrierEthernetEvcEndPoint[]') 'string'

Get a candidate backend and verify it is allowed by the configuration. The validated value is returned. If no value (=null) is passed, the default value from the config is chosen.

Parameters:

candidate_backend – The type of backend we consider using

connect.select_port(ports: 'infra::Port[]', port_id: 'string?' = None, port_name: 'string?' = None) 'infra::Port'
Select a port from a list based on the following filter:
  • port_id, the id of the port, if None, any will match

  • port_name, the name of the port, if None, any will match

If multiple ports match, the first one is returned. If no port can be found, a PluginException is raised.

connect.slugify(input: 'string') 'string'

Transform the input string into a valid netbox slug. Characters allowed in slug: - letter - number - underscore - hyphen

Parameters:

input – The input to transform.

connect.string_to_alfanum_with_underscore(input: 'string') 'string'
connect.string_to_dict(input: 'string') 'dict'
connect.unknown_device_kind_error(device: 'infra::Device')
connect.unsupported_device_kind_error(instance_identifier: 'string', device_kind: 'infra::device_kind_t', supported_kinds: 'infra::device_kind_t[]')

Provide information about endpoint where unsupported vendor was detected.

connect.validate_vlan_uniqueness(endpoint: 'connect::services::l2_connect::Endpoint')

Make sure that the vlan used by this endpoint is not used by any other endpoint using the same uni. For this we find all the endpoints deployed on the same uni, in any attribute set, and compare the vlan value to ours.

Parameters:

endpoint – The endpoint that should have the a unique vlan.

Resources

class connect.wait_resource.ExternalWait

Handlers

class connect.wait_resource.ExternalWaitHandler