X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2Fopenvim.git;a=blobdiff_plain;f=openflow;h=cac14de6cd53f3fc973e60807fc21d697828eee2;hp=07261df6e9278ad91211cd679c6a5b8c64bf951d;hb=HEAD;hpb=9f6571090b203922cabb0382226be0fa48d6e046 diff --git a/openflow b/openflow index 07261df..cac14de 100755 --- 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))