Signed-off-by: IWASE Yusuke <[email protected]>
---
 ryu/app/wsgi.py               | 16 +++++++---------
 ryu/cmd/manager.py            | 12 +-----------
 ryu/cmd/of_config_cli.py      |  9 +++------
 ryu/cmd/rpc_cli.py            |  6 +-----
 ryu/cmd/ryu_base.py           |  8 +++-----
 ryu/lib/of_config/__init__.py |  5 +----
 6 files changed, 16 insertions(+), 40 deletions(-)

diff --git a/ryu/app/wsgi.py b/ryu/app/wsgi.py
index 6687dc2..3c8bc93 100644
--- a/ryu/app/wsgi.py
+++ b/ryu/app/wsgi.py
@@ -17,22 +17,20 @@
 import inspect
 from types import MethodType
 
+from tinyrpc.server import RPCServer
+from tinyrpc.dispatch import RPCDispatcher
+from tinyrpc.dispatch import public as rpc_public
+from tinyrpc.protocols.jsonrpc import JSONRPCProtocol
+from tinyrpc.transports import ServerTransport, ClientTransport
+from tinyrpc.client import RPCClient
 import webob.dec
 from webob.response import Response
+
 from ryu import cfg
 from ryu.lib import hub
 from routes import Mapper
 from routes.util import URLGenerator
 
-import ryu.contrib
-ryu.contrib.update_module_path()
-from tinyrpc.server import RPCServer
-from tinyrpc.dispatch import RPCDispatcher
-from tinyrpc.dispatch import public as rpc_public
-from tinyrpc.protocols.jsonrpc import JSONRPCProtocol
-from tinyrpc.transports import ServerTransport, ClientTransport
-from tinyrpc.client import RPCClient
-ryu.contrib.restore_module_path()
 
 CONF = cfg.CONF
 CONF.register_cli_opts([
diff --git a/ryu/cmd/manager.py b/ryu/cmd/manager.py
index 1e1a6b4..dc7aca8 100755
--- a/ryu/cmd/manager.py
+++ b/ryu/cmd/manager.py
@@ -19,19 +19,9 @@
 from ryu.lib import hub
 hub.patch(thread=False)
 
-# TODO:
-#   Right now, we have our own patched copy of ovs python bindings
-#   Once our modification is upstreamed and widely deployed,
-#   use it
-#
-# NOTE: this modifies sys.path and thus affects the following imports.
-import ryu.contrib
-ryu.contrib.update_module_path()
-
 from ryu import cfg
-import logging
-import sys
 
+import logging
 from ryu import log
 log.early_init_log(logging.DEBUG)
 
diff --git a/ryu/cmd/of_config_cli.py b/ryu/cmd/of_config_cli.py
index 1601503..8bfbad0 100755
--- a/ryu/cmd/of_config_cli.py
+++ b/ryu/cmd/of_config_cli.py
@@ -25,18 +25,15 @@
 
 from __future__ import print_function
 
-import ryu.contrib
-ryu.contrib.update_module_path()
-
-from ryu import cfg
-
 import cmd
 import sys
+
 import lxml.etree as ET
+from ncclient.operations.rpc import RPCError
 
+from ryu import cfg
 from ryu.lib import of_config
 from ryu.lib.of_config import capable_switch
-from ncclient.operations.rpc import RPCError
 import ryu.lib.of_config.classes as ofc
 
 
diff --git a/ryu/cmd/rpc_cli.py b/ryu/cmd/rpc_cli.py
index 57ad0e0..ac54214 100755
--- a/ryu/cmd/rpc_cli.py
+++ b/ryu/cmd/rpc_cli.py
@@ -31,17 +31,13 @@
 
 from __future__ import print_function
 
-import ryu.contrib
-ryu.contrib.update_module_path()
-
-from ryu import cfg
-
 import cmd
 import signal
 import socket
 import sys
 import termios
 
+from ryu import cfg
 from ryu.lib import rpc
 
 
diff --git a/ryu/cmd/ryu_base.py b/ryu/cmd/ryu_base.py
index 05b6cd1..4c1cd6f 100644
--- a/ryu/cmd/ryu_base.py
+++ b/ryu/cmd/ryu_base.py
@@ -14,15 +14,13 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-import ryu.contrib
-ryu.contrib.update_module_path()
+import argparse
+import os.path
+import sys
 
 from ryu import cfg
 from ryu import utils
 from ryu import version
-import argparse
-import os.path
-import sys
 
 
 subcommands = {
diff --git a/ryu/lib/of_config/__init__.py b/ryu/lib/of_config/__init__.py
index cd419c1..4a12b29 100644
--- a/ryu/lib/of_config/__init__.py
+++ b/ryu/lib/of_config/__init__.py
@@ -22,9 +22,6 @@ import glob
 import os.path
 import sys
 
-# we require ncclient
-import ryu.contrib
-ryu.contrib.update_module_path()
 
 SCHEMA_DIR = os.path.dirname(__file__)
 
@@ -34,7 +31,7 @@ _files = glob.glob(os.path.join(SCHEMA_DIR, 
'of-config-*.xsd'))
 OF_CONFIG_XSD_FILES = dict(
     (os.path.basename(f)[len(_PREFIX):-len(_SUFFIX)], f) for f in _files)
 
-# For convinience
+# For convenience
 # OF_CONFIG_1_0_XSD = os.path.join(SCHEMA_DIR, 'of-config-1.0.xsd')
 # and so on
 _this_module = sys.modules[__name__]
-- 
2.7.4


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to