summaryrefslogtreecommitdiff
path: root/troveclient/compat
diff options
context:
space:
mode:
authorTheron Voran <theron.voran@rackspace.com>2014-08-26 12:56:51 -0500
committerTim Simpson <tim.simpson@rackspace.com>2014-08-26 12:57:28 -0500
commit00e13fad266ff02fa9deed0066cdf2e2ca9e0dce (patch)
tree433813847bca81856ed2b86d633e150e4c3e5132 /troveclient/compat
parent872abf2c9d57bdec03433b23bf48ac4eb5a79ac6 (diff)
downloadpython-troveclient-00e13fad266ff02fa9deed0066cdf2e2ca9e0dce.tar.gz
Add visibility filter to datastore versions
Allows datastore versions to be hidden from all users except those explicitly allowed by their tenant. Implemented via a visibility attribute for datastore versions (defaulting to 'public'), and a datastore version member table for controlling access to non-public datastore versions by tenant. This commit provides the client functionality for integration tests related to the datastore-visibility feature. Implements: blueprint datastore-visibility Docimpact: change to datastore version payload Change-Id: Ic8024a631530ba295688d7e49e895f50cb2f32ef
Diffstat (limited to 'troveclient/compat')
-rw-r--r--troveclient/compat/client.py2
-rw-r--r--troveclient/compat/exceptions.py10
2 files changed, 10 insertions, 2 deletions
diff --git a/troveclient/compat/client.py b/troveclient/compat/client.py
index 5c5d5fe..03802a0 100644
--- a/troveclient/compat/client.py
+++ b/troveclient/compat/client.py
@@ -339,6 +339,8 @@ class Dbaas(object):
self.security_group_rules = security_groups.SecurityGroupRules(self)
self.datastores = datastores.Datastores(self)
self.datastore_versions = datastores.DatastoreVersions(self)
+ self.datastore_version_members = (datastores.
+ DatastoreVersionMembers(self))
self.storage = storage.StorageInfo(self)
self.management = management.Management(self)
self.mgmt_flavor = management.MgmtFlavors(self)
diff --git a/troveclient/compat/exceptions.py b/troveclient/compat/exceptions.py
index 22bba23..7051bb4 100644
--- a/troveclient/compat/exceptions.py
+++ b/troveclient/compat/exceptions.py
@@ -108,6 +108,12 @@ class NotFound(ClientException):
message = "Not found"
+class Conflict(ClientException):
+ """HTTP 409 - Conflict."""
+ http_status = 409
+ message = "Conflict"
+
+
class OverLimit(ClientException):
"""HTTP 413
- Over limit: you're over the API limits for this time period.
@@ -138,8 +144,8 @@ class UnprocessableEntity(ClientException):
#
# Instead, we have to hardcode it:
_code_map = dict((c.http_status, c) for c in [BadRequest, Unauthorized,
- Forbidden, NotFound, OverLimit,
- HTTPNotImplemented,
+ Forbidden, NotFound, Conflict,
+ OverLimit, HTTPNotImplemented,
UnprocessableEntity])