From 58bd1f23e0d06257c9e5223156661d8f58d4f01e Mon Sep 17 00:00:00 2001 From: stevenvanrossem Date: Wed, 17 Feb 2016 11:09:04 +0100 Subject: [PATCH] update example_topology.py --- emuvim/dcemulator/net.py | 4 ++-- emuvim/example_topology.py | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/emuvim/dcemulator/net.py b/emuvim/dcemulator/net.py index 8379cd3..4bf9224 100755 --- a/emuvim/dcemulator/net.py +++ b/emuvim/dcemulator/net.py @@ -5,9 +5,9 @@ Distributed Cloud Emulator (dcemulator) import logging from mininet.net import Dockernet -from mininet.node import Controller, OVSKernelSwitch, Switch, Docker, Host +from mininet.node import Controller, OVSSwitch, OVSKernelSwitch, Switch, Docker, Host, RemoteController from mininet.cli import CLI -from mininet.log import setLogLevel, info +from mininet.log import setLogLevel, info, debug from mininet.link import TCLink, Link import networkx as nx from monitoring import DCNetworkMonitor diff --git a/emuvim/example_topology.py b/emuvim/example_topology.py index 3c53c58..35c87af 100755 --- a/emuvim/example_topology.py +++ b/emuvim/example_topology.py @@ -30,6 +30,13 @@ def create_topology1(): """ net = DCNetwork() + """ + 1b. add a monitoring agent to the DCNetwork + """ + mon_api = ZeroRpcApiEndpointDCNetwork("0.0.0.0", 5151) + mon_api.connectDCNetwork(net) + mon_api.start() + """ 2. Add (logical) data centers to the topology (each data center is one "bigswitch" in our simplified @@ -102,6 +109,8 @@ def create_topology1(): net.start() net.CLI() # when the user types exit in the CLI, we stop the emulator + # we need to explicitly stop the monitoring api, so the Ryu controller is also terminated + mon_api.stop() net.stop() -- 2.25.1