projects
/
osm
/
openvim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
enhance log message errors when fails at starting
[osm/openvim.git]
/
openflow
diff --git
a/openflow
b/openflow
index
4df9338
..
316ac0f
100755
(executable)
--- a/
openflow
+++ b/
openflow
@@
-40,8
+40,8
@@
import imp
import yaml
import requests
import logging
import yaml
import requests
import logging
-import openflow_conn
-from openflow_thread import change_db2of, FlowBadFormat
+import o
sm_openvim.openflow_conn as o
penflow_conn
+from o
sm_openvim.o
penflow_thread import change_db2of, FlowBadFormat
def of_switches(args):
def of_switches(args):
@@
-375,10
+375,10
@@
if __name__=="__main__":
module = of_controller_module
else:
module = of_controller_type
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:
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))
ofconnector = of_conn.OF_conn(params)
except Exception as e:
print "Cannot open the Openflow controller '%s': %s" % (type(e).__name__, str(e))