It receives the endpoints and the necessary details to request
the Layer 2 service.
"""
-import requests
-import uuid
+
import logging
-from osm_ro_plugin.sdnconn import SdnConnectorBase, SdnConnectorError
+import uuid
-"""Check layer where we move it"""
+from osm_ro_plugin.sdnconn import SdnConnectorBase, SdnConnectorError
+import requests
class WimconnectorIETFL2VPN(SdnConnectorBase):
if len(connection_points) < 2:
raise SdnConnectorError("Connections must be of at least 2 endpoints")
- """ First step, create the vpn service """
+ """First step, create the vpn service"""
uuid_l2vpn = str(uuid.uuid4())
vpn_service = {}
vpn_service["vpn-id"] = uuid_l2vpn
http_code=response_service_creation.status_code,
)
- """ Second step, create the connections and vpn attachments """
+ """Second step, create the connections and vpn attachments"""
for connection_point in connection_points:
connection_point_wan_info = self.search_mapp(connection_point)
site_network_access = {}
connection_point["service_endpoint_encapsulation_type"]
== "dot1q"
):
- """ The connection is a VLAN """
+ """The connection is a VLAN"""
connection["encapsulation-type"] = "dot1q-vlan-tagged"
tagged = {}
tagged_interf = {}
if connection_point["service_endpoint_encapsulation_type"] != "none":
if connection_point["service_endpoint_encapsulation_type"] == "dot1q":
- """ The connection is a VLAN """
+ """The connection is a VLAN"""
connection["encapsulation-type"] = "dot1q-vlan-tagged"
tagged = {}
tagged_interf = {}