From: stevenvanrossem Date: Fri, 4 Nov 2016 14:33:28 +0000 (+0100) Subject: fix E-LAN issues X-Git-Tag: v3.1~45^2~37 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=dc3bfd0cab0f29239efc8061b6f43a16484f2ca5;p=osm%2Fvim-emu.git fix E-LAN issues --- diff --git a/src/emuvim/api/sonata/dummygatekeeper.py b/src/emuvim/api/sonata/dummygatekeeper.py index 8a9416c..00201f9 100755 --- a/src/emuvim/api/sonata/dummygatekeeper.py +++ b/src/emuvim/api/sonata/dummygatekeeper.py @@ -227,6 +227,9 @@ class Service(object): # 4b. deploy E-LAN links base = 10 for link in elan_fwd_links: + + elan=[] + # generate lan ip address ip = 1 for intf in link["connection_points_reference"]: @@ -235,6 +238,8 @@ class Service(object): if vnf_id in self.sap_identifiers: src_docker_name = "{0}_{1}".format(vnf_id, intf_name) vnf_id = src_docker_name + else: + src_docker_name = vnf_id vnf_name = vnf_id2vnf_name[vnf_id] LOG.debug( "Setting up E-LAN link. %s(%s:%s) -> %s" % ( @@ -249,6 +254,15 @@ class Service(object): self._vnf_reconfigure_network(vnfi, intf_name, ip_address) # increase for the next ip address on this E-LAN ip += 1 + + # add this vnf and interface to the E-LAN for tagging + network = self.vnfds[vnf_name].get("dc").net # there should be a cleaner way to find the DCNetwork + elan.append({'name':src_docker_name,'interface':intf_name}) + + + # install the VLAN tags for this E-LAN + print(elan) + network.setLAN(elan) # increase the base ip address for the next E-LAN base += 1 diff --git a/src/emuvim/api/sonata/sap_vnfd.yml b/src/emuvim/api/sonata/sap_vnfd.yml old mode 100644 new mode 100755 diff --git a/src/emuvim/examples/sonata_y1_demo_topology_1_w_ls_and_mon_and_sap.py b/src/emuvim/examples/sonata_y1_demo_topology_1_w_ls_and_mon_and_sap.py old mode 100644 new mode 100755 index df7a6ac..b38720e --- a/src/emuvim/examples/sonata_y1_demo_topology_1_w_ls_and_mon_and_sap.py +++ b/src/emuvim/examples/sonata_y1_demo_topology_1_w_ls_and_mon_and_sap.py @@ -46,7 +46,7 @@ logging.basicConfig(level=logging.INFO) def create_topology1(): # create topology - net = DCNetwork(controller=RemoteController, monitor=True, enable_learning=False) + net = DCNetwork(controller=RemoteController, monitor=True, enable_learning=True) dc1 = net.addDatacenter("dc1") dc2 = net.addDatacenter("dc2") s1 = net.addSwitch("s1")