summaryrefslogtreecommitdiff
path: root/trove/datastore
diff options
context:
space:
mode:
authorSushil Kumar <sushil.kumar3@hp.com>2015-05-20 19:53:12 +0000
committerSushil Kumar <sushil.kumar3@hp.com>2015-05-29 07:27:59 +0000
commit843bb0cd53f6cc3caa9beeb8f07a374943d01889 (patch)
tree1d3669e320affdd4f59cd88c404ef420b1e0cfd4 /trove/datastore
parent0f3d24254811906810552217cf05ed9409f415fc (diff)
downloadtrove-843bb0cd53f6cc3caa9beeb8f07a374943d01889.tar.gz
Fixes hacking rules
This patchset helps reducing the ignored pep8 errors. Fixed some ignored hacking rules, as listed follows: - E111 indentation is not a multiple of four - E122 continuation line missing indentation or outdented - E123 closing bracket does not match indentation of opening bracket's line - E128 continuation line under-indented for visual indent - E251 unexpected spaces around keyword / parameter equals - E265 block comment should start with '# ' - E713 test for membership should be 'not in' - H105 Don't use author tags - H306 imports not in alphabetical order Change-Id: Iadf2af4f6ec90420153ad63b5a41650392ef2cbd
Diffstat (limited to 'trove/datastore')
-rw-r--r--trove/datastore/models.py14
-rw-r--r--trove/datastore/service.py4
-rw-r--r--trove/datastore/views.py2
3 files changed, 10 insertions, 10 deletions
diff --git a/trove/datastore/models.py b/trove/datastore/models.py
index eb8a5c92..642eccc9 100644
--- a/trove/datastore/models.py
+++ b/trove/datastore/models.py
@@ -19,8 +19,8 @@
from trove.common import cfg
from trove.common import exception
from trove.common import utils
-from trove.db import models as dbmodels
from trove.db import get_db_api
+from trove.db import models as dbmodels
from trove.openstack.common import log as logging
@@ -412,8 +412,8 @@ class DatastoreVersion(object):
self._datastore_name = Datastore.load(self.datastore_id).name
return self._datastore_name
- #TODO(tim.simpson): This would be less confusing if it was called "version"
- # and datastore_name was called "name".
+ # TODO(tim.simpson): This would be less confusing if it was called
+ # "version" and datastore_name was called "name".
@property
def name(self):
return self.db_info.name
@@ -475,15 +475,15 @@ def get_datastore_version(type=None, version=None, return_inactive=False):
datastore = Datastore.load(datastore)
version = version or datastore.default_version_id
if not version:
- raise exception.DatastoreDefaultVersionNotFound(datastore=
- datastore.name)
+ raise exception.DatastoreDefaultVersionNotFound(
+ datastore=datastore.name)
datastore_version = DatastoreVersion.load(datastore, version)
if datastore_version.datastore_id != datastore.id:
raise exception.DatastoreNoVersion(datastore=datastore.name,
version=datastore_version.name)
if not datastore_version.active and not return_inactive:
- raise exception.DatastoreVersionInactive(version=
- datastore_version.name)
+ raise exception.DatastoreVersionInactive(
+ version=datastore_version.name)
return (datastore, datastore_version)
diff --git a/trove/datastore/service.py b/trove/datastore/service.py
index 9cfda748..376bdb56 100644
--- a/trove/datastore/service.py
+++ b/trove/datastore/service.py
@@ -27,7 +27,7 @@ class DatastoreController(wsgi.Controller):
datastore_versions = (models.DatastoreVersions.load(datastore.id))
return wsgi.Result(views.
DatastoreView(datastore, datastore_versions,
- req).data(), 200)
+ req).data(), 200)
def index(self, req, tenant_id):
context = req.environ[wsgi.CONTEXT_KEY]
@@ -38,7 +38,7 @@ class DatastoreController(wsgi.Controller):
datastores_versions = models.DatastoreVersions.load_all(only_active)
return wsgi.Result(views.
DatastoresView(datastores, datastores_versions,
- req).data(), 200)
+ req).data(), 200)
def version_show(self, req, tenant_id, datastore, id):
datastore = models.Datastore.load(datastore)
diff --git a/trove/datastore/views.py b/trove/datastore/views.py
index 2ac779fa..6b4ebb6c 100644
--- a/trove/datastore/views.py
+++ b/trove/datastore/views.py
@@ -16,8 +16,8 @@
# under the License.
#
-from trove.common import wsgi
from trove.common.views import create_links
+from trove.common import wsgi
class DatastoreView(object):