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

Proposed by Frode Nordahl
Status: Merged
Merged at revision: 661
Proposed branch: lp:~fnordahl/charm-helpers/bug-1636098
Merge into: lp:charm-helpers
Diff against target: 140 lines (+10/-7)
7 files modified
charmhelpers/contrib/openstack/context.py (+4/-1)
charmhelpers/contrib/openstack/neutron.py (+2/-0)
charmhelpers/contrib/openstack/utils.py (+1/-0)
tests/contrib/openstack/test_os_contexts.py (+0/-6)
tests/core/test_services.py (+1/-0)
tests/core/test_unitdata.py (+1/-0)
tools/charm_helpers_sync/charm_helpers_sync.py (+1/-0)
To merge this branch: bzr merge lp:~fnordahl/charm-helpers/bug-1636098
Reviewer Review Type Date Requested Status
Liam Young (community) Approve
Edward Hope-Morley Pending
Review via email: mp+311878@code.launchpad.net

Description of the change

Updated version that fix compability with relation changes in charm-keystone

To post a comment you must log in.
Revision history for this message
Liam Young (gnuoy) wrote :

LGTM, thanks

review: Approve

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-11-11 18:38:30 +0000
3+++ charmhelpers/contrib/openstack/context.py 2016-11-26 15:53:07 +0000
4@@ -337,7 +337,6 @@
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@@ -345,6 +344,10 @@
13 'auth_protocol': auth_protocol,
14 'api_version': api_version})
15
16+ if float(api_version) > 2:
17+ ctxt.update({'admin_domain_name':
18+ rdata.get('service_domain')})
19+
20 if self.context_complete(ctxt):
21 # NOTE(jamespage) this is required for >= icehouse
22 # so a missing value just indicates keystone needs
23
24=== modified file 'charmhelpers/contrib/openstack/neutron.py'
25--- charmhelpers/contrib/openstack/neutron.py 2016-09-22 19:04:33 +0000
26+++ charmhelpers/contrib/openstack/neutron.py 2016-11-26 15:53:07 +0000
27@@ -32,6 +32,7 @@
28 kver = check_output(['uname', '-r']).decode('UTF-8').strip()
29 return 'linux-headers-%s' % kver
30
31+
32 QUANTUM_CONF_DIR = '/etc/quantum'
33
34
35@@ -91,6 +92,7 @@
36 }
37 }
38
39+
40 NEUTRON_CONF_DIR = '/etc/neutron'
41
42
43
44=== modified file 'charmhelpers/contrib/openstack/utils.py'
45--- charmhelpers/contrib/openstack/utils.py 2016-11-11 18:09:38 +0000
46+++ charmhelpers/contrib/openstack/utils.py 2016-11-26 15:53:07 +0000
47@@ -683,6 +683,7 @@
48 else:
49 zap_disk(block_device)
50
51+
52 is_ip = ip.is_ip
53 ns_query = ip.ns_query
54 get_host_ip = ip.get_host_ip
55
56=== modified file 'tests/contrib/openstack/test_os_contexts.py'
57--- tests/contrib/openstack/test_os_contexts.py 2016-11-11 18:38:30 +0000
58+++ tests/contrib/openstack/test_os_contexts.py 2016-11-26 15:53:07 +0000
59@@ -759,7 +759,6 @@
60 result = identity_service()
61 expected = {
62 'admin_password': 'foo',
63- 'admin_domain_name': 'admin_domain',
64 'admin_tenant_name': 'admin',
65 'admin_tenant_id': None,
66 'admin_user': 'adam',
67@@ -787,7 +786,6 @@
68 result = identity_service()
69 expected = {
70 'admin_password': 'foo',
71- 'admin_domain_name': 'admin_domain',
72 'admin_tenant_name': 'admin',
73 'admin_tenant_id': None,
74 'admin_user': 'adam',
75@@ -811,7 +809,6 @@
76 result = identity_service()
77 expected = {
78 'admin_password': 'foo',
79- 'admin_domain_name': 'admin_domain',
80 'admin_tenant_name': 'admin',
81 'admin_tenant_id': None,
82 'admin_user': 'adam',
83@@ -835,7 +832,6 @@
84 result = identity_service()
85 expected = {
86 'admin_password': 'foo',
87- 'admin_domain_name': 'admin_domain',
88 'admin_tenant_name': 'admin',
89 'admin_tenant_id': '123456',
90 'admin_user': 'adam',
91@@ -857,7 +853,6 @@
92 result = identity_service()
93 expected = {
94 'admin_password': 'foo',
95- 'admin_domain_name': 'admin_domain',
96 'admin_tenant_name': 'admin',
97 'admin_tenant_id': None,
98 'admin_user': 'adam',
99@@ -902,7 +897,6 @@
100 result = identity_service()
101 expected = {
102 'admin_password': 'foo',
103- 'admin_domain_name': 'admin_domain',
104 'admin_tenant_name': 'admin',
105 'admin_tenant_id': '123456',
106 'admin_user': 'adam',
107
108=== modified file 'tests/core/test_services.py'
109--- tests/core/test_services.py 2015-12-08 05:43:34 +0000
110+++ tests/core/test_services.py 2016-11-26 15:53:07 +0000
111@@ -863,5 +863,6 @@
112 mock.call(1),
113 mock.call(2)])
114
115+
116 if __name__ == '__main__':
117 unittest.main()
118
119=== modified file 'tests/core/test_unitdata.py'
120--- tests/core/test_unitdata.py 2015-02-06 13:46:20 +0000
121+++ tests/core/test_unitdata.py 2016-11-26 15:53:07 +0000
122@@ -222,5 +222,6 @@
123 kv.flush(False)
124 self.assertEqual(kv.get('hello'), 'world')
125
126+
127 if __name__ == '__main__':
128 unittest.main()
129
130=== modified file 'tools/charm_helpers_sync/charm_helpers_sync.py'
131--- tools/charm_helpers_sync/charm_helpers_sync.py 2016-07-06 14:41:05 +0000
132+++ tools/charm_helpers_sync/charm_helpers_sync.py 2016-11-26 15:53:07 +0000
133@@ -191,6 +191,7 @@
134 inc, opts = extract_options(m, global_options)
135 sync(src, dest, '%s.%s' % (k, inc), opts)
136
137+
138 if __name__ == '__main__':
139 parser = optparse.OptionParser()
140 parser.add_option('-c', '--config', action='store', dest='config',

Subscribers

People subscribed via source and target branches