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

Proposed by James Page on 2016-01-07
Status: Merged
Merged at revision: 145
Proposed branch: lp:~james-page/charms/trusty/nova-compute/lp1531102-trunk
Merge into: lp:~openstack-charmers-archive/charms/trusty/nova-compute/trunk
Diff against target: 75 lines (+18/-16)
1 file modified
hooks/charmhelpers/contrib/openstack/utils.py (+18/-16)
To merge this branch: bzr merge lp:~james-page/charms/trusty/nova-compute/lp1531102-trunk
Reviewer Review Type Date Requested Status
Liam Young 2016-01-07 Approve on 2016-01-08
Review via email: mp+281866@code.launchpad.net

Commit message

Resync helpers

Description of the change

Resync stable helpers to resolve liberty point release issues.

To post a comment you must log in.

charm_lint_check #16736 nova-compute for james-page mp281866
    LINT OK: passed

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

charm_unit_test #15638 nova-compute for james-page mp281866
    UNIT OK: passed

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

charm_amulet_test #8564 nova-compute for james-page mp281866
    AMULET OK: passed

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

Liam Young (gnuoy) wrote :

approve

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/charmhelpers/contrib/openstack/utils.py'
2--- hooks/charmhelpers/contrib/openstack/utils.py 2015-10-22 15:11:10 +0000
3+++ hooks/charmhelpers/contrib/openstack/utils.py 2016-01-07 14:23:06 +0000
4@@ -127,31 +127,31 @@
5 # >= Liberty version->codename mapping
6 PACKAGE_CODENAMES = {
7 'nova-common': OrderedDict([
8- ('12.0.0', 'liberty'),
9+ ('12.0', 'liberty'),
10 ]),
11 'neutron-common': OrderedDict([
12- ('7.0.0', 'liberty'),
13+ ('7.0', 'liberty'),
14 ]),
15 'cinder-common': OrderedDict([
16- ('7.0.0', 'liberty'),
17+ ('7.0', 'liberty'),
18 ]),
19 'keystone': OrderedDict([
20- ('8.0.0', 'liberty'),
21+ ('8.0', 'liberty'),
22 ]),
23 'horizon-common': OrderedDict([
24- ('8.0.0', 'liberty'),
25+ ('8.0', 'liberty'),
26 ]),
27 'ceilometer-common': OrderedDict([
28- ('5.0.0', 'liberty'),
29+ ('5.0', 'liberty'),
30 ]),
31 'heat-common': OrderedDict([
32- ('5.0.0', 'liberty'),
33+ ('5.0', 'liberty'),
34 ]),
35 'glance-common': OrderedDict([
36- ('11.0.0', 'liberty'),
37+ ('11.0', 'liberty'),
38 ]),
39 'openstack-dashboard': OrderedDict([
40- ('8.0.0', 'liberty'),
41+ ('8.0', 'liberty'),
42 ]),
43 }
44
45@@ -238,7 +238,14 @@
46 error_out(e)
47
48 vers = apt.upstream_version(pkg.current_ver.ver_str)
49- match = re.match('^(\d+)\.(\d+)\.(\d+)', vers)
50+ if 'swift' in pkg.name:
51+ # Fully x.y.z match for swift versions
52+ match = re.match('^(\d+)\.(\d+)\.(\d+)', vers)
53+ else:
54+ # x.y match only for 20XX.X
55+ # and ignore patch level for other packages
56+ match = re.match('^(\d+)\.(\d+)', vers)
57+
58 if match:
59 vers = match.group(0)
60
61@@ -250,13 +257,8 @@
62 # < Liberty co-ordinated project versions
63 try:
64 if 'swift' in pkg.name:
65- swift_vers = vers[:5]
66- if swift_vers not in SWIFT_CODENAMES:
67- # Deal with 1.10.0 upward
68- swift_vers = vers[:6]
69- return SWIFT_CODENAMES[swift_vers]
70+ return SWIFT_CODENAMES[vers]
71 else:
72- vers = vers[:6]
73 return OPENSTACK_CODENAMES[vers]
74 except KeyError:
75 if not fatal:

Subscribers

People subscribed via source and target branches