summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRocky <shi.yan@unimelb.edu.au>2018-02-09 11:07:27 +1100
committerRocky <shi.yan@unimelb.edu.au>2018-02-09 11:07:30 +1100
commit933ec08a963c6184849a97ec6230f3e3c66a2dc8 (patch)
treeb709665eac47204f7b02c871e915426dd381c6e9
parent04d53edd7fe41b4d23dff4b6255b7c927594a044 (diff)
Fix for python3
Notes
Notes (review): Code-Review+2: zhurong <aaronzhu1121@gmail.com> Code-Review+2: Felipe Monteiro <felipe.monteiro@att.com> Workflow+1: Felipe Monteiro <felipe.monteiro@att.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Sun, 11 Feb 2018 22:00:45 +0000 Reviewed-on: https://review.openstack.org/542503 Project: openstack/murano-tempest-plugin Branch: refs/heads/master
-rw-r--r--murano_tempest_tests/services/service_broker/service_broker_client.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/murano_tempest_tests/services/service_broker/service_broker_client.py b/murano_tempest_tests/services/service_broker/service_broker_client.py
index 0413237..db04c5f 100644
--- a/murano_tempest_tests/services/service_broker/service_broker_client.py
+++ b/murano_tempest_tests/services/service_broker/service_broker_client.py
@@ -46,9 +46,10 @@ class ServiceBrokerClient(rest_client.RestClient):
46 """ 46 """
47 uname = auth_provider.credentials.username 47 uname = auth_provider.credentials.username
48 pwd = auth_provider.credentials.password 48 pwd = auth_provider.credentials.password
49 auth = '{0}:{1}'.format(uname, pwd)
49 50
50 encoded_auth = base64.b64encode('{0}:{1}'.format(uname, pwd)) 51 encoded_auth = base64.b64encode(auth.encode('utf-8'))
51 headers = {"Authorization": "Basic " + encoded_auth, 52 headers = {"Authorization": "Basic " + encoded_auth.decode('utf-8'),
52 'content-type': 'application/json'} 53 'content-type': 'application/json'}
53 return headers 54 return headers
54 55