Fix: Enabled SAP and learning switch to test demo. Also clearified some comments...
authorpeusterm <manuel.peuster@uni-paderborn.de>
Tue, 23 Aug 2016 12:02:09 +0000 (14:02 +0200)
committerpeusterm <manuel.peuster@uni-paderborn.de>
Tue, 23 Aug 2016 12:02:09 +0000 (14:02 +0200)
src/emuvim/api/sonata/dummygatekeeper.py
src/emuvim/api/sonata/sap_vnfd.yml
src/emuvim/examples/sonata_y1_demo_topology_1.py

index 7ae3522..766ec73 100755 (executable)
@@ -64,6 +64,7 @@ GK_STANDALONE_MODE = False
 FORCE_PULL = False
 
 # Automatically deploy SAPs (endpoints) of the service as new containers
+# Attention: This is not a configuration switch but a global variable! Don't change its default value.
 DEPLOY_SAP = False
 
 class Gatekeeper(object):
@@ -238,8 +239,8 @@ class Service(object):
 
                 if vnf_name in self.vnfds:
                     # re-configure the VNFs IP assignment and ensure that a new subnet is used for each E-LAN
-                    # E-LAN relies on the learning switch capability of the infrastructure switch in dockernet,
-                    # so no explicit chaining is necessary
+                    # E-LAN relies on the learning switch capability of Ryu which has to be turned on in the topology
+                    # (DCNetwork(controller=RemoteController, enable_learning=True)), so no explicit chaining is necessary.
                     vnfi = self._get_vnf_instance(instance_uuid, vnf_name)
                     if vnfi is not None:
                         self._vnf_reconfigure_network(vnfi, intf_name, ip_address)
index 38fa700..c7babd7 100644 (file)
@@ -15,7 +15,7 @@ description: "An empty ubuntu VNF; used as SAP"
 ##
 virtual_deployment_units:
   - id: "1"
-    vm_image: "registry.sonata-nfv.eu:5000/son-emu-sap"
+    vm_image: "sonatanfv/sonata-iperf3-vnf"
     vm_image_format: "docker"
     resource_requirements:
       cpu:
index 1792f88..b8bb487 100755 (executable)
@@ -43,7 +43,7 @@ logging.basicConfig(level=logging.INFO)
 
 def create_topology1():
     # create topology
-    net = DCNetwork(controller=RemoteController, monitor=False, enable_learning=False)
+    net = DCNetwork(controller=RemoteController, monitor=False, enable_learning=True)
     dc1 = net.addDatacenter("dc1")
     dc2 = net.addDatacenter("dc2")
     s1 = net.addSwitch("s1")
@@ -59,7 +59,7 @@ def create_topology1():
     rapi1.start()
 
     # add the SONATA dummy gatekeeper to each DC
-    sdkg1 = SonataDummyGatekeeperEndpoint("0.0.0.0", 5000)
+    sdkg1 = SonataDummyGatekeeperEndpoint("0.0.0.0", 5000, deploy_sap=True)
     sdkg1.connectDatacenter(dc1)
     sdkg1.connectDatacenter(dc2)
     # run the dummy gatekeeper (in another thread, don't block)