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

Subscribers

People subscribed via source and target branches