summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlvaro Uría <alvaro.uria@canonical.com>2016-03-09 11:25:34 +0100
committerAlvaro Uría <alvaro.uria@canonical.com>2016-03-09 11:25:34 +0100
commit557b0e5cd242c922a735cd0a87d417c9b1c03677 (patch)
tree8b86326b2000f5cafa42977c3d4d8725c0c83916
parentc37a1793691f2c0643b94c4a35b1edffa4e9f078 (diff)
[fix] credentials() handles all conversations
-rw-r--r--requires.py20
1 files changed, 12 insertions, 8 deletions
diff --git a/requires.py b/requires.py
index ef22fdb..7828b3d 100644
--- a/requires.py
+++ b/requires.py
@@ -44,14 +44,18 @@ class KeystoneRequires(RelationBase):
44 """ 44 """
45 Returns a dict of keystone admin credentials 45 Returns a dict of keystone admin credentials
46 """ 46 """
47 conv = self.conversation() 47 convs = self.conversations()
48 return { 48 if len(convs) > 0:
49 'service_hostname': conv.get_remote('service_hostname'), 49 conv = convs[0]
50 'service_port': conv.get_remote('service_port'), 50 return {
51 'service_username': conv.get_remote('service_username'), 51 'service_hostname': conv.get_remote('service_hostname'),
52 'service_password': conv.get_remote('service_password'), 52 'service_port': conv.get_remote('service_port'),
53 'service_tenant_name': conv.get_remote('service_tenant_name') 53 'service_username': conv.get_remote('service_username'),
54 } 54 'service_password': conv.get_remote('service_password'),
55 'service_tenant_name': conv.get_remote('service_tenant_name')
56 }
57 else:
58 return {}
55 59
56 def auth_data_complete(self): 60 def auth_data_complete(self):
57 data = self.credentials() 61 data = self.credentials()