summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-12-27 22:21:03 +0000
committerGerrit Code Review <review@openstack.org>2016-12-27 22:21:03 +0000
commit5c8f36676a7f13a0dfd9eccd34ade0983a210974 (patch)
tree7eb55ddde025a22c52df9fb0d640e84b6259a81a
parentb07ecb4019cf9d559f39837aa36e4ba46ab770c9 (diff)
parent7420dbbe3d9527ad530310224e05734b3c80233a (diff)
downloadpython-troveclient-5c8f36676a7f13a0dfd9eccd34ade0983a210974.tar.gz
Merge "Fix Swift Authentication for log commands"
-rw-r--r--troveclient/v1/instances.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/troveclient/v1/instances.py b/troveclient/v1/instances.py
index ab7f71a..2440fe3 100644
--- a/troveclient/v1/instances.py
+++ b/troveclient/v1/instances.py
@@ -70,11 +70,14 @@ class Instances(base.ManagerWithFind):
user = self.api.client.auth._username
key = self.api.client.auth._password
tenant_name = self.api.client.auth._project_name
+ auth_version = "3.0"
else:
auth_url = self.api.client.auth_url
user = self.api.client.username
key = self.api.client.password
tenant_name = self.api.client.tenant
+ auth_version = "2.0"
+
# remove '/tokens' from the end of auth_url so it works for swift
token_str = "/tokens"
if auth_url.endswith(token_str):
@@ -83,7 +86,8 @@ class Instances(base.ManagerWithFind):
os_options = {'tenant_name': tenant_name, 'region_name': region_name}
return swift_client.Connection(
- auth_url, user, key, auth_version="2.0", os_options=os_options)
+ auth_url, user, key, auth_version=auth_version,
+ os_options=os_options)
def create(self, name, flavor_id, volume=None, databases=None, users=None,
restorePoint=None, availability_zone=None, datastore=None,