Fixed some typos
[osm/openvim.git] / openflow
index 07261df..cac14de 100755 (executable)
--- a/openflow
+++ b/openflow
@@ -3,7 +3,7 @@
 # PYTHON_ARGCOMPLETE_OK
 
 ##
-# Copyright 2015 Telefónica Investigación y Desarrollo, S.A.U.
+# Copyright 2015 Telefonica Investigacion y Desarrollo, S.A.U.
 # This file is part of openmano
 # All Rights Reserved.
 #
@@ -279,7 +279,7 @@ if __name__=="__main__":
     of_controller_password = os.getenv('OF_CONTROLLER_PASSWORD',None)
     #of_controller_version = os.getenv('OF_CONTROLLER_VERSION',"0.90")
     of_controller_ip = os.getenv('OF_CONTROLLER_IP',"localhost")
-    of_controller_port = os.getenv('OF_CONTROLLER_PORT',"7070")
+    of_controller_port = os.getenv('OF_CONTROLLER_PORT',"8080")
     of_controller_dpid = os.getenv('OF_CONTROLLER_DPID','00:01:02:03:e4:05:e6:07')
     of_controller_module = os.getenv('OF_CONTROLLER_MODULE',None)
     
@@ -375,10 +375,10 @@ if __name__=="__main__":
                 module = of_controller_module
             else:
                 module = of_controller_type
-            module_info = imp.find_module(module)
-            
-            of_conn = imp.load_module("of_conn", *module_info)
+
             try:
+                pkg = __import__("osm_openvim." + module)
+                of_conn = getattr(pkg, module)
                 ofconnector = of_conn.OF_conn(params)
             except Exception as e: 
                 print "Cannot open the Openflow controller '%s': %s" % (type(e).__name__, str(e))