X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Femuvim%2Fexamples%2Fsonata_y1_demo_topology_1.py;h=5c2402c51df4f30da18b00dcbfd8d1899348d48a;hb=0a8c3c754c3ca5d1d34ec2dde21423524a32559c;hp=c5c96114ed47e377575f23350469e0bbf2d49387;hpb=0d98d75450be28bba00ebabcd9041b4ae541f964;p=osm%2Fvim-emu.git diff --git a/src/emuvim/examples/sonata_y1_demo_topology_1.py b/src/emuvim/examples/sonata_y1_demo_topology_1.py index c5c9611..5c2402c 100755 --- a/src/emuvim/examples/sonata_y1_demo_topology_1.py +++ b/src/emuvim/examples/sonata_y1_demo_topology_1.py @@ -1,5 +1,5 @@ """ -Copyright (c) 2015 SONATA-NFV +Copyright (c) 2015 SONATA-NFV and Paderborn University ALL RIGHTS RESERVED. Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,7 +14,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -Neither the name of the SONATA-NFV [, ANY ADDITIONAL AFFILIATION] +Neither the name of the SONATA-NFV, Paderborn University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. @@ -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") @@ -52,13 +52,14 @@ def create_topology1(): # add the command line interface endpoint to each DC (REST API) rapi1 = RestApiEndpoint("0.0.0.0", 5001) + rapi1.connectDCNetwork(net) rapi1.connectDatacenter(dc1) rapi1.connectDatacenter(dc2) # run API endpoint server (in another thread, don't block) 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=False) sdkg1.connectDatacenter(dc1) sdkg1.connectDatacenter(dc2) # run the dummy gatekeeper (in another thread, don't block) @@ -67,6 +68,7 @@ def create_topology1(): # start the emulation platform net.start() net.CLI() + rapi1.stop() net.stop()