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
1=== modified file 'charmhelpers/contrib/openstack/context.py'
2--- charmhelpers/contrib/openstack/context.py 2016-10-10 14:57:46 +0000
3+++ charmhelpers/contrib/openstack/context.py 2016-11-11 18:39:44 +0000
4@@ -337,6 +337,7 @@
5 'service_host': serv_host,
6 'auth_host': auth_host,
7 'auth_port': rdata.get('auth_port'),
8+ 'admin_domain_name': rdata.get('service_domain'),
9 'admin_tenant_name': rdata.get('service_tenant'),
10 'admin_user': rdata.get('service_username'),
11 'admin_password': rdata.get('service_password'),
12
13=== modified file 'charmhelpers/contrib/openstack/templates/section-keystone-authtoken-mitaka'
14--- charmhelpers/contrib/openstack/templates/section-keystone-authtoken-mitaka 2016-04-17 15:54:55 +0000
15+++ charmhelpers/contrib/openstack/templates/section-keystone-authtoken-mitaka 2016-11-11 18:39:44 +0000
16@@ -3,8 +3,13 @@
17 auth_uri = {{ service_protocol }}://{{ service_host }}:{{ service_port }}
18 auth_url = {{ auth_protocol }}://{{ auth_host }}:{{ auth_port }}
19 auth_type = password
20+{% if api_version == "3" -%}
21+project_domain_name = {{ admin_domain_name }}
22+user_domain_name = {{ admin_domain_name }}
23+{% else -%}
24 project_domain_name = default
25 user_domain_name = default
26+{% endif -%}
27 project_name = {{ admin_tenant_name }}
28 username = {{ admin_user }}
29 password = {{ admin_password }}
30
31=== modified file 'tests/contrib/openstack/test_os_contexts.py'
32--- tests/contrib/openstack/test_os_contexts.py 2016-10-10 14:57:46 +0000
33+++ tests/contrib/openstack/test_os_contexts.py 2016-11-11 18:39:44 +0000
34@@ -121,6 +121,7 @@
35 'service_host': 'keystonehost.local',
36 'auth_host': 'keystone-host.local',
37 'auth_port': '35357',
38+ 'service_domain': 'admin_domain',
39 'service_tenant': 'admin',
40 'service_tenant_id': '123456',
41 'service_password': 'foo',
42@@ -134,6 +135,7 @@
43 'service_host': 'keystonehost.local',
44 'auth_host': 'keystone-host.local',
45 'auth_port': '35357',
46+ 'service_domain': 'admin_domain',
47 'service_tenant': 'admin',
48 'service_password': 'foo',
49 'service_username': 'adam',
50@@ -146,6 +148,7 @@
51 'service_host': 'keystonehost.local',
52 'auth_host': 'keystone-host.local',
53 'auth_port': '35357',
54+ 'service_domain': 'admin_domain',
55 'service_tenant': 'admin',
56 'service_password': 'foo',
57 'service_username': 'adam',
58@@ -158,6 +161,7 @@
59 'service_host': 'keystonehost.local',
60 'auth_host': 'keystone-host.local',
61 'auth_port': '35357',
62+ 'service_domain': 'admin_domain',
63 'service_tenant': 'admin',
64 'service_password': 'foo',
65 'service_username': 'adam',
66@@ -185,6 +189,7 @@
67 'service_host': 'keystonehost.local',
68 'auth_host': 'keystone-host.local',
69 'auth_port': '35357',
70+ 'service_domain': 'admin_domain',
71 'service_tenant': 'admin',
72 'service_password': 'foo',
73 'service_username': 'adam',
74@@ -754,6 +759,7 @@
75 result = identity_service()
76 expected = {
77 'admin_password': 'foo',
78+ 'admin_domain_name': 'admin_domain',
79 'admin_tenant_name': 'admin',
80 'admin_tenant_id': None,
81 'admin_user': 'adam',
82@@ -781,6 +787,7 @@
83 result = identity_service()
84 expected = {
85 'admin_password': 'foo',
86+ 'admin_domain_name': 'admin_domain',
87 'admin_tenant_name': 'admin',
88 'admin_tenant_id': None,
89 'admin_user': 'adam',
90@@ -804,6 +811,7 @@
91 result = identity_service()
92 expected = {
93 'admin_password': 'foo',
94+ 'admin_domain_name': 'admin_domain',
95 'admin_tenant_name': 'admin',
96 'admin_tenant_id': None,
97 'admin_user': 'adam',
98@@ -827,6 +835,7 @@
99 result = identity_service()
100 expected = {
101 'admin_password': 'foo',
102+ 'admin_domain_name': 'admin_domain',
103 'admin_tenant_name': 'admin',
104 'admin_tenant_id': '123456',
105 'admin_user': 'adam',
106@@ -848,6 +857,7 @@
107 result = identity_service()
108 expected = {
109 'admin_password': 'foo',
110+ 'admin_domain_name': 'admin_domain',
111 'admin_tenant_name': 'admin',
112 'admin_tenant_id': None,
113 'admin_user': 'adam',
114@@ -869,6 +879,7 @@
115 result = identity_service()
116 expected = {
117 'admin_password': 'foo',
118+ 'admin_domain_name': 'admin_domain',
119 'admin_tenant_name': 'admin',
120 'admin_tenant_id': None,
121 'admin_user': 'adam',
122@@ -891,6 +902,7 @@
123 result = identity_service()
124 expected = {
125 'admin_password': 'foo',
126+ 'admin_domain_name': 'admin_domain',
127 'admin_tenant_name': 'admin',
128 'admin_tenant_id': '123456',
129 'admin_user': 'adam',

Subscribers

People subscribed via source and target branches