specific controller functionality.
"""
self.net = DCNetwork(controller=controller, **kwargs)
- self.api = RestApiEndpoint("127.0.0.1", 5001)
+ self.api = RestApiEndpoint("127.0.0.1", 5001, self.net)
# add some switches
# start from s1 because ovs does not like to have dpid = 0
# and switch name-number is being used by mininet to set the dpid
def startApi(self):
self.api.start()
+ def stopApi(self):
+ self.api.stop()
+
def startNet(self):
self.net.start()
"sudo docker rm -f $(sudo docker ps --filter 'label=com.containernet' -a -q)",
stdout=devnull,
stderr=devnull,
- shell=True)
\ No newline at end of file
+ shell=True)