projects
/
osm
/
vim-emu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of https://github.com/stevenvanrossem/son-emu
[osm/vim-emu.git]
/
emuvim
/
example_topology.py
diff --git
a/emuvim/example_topology.py
b/emuvim/example_topology.py
index
3c53c58
..
2342fd1
100755
(executable)
--- a/
emuvim/example_topology.py
+++ b/
emuvim/example_topology.py
@@
-20,6
+20,7
@@
import logging
from mininet.log import setLogLevel
from dcemulator.net import DCNetwork
from api.zerorpcapi import ZeroRpcApiEndpoint
from mininet.log import setLogLevel
from dcemulator.net import DCNetwork
from api.zerorpcapi import ZeroRpcApiEndpoint
+from api.zerorpcapi_DCNetwork import ZeroRpcApiEndpointDCNetwork
logging.basicConfig(level=logging.INFO)
logging.basicConfig(level=logging.INFO)
@@
-30,6
+31,12
@@
def create_topology1():
"""
net = DCNetwork()
"""
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
"""
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
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()
net.stop()