Signed-off-by: IWASE Yusuke <[email protected]>
---
 ryu/app/ofctl_rest.py                 |  7 +++----
 ryu/app/rest_conf_switch.py           |  6 +++---
 ryu/app/rest_firewall.py              |  3 +--
 ryu/app/rest_qos.py                   |  7 ++++---
 ryu/app/rest_router.py                |  2 +-
 ryu/app/rest_topology.py              |  6 ++++--
 ryu/app/simple_switch_rest_13.py      |  6 ++++--
 ryu/app/simple_switch_websocket_13.py | 11 +++++------
 ryu/tests/unit/app/test_ofctl_rest.py | 12 ++++++------
 ryu/tests/unit/app/test_wsgi.py       |  2 +-
 10 files changed, 32 insertions(+), 30 deletions(-)

diff --git a/ryu/app/ofctl_rest.py b/ryu/app/ofctl_rest.py
index 0e4555c..98118dc 100644
--- a/ryu/app/ofctl_rest.py
+++ b/ryu/app/ofctl_rest.py
@@ -14,10 +14,8 @@
 # limitations under the License.
 
 import logging
-
 import json
 import ast
-from webob import Response
 
 from ryu.base import app_manager
 from ryu.controller import ofp_event
@@ -35,8 +33,9 @@ from ryu.lib import ofctl_v1_2
 from ryu.lib import ofctl_v1_3
 from ryu.lib import ofctl_v1_4
 from ryu.lib import ofctl_v1_5
-from ryu.app.wsgi import ControllerBase, WSGIApplication
-
+from ryu.app.wsgi import ControllerBase
+from ryu.app.wsgi import Response
+from ryu.app.wsgi import WSGIApplication
 
 LOG = logging.getLogger('ryu.app.ofctl_rest')
 
diff --git a/ryu/app/rest_conf_switch.py b/ryu/app/rest_conf_switch.py
index 9767f36..1fd7d77 100644
--- a/ryu/app/rest_conf_switch.py
+++ b/ryu/app/rest_conf_switch.py
@@ -21,12 +21,12 @@ This module provides a set of REST API for switch 
configuration.
 Used by OpenStack Ryu agent.
 """
 
-from six.moves import http_client
 import json
-import logging
-from webob import Response
+
+from six.moves import http_client
 
 from ryu.app.wsgi import ControllerBase
+from ryu.app.wsgi import Response
 from ryu.base import app_manager
 from ryu.controller import conf_switch
 from ryu.lib import dpid as dpid_lib
diff --git a/ryu/app/rest_firewall.py b/ryu/app/rest_firewall.py
index 81659a9..e9c37ad 100644
--- a/ryu/app/rest_firewall.py
+++ b/ryu/app/rest_firewall.py
@@ -17,9 +17,8 @@
 import logging
 import json
 
-from webob import Response
-
 from ryu.app.wsgi import ControllerBase
+from ryu.app.wsgi import Response
 from ryu.app.wsgi import WSGIApplication
 from ryu.base import app_manager
 from ryu.controller import ofp_event
diff --git a/ryu/app/rest_qos.py b/ryu/app/rest_qos.py
index bfc9e66..9fe72ed 100644
--- a/ryu/app/rest_qos.py
+++ b/ryu/app/rest_qos.py
@@ -18,10 +18,11 @@ import logging
 import json
 import re
 
-from webob import Response
-
 from ryu.app import conf_switch_key as cs_key
-from ryu.app.wsgi import ControllerBase, WSGIApplication, route
+from ryu.app.wsgi import ControllerBase
+from ryu.app.wsgi import Response
+from ryu.app.wsgi import route
+from ryu.app.wsgi import WSGIApplication
 from ryu.base import app_manager
 from ryu.controller import conf_switch
 from ryu.controller import ofp_event
diff --git a/ryu/app/rest_router.py b/ryu/app/rest_router.py
index 81a3be4..8a2b069 100644
--- a/ryu/app/rest_router.py
+++ b/ryu/app/rest_router.py
@@ -20,9 +20,9 @@ import socket
 import struct
 
 import json
-from webob import Response
 
 from ryu.app.wsgi import ControllerBase
+from ryu.app.wsgi import Response
 from ryu.app.wsgi import WSGIApplication
 from ryu.base import app_manager
 from ryu.controller import dpset
diff --git a/ryu/app/rest_topology.py b/ryu/app/rest_topology.py
index 332df3f..4366066 100644
--- a/ryu/app/rest_topology.py
+++ b/ryu/app/rest_topology.py
@@ -14,9 +14,11 @@
 # limitations under the License.
 
 import json
-from webob import Response
 
-from ryu.app.wsgi import ControllerBase, WSGIApplication, route
+from ryu.app.wsgi import ControllerBase
+from ryu.app.wsgi import Response
+from ryu.app.wsgi import route
+from ryu.app.wsgi import WSGIApplication
 from ryu.base import app_manager
 from ryu.lib import dpid as dpid_lib
 from ryu.topology.api import get_switch, get_link, get_host
diff --git a/ryu/app/simple_switch_rest_13.py b/ryu/app/simple_switch_rest_13.py
index c37ee09..aaf5d50 100644
--- a/ryu/app/simple_switch_rest_13.py
+++ b/ryu/app/simple_switch_rest_13.py
@@ -16,11 +16,13 @@
 import json
 
 from ryu.app import simple_switch_13
-from webob import Response
 from ryu.controller import ofp_event
 from ryu.controller.handler import CONFIG_DISPATCHER
 from ryu.controller.handler import set_ev_cls
-from ryu.app.wsgi import ControllerBase, WSGIApplication, route
+from ryu.app.wsgi import ControllerBase
+from ryu.app.wsgi import Response
+from ryu.app.wsgi import route
+from ryu.app.wsgi import WSGIApplication
 from ryu.lib import dpid as dpid_lib
 
 simple_switch_instance_name = 'simple_switch_api_app'
diff --git a/ryu/app/simple_switch_websocket_13.py 
b/ryu/app/simple_switch_websocket_13.py
index 3168d5b..f58af04 100644
--- a/ryu/app/simple_switch_websocket_13.py
+++ b/ryu/app/simple_switch_websocket_13.py
@@ -42,15 +42,14 @@ Get arp table:
 15:0c:de:49": 2}}}
 """
 
-import json
-
-from webob import Response
 from ryu.app import simple_switch_13
-from ryu.app.wsgi import route, websocket, ControllerBase, WSGIApplication
-from ryu.app.wsgi import rpc_public, WebSocketRPCServer
+from ryu.app.wsgi import ControllerBase
+from ryu.app.wsgi import rpc_public
+from ryu.app.wsgi import websocket
+from ryu.app.wsgi import WebSocketRPCServer
+from ryu.app.wsgi import WSGIApplication
 from ryu.controller import ofp_event
 from ryu.controller.handler import set_ev_cls
-from ryu.lib import hub
 from ryu.lib.packet import packet
 
 
diff --git a/ryu/tests/unit/app/test_ofctl_rest.py 
b/ryu/tests/unit/app/test_ofctl_rest.py
index 095924a..5b7a5be 100644
--- a/ryu/tests/unit/app/test_ofctl_rest.py
+++ b/ryu/tests/unit/app/test_ofctl_rest.py
@@ -18,17 +18,17 @@
 import functools
 import json
 import logging
-from nose.tools import eq_
 import os
 import sys
 import unittest
-from webob.request import Request
 try:
     import mock  # Python 2
 except ImportError:
     from unittest import mock  # Python 3
+from nose.tools import eq_
 
 from ryu.app import ofctl_rest
+from ryu.app.wsgi import Request
 from ryu.app.wsgi import WSGIApplication
 from ryu.controller.dpset import DPSet
 from ryu.ofproto import ofproto_protocol
@@ -71,7 +71,7 @@ class DummyDatapath(ofproto_protocol.ProtocolDesc):
 class Test_ofctl_rest(unittest.TestCase):
 
     def _test(self, name, dp, method, path, body):
-        print('processing %s ...' % name)
+        # print('processing %s ...' % name)
 
         dpset = DPSet()
         dpset._register(dp)
@@ -104,13 +104,13 @@ def _add_tests():
     this_dir = os.path.dirname(sys.modules[__name__].__file__)
     ofctl_rest_json_dir = os.path.join(this_dir, 'ofctl_rest_json/')
 
-    for ofp_ver in _ofp_vers.keys():
+    for ofp_ver in _ofp_vers:
         # read a json file
         json_path = os.path.join(ofctl_rest_json_dir, ofp_ver + '.json')
         if os.path.exists(json_path):
             _test_cases = json.load(open(json_path))
         else:
-            print("Skip to load test cases for %s" % ofp_ver)
+            # print("Skip to load test cases for %s" % ofp_ver)
             continue
 
         # add test
@@ -120,7 +120,7 @@ def _add_tests():
             body = test.get('body', {})
 
             name = 'test_ofctl_rest_' + method + '_' + ofp_ver + '_' + path
-            print('adding %s ...' % name)
+            # print('adding %s ...' % name)
             f = functools.partial(
                 Test_ofctl_rest._test,
                 name=name,
diff --git a/ryu/tests/unit/app/test_wsgi.py b/ryu/tests/unit/app/test_wsgi.py
index 9da2057..bec21dd 100644
--- a/ryu/tests/unit/app/test_wsgi.py
+++ b/ryu/tests/unit/app/test_wsgi.py
@@ -20,10 +20,10 @@ import logging
 
 import nose
 from nose.tools import eq_
-from webob.response import Response
 
 from ryu.app.wsgi import ControllerBase
 from ryu.app.wsgi import WSGIApplication
+from ryu.app.wsgi import Response
 from ryu.app.wsgi import route
 from ryu.lib import dpid as dpidlib
 
-- 
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/intel
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to