]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Remove relative imports from NVP plugin
authorAaron Rosen <arosen@nicira.com>
Fri, 4 Jan 2013 00:52:42 +0000 (16:52 -0800)
committerGerrit Code Review <review@openstack.org>
Wed, 9 Jan 2013 18:33:07 +0000 (18:33 +0000)
The majority of relative imports in the nvp plugin will be fixed in
blueprint nvp-api-client-loadbalance-request. This patch removes the
rest of them in and moves the vim tabstop line to the top of the
header file to be consistent with the rest of the files in quantum.
Fixes bug 1091596

Change-Id: I6c8299ca73ae5df75c87f302680908f863f81f02

15 files changed:
quantum/plugins/nicira/nicira_nvp_plugin/NvpApiClient.py
quantum/plugins/nicira/nicira_nvp_plugin/QuantumPlugin.py
quantum/plugins/nicira/nicira_nvp_plugin/__init__.py
quantum/plugins/nicira/nicira_nvp_plugin/api_client/__init__.py
quantum/plugins/nicira/nicira_nvp_plugin/api_client/client.py
quantum/plugins/nicira/nicira_nvp_plugin/api_client/client_eventlet.py
quantum/plugins/nicira/nicira_nvp_plugin/api_client/common.py
quantum/plugins/nicira/nicira_nvp_plugin/api_client/request.py
quantum/plugins/nicira/nicira_nvp_plugin/api_client/request_eventlet.py
quantum/plugins/nicira/nicira_nvp_plugin/common/__init__.py
quantum/plugins/nicira/nicira_nvp_plugin/nicira_db.py
quantum/plugins/nicira/nicira_nvp_plugin/nicira_models.py
quantum/plugins/nicira/nicira_nvp_plugin/nvp_cluster.py
quantum/plugins/nicira/nicira_nvp_plugin/nvp_plugin_version.py
quantum/plugins/nicira/nicira_nvp_plugin/nvplib.py

index 48a8d60e922dcab92e081491d734ad51ec8ea291..b83648a9e3a90ed4cc8351ccb8a9052c527e1fad 100644 (file)
@@ -1,3 +1,5 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
 # Copyright 2012 Nicira, Inc.
 # All Rights Reserved
 #
@@ -13,8 +15,6 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 #
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-#
 # @author: Somik Behera, Nicira Networks, Inc.
 
 import httplib  # basic HTTP library for HTTPS connections
index 9daefca066dc3e6e011b69eb419f640b8cd3eebe..11c7b2ca3d91d3a62744fd869b7c5b269f17c81a 100644 (file)
@@ -1,3 +1,5 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
 # Copyright 2012 Nicira, Inc.
 # All Rights Reserved
 #
@@ -13,8 +15,6 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 #
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-#
 # @author: Somik Behera, Nicira Networks, Inc.
 # @author: Brad Hall, Nicira Networks, Inc.
 # @author: Aaron Rosen, Nicira Networks, Inc.
@@ -25,13 +25,6 @@ import logging
 
 import webob.exc
 
-# FIXME(salvatore-orlando): get rid of relative imports
-from common import config
-from nvp_plugin_version import PLUGIN_VERSION
-
-from quantum.plugins.nicira.nicira_nvp_plugin import nicira_models
-
-
 from quantum.api.v2 import attributes
 from quantum.api.v2 import base
 from quantum.common import constants
@@ -47,14 +40,15 @@ from quantum.extensions import providernet as pnet
 from quantum.openstack.common import cfg
 from quantum.openstack.common import rpc
 from quantum import policy
+from quantum.plugins.nicira.nicira_nvp_plugin.common import config
 from quantum.plugins.nicira.nicira_nvp_plugin.common import (exceptions
                                                              as nvp_exc)
 from quantum.plugins.nicira.nicira_nvp_plugin import nicira_db
+from quantum.plugins.nicira.nicira_nvp_plugin import NvpApiClient
+from quantum.plugins.nicira.nicira_nvp_plugin import nvplib
 from quantum.plugins.nicira.nicira_nvp_plugin import nvp_cluster
-
-import NvpApiClient
-import nvplib
-
+from quantum.plugins.nicira.nicira_nvp_plugin.nvp_plugin_version import (
+    PLUGIN_VERSION)
 
 LOG = logging.getLogger("QuantumPlugin")
 
index f76d4a9610e2c7bd901dd3ff35b9ce76808b87ff..07dd0007e2eba51a17a026eaea55dd9dbed29fd8 100644 (file)
@@ -1,3 +1,5 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
 # Copyright 2012 Nicira Networks, Inc.
 # All Rights Reserved
 #
@@ -12,5 +14,3 @@
 #    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 #    License for the specific language governing permissions and limitations
 #    under the License.
-#
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
index 87f79ba0559b02038226bc92ab6285bab164b69f..2684625857d26e9bc9c48562c8e2f26e4a44d639 100644 (file)
@@ -1,3 +1,5 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
 # Copyright 2012 Nicira, Inc.
 # All Rights Reserved
 #
@@ -13,6 +15,4 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 #
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-#
 # @author: Aaron Rosen, Nicira Networks, Inc.
index a0cdb81b090cfa68176214f9054a285cb38102c9..391112d0cd20bd553e90c25cbeccffb30c5d0e59 100644 (file)
@@ -1,3 +1,5 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
 # Copyright 2012 Nicira, Inc.
 # All Rights Reserved
 #
@@ -13,8 +15,6 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 #
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-#
 # @author: David Lapsley <dlapsley@nicira.com>, Nicira Networks, Inc.
 # @author: Aaron Rosen, Nicira Networks, Inc.
 
index 8e10ee12855e2ca724661084f2169688d60db24e..840643b75a0fcb5da16f2ad20591b6e5094ef93d 100644 (file)
@@ -1,3 +1,5 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
 # Copyright 2012 Nicira, Inc.
 # All Rights Reserved
 #
@@ -13,8 +15,6 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 #
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-#
 # @author: Aaron Rosen, Nicira Networks, Inc.
 
 
index bd61ca7b3a9b77d0100a43cba2d20997d590a3ba..70e5db3795a0692d684fbc58071d54327a4d1196 100644 (file)
@@ -1,3 +1,5 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
 # Copyright 2012 Nicira, Inc.
 # All Rights Reserved
 #
@@ -13,8 +15,6 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 #
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-#
 # @author: Aaron Rosen, Nicira Networks, Inc.
 
 
index a398a31c551d5a6692f35892f3ed427228364f85..de8ad38218d622d2f4ee24267a371d24ee534dee 100644 (file)
@@ -1,3 +1,5 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
 # Copyright 2012 Nicira, Inc.
 # All Rights Reserved
 #
@@ -13,8 +15,6 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 #
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-#
 # @author: Aaron Rosen, Nicira Networks, Inc.
 
 
index 1c878d3822d04c5dff1c95b11f96b369f3c97070..398dce4daafeae2b2805d7acf75692ea3845774d 100644 (file)
@@ -1,3 +1,5 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
 # Copyright 2012 Nicira, Inc.
 # All Rights Reserved
 #
@@ -13,8 +15,6 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 #
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-#
 # @author: Aaron Rosen, Nicira Networks, Inc.
 
 
index 5d93ae4b3a924cf852ac6114ae0b34f963a62265..07dd0007e2eba51a17a026eaea55dd9dbed29fd8 100644 (file)
@@ -1,3 +1,5 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
 # Copyright 2012 Nicira Networks, Inc.
 # All Rights Reserved
 #
@@ -12,6 +14,3 @@
 #    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 #    License for the specific language governing permissions and limitations
 #    under the License.
-#
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-#
index 570e0bc0d537db592c01e9c1fbe4242d8c1ecedf..7fbae42a1fbe92a850ff76ff344ac78ce9b75a8b 100644 (file)
@@ -1,4 +1,5 @@
 # vim: tabstop=4 shiftwidth=4 softtabstop=4
+
 # Copyright 2012 Nicira, Inc.
 # All Rights Reserved.
 #
@@ -14,6 +15,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+
 import logging
 
 from sqlalchemy.orm import exc
index 256bb53163d29124f7a1e994e16237047c2b2633..1a176be0602441e163b6c9207118b8db367bb1bb 100644 (file)
@@ -1,4 +1,5 @@
 # vim: tabstop=4 shiftwidth=4 softtabstop=4
+
 # Copyright 2012 Nicira, Inc.
 # All Rights Reserved.
 #
index a55f185a3f9303ebc79e4212a371e176b5cf70f6..0a07785ba396e1e252b284ef635d47a1eb742deb 100644 (file)
@@ -1,3 +1,5 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
 # Copyright 2012 Nicira, Inc.
 # All Rights Reserved
 #
@@ -12,9 +14,6 @@
 #    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 #    License for the specific language governing permissions and limitations
 #    under the License.
-#
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-#
 
 
 class NVPCluster(object):
index 97d929595305ed236b9376ed12f6dcc23c7b0f59..8d0753ea5cf5f95475f995ade2eb2882f4c4288f 100644 (file)
@@ -1,3 +1,5 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
 # Copyright 2012 Nicira Networks, Inc.
 # All Rights Reserved
 #
@@ -13,8 +15,6 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 #
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-#
 
 # This will get updated at build time.  Version 0 indicates developer build.
 PLUGIN_VERSION = "0"
index 5e7098088cf7d0141f3291d13959742c70d9b31c..1a2b67bbfd129d19c51b520abbe8620606361d4b 100644 (file)
@@ -1,3 +1,5 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
 # Copyright 2012 Nicira Networks, Inc.
 # All Rights Reserved
 #
 #    License for the specific language governing permissions and limitations
 #    under the License.
 #
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-#
 # @author: Brad Hall, Nicira Networks, Inc.
 # @author: Dave Lapsley, Nicira Networks, Inc.
 # @author: Aaron Rosen, Nicira Networks, Inc.
 
 
-# TODO(bgh): We should break this into separate files.  It will just keep
-# growing as we add more features :)
-
 from copy import copy
-import functools
+import hashlib
 import itertools
 import json
-import hashlib
 import logging
-import random
-import re
-import uuid
-
-from eventlet import semaphore
-
-import NvpApiClient
 
 #FIXME(danwent): I'd like this file to get to the point where it has
 # no quantum-specific logic in it
 from quantum.common import constants
 from quantum.common import exceptions as exception
+from quantum.plugins.nicira.nicira_nvp_plugin import NvpApiClient
+
 
 # HTTP METHODS CONSTANTS
 HTTP_GET = "GET"