X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=emuvim%2Fapi%2Fzerorpcapi_DCNetwork.py;h=b60093d1cd8c558c332e907db0acb1f5db2fbdb3;hb=4854f59e1bc2ea4d5b3495880940b52f6823affe;hp=7402f3df6e4653ac1fac68f243462be2a4ffcf2c;hpb=c5a536a1796846be97e5ba6ce9c20d73b6fd0052;p=osm%2Fvim-emu.git diff --git a/emuvim/api/zerorpcapi_DCNetwork.py b/emuvim/api/zerorpcapi_DCNetwork.py old mode 100644 new mode 100755 index 7402f3d..b60093d --- a/emuvim/api/zerorpcapi_DCNetwork.py +++ b/emuvim/api/zerorpcapi_DCNetwork.py @@ -32,15 +32,19 @@ class ZeroRpcApiEndpointDCNetwork(object): # start Ryu controller with rest-API python_install_path = site.getsitepackages()[0] - ryu_path = python_install_path + '/ryu/app/ofctl_rest.py' + ryu_path = python_install_path + '/ryu/app/simple_switch_13.py' + ryu_path2 = python_install_path + '/ryu/app/ofctl_rest.py' + # change the default Openflow controller port to 6653 (official IANA-assigned port number), as used by Mininet + # Ryu still uses 6633 as default + ryu_option = '--ofp-tcp-listen-port' + ryu_of_port = '6653' ryu_cmd = 'ryu-manager' - self.ryu_process = Popen([ryu_cmd,ryu_path]) - + self.ryu_process = Popen([ryu_cmd, ryu_path, ryu_path2, ryu_option, ryu_of_port]) def connectDCNetwork(self, net): self.net = net - logging.info("Connected DCNetwork(%s) to API endpoint %s(%s:%d)" % ( - net.name, self.__class__.__name__, self.ip, self.port)) + logging.info("Connected DCNetwork to API endpoint %s(%s:%d)" % ( + self.__class__.__name__, self.ip, self.port)) def start(self): thread = threading.Thread(target=self._api_server_thread, args=())