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 @@
# 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 @@
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 @@
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 @@
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")