Merge branch 'master' of https://github.com/stevenvanrossem/son-emu
[osm/vim-emu.git] / emuvim / api / zerorpcapi_DCNetwork.py
old mode 100644 (file)
new mode 100755 (executable)
index 7402f3d..b60093d
@@ -32,15 +32,19 @@ class ZeroRpcApiEndpointDCNetwork(object):
 \r
         # start Ryu controller with rest-API\r
         python_install_path = site.getsitepackages()[0]\r
-        ryu_path = python_install_path + '/ryu/app/ofctl_rest.py'\r
+        ryu_path = python_install_path + '/ryu/app/simple_switch_13.py'\r
+        ryu_path2 =  python_install_path + '/ryu/app/ofctl_rest.py'\r
+        # change the default Openflow controller port to 6653 (official IANA-assigned port number), as used by Mininet\r
+        # Ryu still uses 6633 as default\r
+        ryu_option = '--ofp-tcp-listen-port'\r
+        ryu_of_port = '6653'\r
         ryu_cmd =  'ryu-manager'\r
-        self.ryu_process = Popen([ryu_cmd,ryu_path])\r
-\r
+        self.ryu_process = Popen([ryu_cmd, ryu_path, ryu_path2, ryu_option, ryu_of_port])\r
 \r
     def connectDCNetwork(self, net):\r
         self.net = net\r
-        logging.info("Connected DCNetwork(%s) to API endpoint %s(%s:%d)" % (\r
-            net.name, self.__class__.__name__, self.ip, self.port))\r
+        logging.info("Connected DCNetwork to API endpoint %s(%s:%d)" % (\r
+            self.__class__.__name__, self.ip, self.port))\r
 \r
     def start(self):\r
         thread = threading.Thread(target=self._api_server_thread, args=())\r