@@ -0,0 +1,2649 @@
+%22%22%22%0ACopyright (c) 2015 SONATA-NFV%0AALL RIGHTS RESERVED.%0A%0ALicensed under the Apache License, Version 2.0 (the %22License%22);%0Ayou may not use this file except in compliance with the License.%0AYou may obtain a copy of the License at%0A%0A    http://www.apache.org/licenses/LICENSE-2.0%0A%0AUnless required by applicable law or agreed to in writing, software%0Adistributed under the License is distributed on an %22AS IS%22 BASIS,%0AWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0ASee the License for the specific language governing permissions and%0Alimitations under the License.%0A%0ANeither the name of the SONATA-NFV %5B, ANY ADDITIONAL AFFILIATION%5D%0Anor the names of its contributors may be used to endorse or promote%0Aproducts derived from this software without specific prior written%0Apermission.%0A%0AThis work has been performed in the framework of the SONATA project,%0Afunded by the European Commission under Grant number 671517 through%0Athe Horizon 2020 and 5G-PPP programmes. The authors would like to%0Aacknowledge the contributions of their colleagues of the SONATA%0Apartner consortium (www.sonata-nfv.eu).%0A%22%22%22%0A%22%22%22%0AA simple topology with two PoPs for the y1 demo story board.%0A%0A        (dc1) %3C%3C--%3E%3E s1 %3C%3C--%3E%3E (dc2)%0A%0A- SAP deployment enabled%0A- learning switch enabled%0A%22%22%22%0A%0Aimport logging%0Afrom mininet.log import setLogLevel%0Afrom emuvim.dcemulator.net import DCNetwork%0Afrom emuvim.api.rest.rest_api_endpoint import RestApiEndpoint%0Afrom emuvim.api.sonata import SonataDummyGatekeeperEndpoint%0Afrom mininet.node import RemoteController%0A%0Alogging.basicConfig(level=logging.INFO)%0A%0A%0Adef create_topology1():%0A    # create topology%0A    net = DCNetwork(controller=RemoteController, monitor=True, enable_learning=True)%0A    dc1 = net.addDatacenter(%22dc1%22)%0A    dc2 = net.addDatacenter(%22dc2%22)%0A    s1 = net.addSwitch(%22s1%22)%0A    net.addLink(dc1, s1, delay=%2210ms%22)%0A    net.addLink(dc2, s1, delay=%2220ms%22)%0A%0A    # add the command line interface endpoint to each DC (REST API)%0A    rapi1 = RestApiEndpoint(%220.0.0.0%22, 5001)%0A    rapi1.connectDCNetwork(net)%0A    rapi1.connectDatacenter(dc1)%0A    rapi1.connectDatacenter(dc2)%0A    # run API endpoint server (in another thread, don't block)%0A    rapi1.start()%0A%0A    # add the SONATA dummy gatekeeper to each DC%0A    sdkg1 = SonataDummyGatekeeperEndpoint(%220.0.0.0%22, 5000, deploy_sap=True)%0A    sdkg1.connectDatacenter(dc1)%0A    sdkg1.connectDatacenter(dc2)%0A    # run the dummy gatekeeper (in another thread, don't block)%0A    sdkg1.start()%0A%0A    # start the emulation platform%0A    net.start()%0A    net.CLI()%0A    net.stop()%0A%0A%0Adef main():%0A    setLogLevel('info')  # set Mininet loglevel%0A    create_topology1()%0A%0A%0Aif __name__ == '__main__':%0A    main()%0A

add emulator topology for sonata y1 demo