Merge lp:~james-page/charms/trusty/nova-compute/lp1531102 into lp:~openstack-charmers-archive/charms/trusty/nova-compute/next

Proposed by James Page
Status: Merged
Merged at revision: 187
Proposed branch: lp:~james-page/charms/trusty/nova-compute/lp1531102
Merge into: lp:~openstack-charmers-archive/charms/trusty/nova-compute/next
Diff against target: 93 lines (+27/-25)
1 file modified
hooks/charmhelpers/contrib/openstack/utils.py (+27/-25)
To merge this branch: bzr merge lp:~james-page/charms/trusty/nova-compute/lp1531102
Reviewer Review Type Date Requested Status
Liam Young Approve
Review via email: mp+281613@code.launchpad.net

Commit message

Resync helpers

Description of the change

Resync helpers

To post a comment you must log in.
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #16596 nova-compute-next for james-page mp281613
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/16596/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #15500 nova-compute-next for james-page mp281613
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/15500/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #8513 nova-compute-next for james-page mp281613
    AMULET OK: passed

Build: http://10.245.162.77:8080/job/charm_amulet_test/8513/

Revision history for this message
Liam Young (gnuoy) wrote :

Approve

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'hooks/charmhelpers/contrib/openstack/utils.py'
--- hooks/charmhelpers/contrib/openstack/utils.py 2016-01-04 21:29:58 +0000
+++ hooks/charmhelpers/contrib/openstack/utils.py 2016-01-05 11:43:19 +0000
@@ -131,40 +131,40 @@
131# >= Liberty version->codename mapping131# >= Liberty version->codename mapping
132PACKAGE_CODENAMES = {132PACKAGE_CODENAMES = {
133 'nova-common': OrderedDict([133 'nova-common': OrderedDict([
134 ('12.0.0', 'liberty'),134 ('12.0', 'liberty'),
135 ('13.0.0', 'mitaka'),135 ('13.0', 'mitaka'),
136 ]),136 ]),
137 'neutron-common': OrderedDict([137 'neutron-common': OrderedDict([
138 ('7.0.0', 'liberty'),138 ('7.0', 'liberty'),
139 ('8.0.0', 'mitaka'),139 ('8.0', 'mitaka'),
140 ]),140 ]),
141 'cinder-common': OrderedDict([141 'cinder-common': OrderedDict([
142 ('7.0.0', 'liberty'),142 ('7.0', 'liberty'),
143 ('8.0.0', 'mitaka'),143 ('8.0', 'mitaka'),
144 ]),144 ]),
145 'keystone': OrderedDict([145 'keystone': OrderedDict([
146 ('8.0.0', 'liberty'),146 ('8.0', 'liberty'),
147 ('9.0.0', 'mitaka'),147 ('9.0', 'mitaka'),
148 ]),148 ]),
149 'horizon-common': OrderedDict([149 'horizon-common': OrderedDict([
150 ('8.0.0', 'liberty'),150 ('8.0', 'liberty'),
151 ('9.0.0', 'mitaka'),151 ('9.0', 'mitaka'),
152 ]),152 ]),
153 'ceilometer-common': OrderedDict([153 'ceilometer-common': OrderedDict([
154 ('5.0.0', 'liberty'),154 ('5.0', 'liberty'),
155 ('6.0.0', 'mitaka'),155 ('6.0', 'mitaka'),
156 ]),156 ]),
157 'heat-common': OrderedDict([157 'heat-common': OrderedDict([
158 ('5.0.0', 'liberty'),158 ('5.0', 'liberty'),
159 ('6.0.0', 'mitaka'),159 ('6.0', 'mitaka'),
160 ]),160 ]),
161 'glance-common': OrderedDict([161 'glance-common': OrderedDict([
162 ('11.0.0', 'liberty'),162 ('11.0', 'liberty'),
163 ('12.0.0', 'mitaka'),163 ('12.0', 'mitaka'),
164 ]),164 ]),
165 'openstack-dashboard': OrderedDict([165 'openstack-dashboard': OrderedDict([
166 ('8.0.0', 'liberty'),166 ('8.0', 'liberty'),
167 ('9.0.0', 'mitaka'),167 ('9.0', 'mitaka'),
168 ]),168 ]),
169}169}
170170
@@ -251,7 +251,14 @@
251 error_out(e)251 error_out(e)
252252
253 vers = apt.upstream_version(pkg.current_ver.ver_str)253 vers = apt.upstream_version(pkg.current_ver.ver_str)
254 match = re.match('^(\d+)\.(\d+)\.(\d+)', vers)254 if 'swift' in pkg.name:
255 # Fully x.y.z match for swift versions
256 match = re.match('^(\d+)\.(\d+)\.(\d+)', vers)
257 else:
258 # x.y match only for 20XX.X
259 # and ignore patch level for other packages
260 match = re.match('^(\d+)\.(\d+)', vers)
261
255 if match:262 if match:
256 vers = match.group(0)263 vers = match.group(0)
257264
@@ -263,13 +270,8 @@
263 # < Liberty co-ordinated project versions270 # < Liberty co-ordinated project versions
264 try:271 try:
265 if 'swift' in pkg.name:272 if 'swift' in pkg.name:
266 swift_vers = vers[:5]273 return SWIFT_CODENAMES[vers]
267 if swift_vers not in SWIFT_CODENAMES:
268 # Deal with 1.10.0 upward
269 swift_vers = vers[:6]
270 return SWIFT_CODENAMES[swift_vers]
271 else:274 else:
272 vers = vers[:6]
273 return OPENSTACK_CODENAMES[vers]275 return OPENSTACK_CODENAMES[vers]
274 except KeyError:276 except KeyError:
275 if not fatal:277 if not fatal:

Subscribers

People subscribed via source and target branches