Browse Source

credentials() also returns "region" parameter

master
Alvaro Uría 3 years ago
parent
commit
19f108508b
1 changed files with 11 additions and 1 deletions
  1. 11
    1
      requires.py

+ 11
- 1
requires.py View File

@@ -43,6 +43,15 @@ class KeystoneRequires(RelationBase):
43 43
     def credentials(self):
44 44
         """
45 45
         Returns a dict of keystone admin credentials
46
+
47
+        keystone provides:
48
+            {u'service_password': u'XXXXXXXX',
49
+             u'service_port': u'5000',
50
+             u'private-address': u'10.XX.XX.XXX',
51
+             u'service_hostname': u'10.XX.XX.XXX',
52
+             u'service_username': u'admin',
53
+             u'service_tenant_name': u'Admin',
54
+             u'service_region': u'RegionOne'}
46 55
         """
47 56
         convs = self.conversations()
48 57
         if len(convs) > 0:
@@ -52,7 +61,8 @@ class KeystoneRequires(RelationBase):
52 61
                 'service_port': conv.get_remote('service_port'),
53 62
                 'service_username': conv.get_remote('service_username'),
54 63
                 'service_password': conv.get_remote('service_password'),
55
-                'service_tenant_name': conv.get_remote('service_tenant_name')
64
+                'service_tenant_name': conv.get_remote('service_tenant_name'),
65
+                'service_region': conv.get_remote('service_region')
56 66
             }
57 67
         else:
58 68
             return {}

Loading…
Cancel
Save