Merge lp:~fnordahl/charm-helpers/bug-1636098 into lp:charm-helpers

Proposed by Frode Nordahl
Status: Merged
Merged at revision: 657
Proposed branch: lp:~fnordahl/charm-helpers/bug-1636098
Merge into: lp:charm-helpers
Diff against target: 129 lines (+18/-0)
3 files modified
charmhelpers/contrib/openstack/context.py (+1/-0)
charmhelpers/contrib/openstack/templates/section-keystone-authtoken-mitaka (+5/-0)
tests/contrib/openstack/test_os_contexts.py (+12/-0)
To merge this branch: bzr merge lp:~fnordahl/charm-helpers/bug-1636098
Reviewer Review Type Date Requested Status
Edward Hope-Morley Approve
Review via email: mp+310681@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Edward Hope-Morley (hopem) wrote :

lgtm +1

review: Approve
657. By Edward Hope-Morley

[fnordahl,r=] Add service_domain to IdentityServiceContext

Use domain name from context when Keystone API version is 3

Related-Bug: 1636098

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'charmhelpers/contrib/openstack/context.py'
--- charmhelpers/contrib/openstack/context.py 2016-10-10 14:57:46 +0000
+++ charmhelpers/contrib/openstack/context.py 2016-11-11 18:39:44 +0000
@@ -337,6 +337,7 @@
337 'service_host': serv_host,337 'service_host': serv_host,
338 'auth_host': auth_host,338 'auth_host': auth_host,
339 'auth_port': rdata.get('auth_port'),339 'auth_port': rdata.get('auth_port'),
340 'admin_domain_name': rdata.get('service_domain'),
340 'admin_tenant_name': rdata.get('service_tenant'),341 'admin_tenant_name': rdata.get('service_tenant'),
341 'admin_user': rdata.get('service_username'),342 'admin_user': rdata.get('service_username'),
342 'admin_password': rdata.get('service_password'),343 'admin_password': rdata.get('service_password'),
343344
=== modified file 'charmhelpers/contrib/openstack/templates/section-keystone-authtoken-mitaka'
--- charmhelpers/contrib/openstack/templates/section-keystone-authtoken-mitaka 2016-04-17 15:54:55 +0000
+++ charmhelpers/contrib/openstack/templates/section-keystone-authtoken-mitaka 2016-11-11 18:39:44 +0000
@@ -3,8 +3,13 @@
3auth_uri = {{ service_protocol }}://{{ service_host }}:{{ service_port }}3auth_uri = {{ service_protocol }}://{{ service_host }}:{{ service_port }}
4auth_url = {{ auth_protocol }}://{{ auth_host }}:{{ auth_port }}4auth_url = {{ auth_protocol }}://{{ auth_host }}:{{ auth_port }}
5auth_type = password5auth_type = password
6{% if api_version == "3" -%}
7project_domain_name = {{ admin_domain_name }}
8user_domain_name = {{ admin_domain_name }}
9{% else -%}
6project_domain_name = default10project_domain_name = default
7user_domain_name = default11user_domain_name = default
12{% endif -%}
8project_name = {{ admin_tenant_name }}13project_name = {{ admin_tenant_name }}
9username = {{ admin_user }}14username = {{ admin_user }}
10password = {{ admin_password }}15password = {{ admin_password }}
1116
=== modified file 'tests/contrib/openstack/test_os_contexts.py'
--- tests/contrib/openstack/test_os_contexts.py 2016-10-10 14:57:46 +0000
+++ tests/contrib/openstack/test_os_contexts.py 2016-11-11 18:39:44 +0000
@@ -121,6 +121,7 @@
121 'service_host': 'keystonehost.local',121 'service_host': 'keystonehost.local',
122 'auth_host': 'keystone-host.local',122 'auth_host': 'keystone-host.local',
123 'auth_port': '35357',123 'auth_port': '35357',
124 'service_domain': 'admin_domain',
124 'service_tenant': 'admin',125 'service_tenant': 'admin',
125 'service_tenant_id': '123456',126 'service_tenant_id': '123456',
126 'service_password': 'foo',127 'service_password': 'foo',
@@ -134,6 +135,7 @@
134 'service_host': 'keystonehost.local',135 'service_host': 'keystonehost.local',
135 'auth_host': 'keystone-host.local',136 'auth_host': 'keystone-host.local',
136 'auth_port': '35357',137 'auth_port': '35357',
138 'service_domain': 'admin_domain',
137 'service_tenant': 'admin',139 'service_tenant': 'admin',
138 'service_password': 'foo',140 'service_password': 'foo',
139 'service_username': 'adam',141 'service_username': 'adam',
@@ -146,6 +148,7 @@
146 'service_host': 'keystonehost.local',148 'service_host': 'keystonehost.local',
147 'auth_host': 'keystone-host.local',149 'auth_host': 'keystone-host.local',
148 'auth_port': '35357',150 'auth_port': '35357',
151 'service_domain': 'admin_domain',
149 'service_tenant': 'admin',152 'service_tenant': 'admin',
150 'service_password': 'foo',153 'service_password': 'foo',
151 'service_username': 'adam',154 'service_username': 'adam',
@@ -158,6 +161,7 @@
158 'service_host': 'keystonehost.local',161 'service_host': 'keystonehost.local',
159 'auth_host': 'keystone-host.local',162 'auth_host': 'keystone-host.local',
160 'auth_port': '35357',163 'auth_port': '35357',
164 'service_domain': 'admin_domain',
161 'service_tenant': 'admin',165 'service_tenant': 'admin',
162 'service_password': 'foo',166 'service_password': 'foo',
163 'service_username': 'adam',167 'service_username': 'adam',
@@ -185,6 +189,7 @@
185 'service_host': 'keystonehost.local',189 'service_host': 'keystonehost.local',
186 'auth_host': 'keystone-host.local',190 'auth_host': 'keystone-host.local',
187 'auth_port': '35357',191 'auth_port': '35357',
192 'service_domain': 'admin_domain',
188 'service_tenant': 'admin',193 'service_tenant': 'admin',
189 'service_password': 'foo',194 'service_password': 'foo',
190 'service_username': 'adam',195 'service_username': 'adam',
@@ -754,6 +759,7 @@
754 result = identity_service()759 result = identity_service()
755 expected = {760 expected = {
756 'admin_password': 'foo',761 'admin_password': 'foo',
762 'admin_domain_name': 'admin_domain',
757 'admin_tenant_name': 'admin',763 'admin_tenant_name': 'admin',
758 'admin_tenant_id': None,764 'admin_tenant_id': None,
759 'admin_user': 'adam',765 'admin_user': 'adam',
@@ -781,6 +787,7 @@
781 result = identity_service()787 result = identity_service()
782 expected = {788 expected = {
783 'admin_password': 'foo',789 'admin_password': 'foo',
790 'admin_domain_name': 'admin_domain',
784 'admin_tenant_name': 'admin',791 'admin_tenant_name': 'admin',
785 'admin_tenant_id': None,792 'admin_tenant_id': None,
786 'admin_user': 'adam',793 'admin_user': 'adam',
@@ -804,6 +811,7 @@
804 result = identity_service()811 result = identity_service()
805 expected = {812 expected = {
806 'admin_password': 'foo',813 'admin_password': 'foo',
814 'admin_domain_name': 'admin_domain',
807 'admin_tenant_name': 'admin',815 'admin_tenant_name': 'admin',
808 'admin_tenant_id': None,816 'admin_tenant_id': None,
809 'admin_user': 'adam',817 'admin_user': 'adam',
@@ -827,6 +835,7 @@
827 result = identity_service()835 result = identity_service()
828 expected = {836 expected = {
829 'admin_password': 'foo',837 'admin_password': 'foo',
838 'admin_domain_name': 'admin_domain',
830 'admin_tenant_name': 'admin',839 'admin_tenant_name': 'admin',
831 'admin_tenant_id': '123456',840 'admin_tenant_id': '123456',
832 'admin_user': 'adam',841 'admin_user': 'adam',
@@ -848,6 +857,7 @@
848 result = identity_service()857 result = identity_service()
849 expected = {858 expected = {
850 'admin_password': 'foo',859 'admin_password': 'foo',
860 'admin_domain_name': 'admin_domain',
851 'admin_tenant_name': 'admin',861 'admin_tenant_name': 'admin',
852 'admin_tenant_id': None,862 'admin_tenant_id': None,
853 'admin_user': 'adam',863 'admin_user': 'adam',
@@ -869,6 +879,7 @@
869 result = identity_service()879 result = identity_service()
870 expected = {880 expected = {
871 'admin_password': 'foo',881 'admin_password': 'foo',
882 'admin_domain_name': 'admin_domain',
872 'admin_tenant_name': 'admin',883 'admin_tenant_name': 'admin',
873 'admin_tenant_id': None,884 'admin_tenant_id': None,
874 'admin_user': 'adam',885 'admin_user': 'adam',
@@ -891,6 +902,7 @@
891 result = identity_service()902 result = identity_service()
892 expected = {903 expected = {
893 'admin_password': 'foo',904 'admin_password': 'foo',
905 'admin_domain_name': 'admin_domain',
894 'admin_tenant_name': 'admin',906 'admin_tenant_name': 'admin',
895 'admin_tenant_id': '123456',907 'admin_tenant_id': '123456',
896 'admin_user': 'adam',908 'admin_user': 'adam',

Subscribers

People subscribed via source and target branches