projects
/
osm
/
vim-emu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix SDN chaining bug regarding cookies + add extra unittest SDN chaining multi service
[osm/vim-emu.git]
/
src
/
emuvim
/
examples
/
monitoring_demo_topology.py
diff --git
a/src/emuvim/examples/monitoring_demo_topology.py
b/src/emuvim/examples/monitoring_demo_topology.py
index
8592d62
..
4dfd5b7
100755
(executable)
--- a/
src/emuvim/examples/monitoring_demo_topology.py
+++ b/
src/emuvim/examples/monitoring_demo_topology.py
@@
-29,7
+29,7
@@
def create_topology1():
"""
1. Create a data center network object (DCNetwork) with monitoring enabled
"""
"""
1. Create a data center network object (DCNetwork) with monitoring enabled
"""
- net = DCNetwork(monitor=True)
+ net = DCNetwork(monitor=True
, enable_learning=False
)
"""
1b. add a monitoring agent to the DCNetwork
"""
1b. add a monitoring agent to the DCNetwork
@@
-43,7
+43,7
@@
def create_topology1():
first prototype)
"""
dc1 = net.addDatacenter("datacenter1")
first prototype)
"""
dc1 = net.addDatacenter("datacenter1")
-
#
dc2 = net.addDatacenter("datacenter2")
+ dc2 = net.addDatacenter("datacenter2")
#dc3 = net.addDatacenter("long_data_center_name3")
#dc4 = net.addDatacenter(
# "datacenter4",
#dc3 = net.addDatacenter("long_data_center_name3")
#dc4 = net.addDatacenter(
# "datacenter4",
@@
-53,7
+53,7
@@
def create_topology1():
3. You can add additional SDN switches for data center
interconnections to the network.
"""
3. You can add additional SDN switches for data center
interconnections to the network.
"""
-
#
s1 = net.addSwitch("s1")
+ s1 = net.addSwitch("s1")
"""
4. Add links between your data centers and additional switches
"""
4. Add links between your data centers and additional switches
@@
-62,6
+62,8
@@
def create_topology1():
"""
#net.addLink(dc1, dc2, delay="10ms")
#net.addLink(dc1, dc2)
"""
#net.addLink(dc1, dc2, delay="10ms")
#net.addLink(dc1, dc2)
+ net.addLink(dc1, s1)
+ net.addLink(s1, dc2)
#net.addLink("datacenter1", s1, delay="20ms")
#net.addLink(s1, dc3)
#net.addLink(s1, "datacenter4")
#net.addLink("datacenter1", s1, delay="20ms")
#net.addLink(s1, dc3)
#net.addLink(s1, "datacenter4")
@@
-81,7
+83,7
@@
def create_topology1():
zapi1 = ZeroRpcApiEndpoint("0.0.0.0", 4242)
# connect data centers to this endpoint
zapi1.connectDatacenter(dc1)
zapi1 = ZeroRpcApiEndpoint("0.0.0.0", 4242)
# connect data centers to this endpoint
zapi1.connectDatacenter(dc1)
-
#
zapi1.connectDatacenter(dc2)
+ zapi1.connectDatacenter(dc2)
#zapi1.connectDatacenter(dc3)
#zapi1.connectDatacenter(dc4)
# run API endpoint server (in another thread, don't block)
#zapi1.connectDatacenter(dc3)
#zapi1.connectDatacenter(dc4)
# run API endpoint server (in another thread, don't block)