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
"""
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
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()