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

Proposed by James Page on 2016-01-05
Status: Merged
Merged at revision: 139
Proposed branch: lp:~james-page/charms/trusty/cinder/lp1531102
Merge into: lp:~openstack-charmers-archive/charms/trusty/cinder/next
Diff against target: 94 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/cinder/lp1531102
Reviewer Review Type Date Requested Status
Liam Young 2016-01-05 Approve on 2016-01-06
Review via email: mp+281605@code.launchpad.net

Commit message

Resync helpers

Description of the change

Resynce helpers

To post a comment you must log in.

charm_lint_check #16587 cinder-next for james-page mp281605
    LINT OK: passed

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

charm_unit_test #15490 cinder-next for james-page mp281605
    UNIT OK: passed

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

charm_amulet_test #8508 cinder-next for james-page mp281605
    AMULET OK: passed

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

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=== removed directory 'bin'
2=== modified file 'hooks/charmhelpers/contrib/openstack/utils.py'
3--- hooks/charmhelpers/contrib/openstack/utils.py 2016-01-04 21:26:14 +0000
4+++ hooks/charmhelpers/contrib/openstack/utils.py 2016-01-05 11:06:52 +0000
5@@ -131,40 +131,40 @@
6 # >= Liberty version->codename mapping
7 PACKAGE_CODENAMES = {
8 'nova-common': OrderedDict([
9- ('12.0.0', 'liberty'),
10- ('13.0.0', 'mitaka'),
11+ ('12.0', 'liberty'),
12+ ('13.0', 'mitaka'),
13 ]),
14 'neutron-common': OrderedDict([
15- ('7.0.0', 'liberty'),
16- ('8.0.0', 'mitaka'),
17+ ('7.0', 'liberty'),
18+ ('8.0', 'mitaka'),
19 ]),
20 'cinder-common': OrderedDict([
21- ('7.0.0', 'liberty'),
22- ('8.0.0', 'mitaka'),
23+ ('7.0', 'liberty'),
24+ ('8.0', 'mitaka'),
25 ]),
26 'keystone': OrderedDict([
27- ('8.0.0', 'liberty'),
28- ('9.0.0', 'mitaka'),
29+ ('8.0', 'liberty'),
30+ ('9.0', 'mitaka'),
31 ]),
32 'horizon-common': OrderedDict([
33- ('8.0.0', 'liberty'),
34- ('9.0.0', 'mitaka'),
35+ ('8.0', 'liberty'),
36+ ('9.0', 'mitaka'),
37 ]),
38 'ceilometer-common': OrderedDict([
39- ('5.0.0', 'liberty'),
40- ('6.0.0', 'mitaka'),
41+ ('5.0', 'liberty'),
42+ ('6.0', 'mitaka'),
43 ]),
44 'heat-common': OrderedDict([
45- ('5.0.0', 'liberty'),
46- ('6.0.0', 'mitaka'),
47+ ('5.0', 'liberty'),
48+ ('6.0', 'mitaka'),
49 ]),
50 'glance-common': OrderedDict([
51- ('11.0.0', 'liberty'),
52- ('12.0.0', 'mitaka'),
53+ ('11.0', 'liberty'),
54+ ('12.0', 'mitaka'),
55 ]),
56 'openstack-dashboard': OrderedDict([
57- ('8.0.0', 'liberty'),
58- ('9.0.0', 'mitaka'),
59+ ('8.0', 'liberty'),
60+ ('9.0', 'mitaka'),
61 ]),
62 }
63
64@@ -251,7 +251,14 @@
65 error_out(e)
66
67 vers = apt.upstream_version(pkg.current_ver.ver_str)
68- match = re.match('^(\d+)\.(\d+)\.(\d+)', vers)
69+ if 'swift' in pkg.name:
70+ # Fully x.y.z match for swift versions
71+ match = re.match('^(\d+)\.(\d+)\.(\d+)', vers)
72+ else:
73+ # x.y match only for 20XX.X
74+ # and ignore patch level for other packages
75+ match = re.match('^(\d+)\.(\d+)', vers)
76+
77 if match:
78 vers = match.group(0)
79
80@@ -263,13 +270,8 @@
81 # < Liberty co-ordinated project versions
82 try:
83 if 'swift' in pkg.name:
84- swift_vers = vers[:5]
85- if swift_vers not in SWIFT_CODENAMES:
86- # Deal with 1.10.0 upward
87- swift_vers = vers[:6]
88- return SWIFT_CODENAMES[swift_vers]
89+ return SWIFT_CODENAMES[vers]
90 else:
91- vers = vers[:6]
92 return OPENSTACK_CODENAMES[vers]
93 except KeyError:
94 if not fatal:

Subscribers

People subscribed via source and target branches