Merge lp:~gandelman-a/charms/precise/nova-cloud-controller/version_fixes into lp:~openstack-charmers/charms/precise/nova-cloud-controller/ha-support

Proposed by Adam Gandelman
Status: Merged
Merged at revision: 62
Proposed branch: lp:~gandelman-a/charms/precise/nova-cloud-controller/version_fixes
Merge into: lp:~openstack-charmers/charms/precise/nova-cloud-controller/ha-support
Diff against target: 46 lines (+8/-4)
2 files modified
hooks/lib/openstack-common (+7/-3)
revision (+1/-1)
To merge this branch: bzr merge lp:~gandelman-a/charms/precise/nova-cloud-controller/version_fixes
Reviewer Review Type Date Requested Status
James Page Approve
Review via email: mp+151669@code.launchpad.net

Description of the change

Various fixes to version handling, also adds havana.

Once approved here, I will merge changes into lp:~openstack-charmers/openstack-charm-helpers/ha-helpers and sync across all current branches that pull from there.

To post a comment you must log in.
Revision history for this message
James Page (james-page) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/lib/openstack-common'
2--- hooks/lib/openstack-common 2013-03-05 00:58:23 +0000
3+++ hooks/lib/openstack-common 2013-03-05 01:44:25 +0000
4@@ -165,8 +165,9 @@
5 fi
6
7 # have a guess based on the deb string provided
8- if [[ "${rel:0:3}" == "deb" ]]; then
9- CODENAMES="diablo essex folsom grizzly"
10+ if [[ "${rel:0:3}" == "deb" ]] || \
11+ [[ "${rel:0:3}" == "ppa" ]] ; then
12+ CODENAMES="diablo essex folsom grizzly havan"
13 for cname in $CODENAMES; do
14 if echo $rel | grep -q $cname; then
15 codename=$cname
16@@ -178,11 +179,13 @@
17
18 get_os_codename_package() {
19 local pkg_vers=$(dpkg -l | grep "$1" | awk '{ print $3 }') || echo "none"
20+ pkg_vers=$(echo $pkg_vers | cut -d: -f2) # epochs
21 case "${pkg_vers:0:6}" in
22 "2011.2") echo "diablo" ;;
23 "2012.1") echo "essex" ;;
24 "2012.2") echo "folsom" ;;
25 "2013.1") echo "grizzly" ;;
26+ "2013.2") echo "havana" ;;
27 esac
28 }
29
30@@ -191,7 +194,8 @@
31 "diablo") echo "2011.2" ;;
32 "essex") echo "2012.1" ;;
33 "folsom") echo "2012.2" ;;
34- "grizzly") echo "2012.3" ;;
35+ "grizzly") echo "2013.1" ;;
36+ "havana") echo "2013.2" ;;
37 esac
38 }
39
40
41=== modified file 'revision'
42--- revision 2013-03-05 00:58:23 +0000
43+++ revision 2013-03-05 01:44:25 +0000
44@@ -1,1 +1,1 @@
45-213
46+214

Subscribers

People subscribed via source and target branches