Merge lp:~gandelman-a/charms/oneiric/nova-cloud-controller/custom_ppa into lp:~charmers/charms/oneiric/nova-cloud-controller/trunk

Proposed by Adam Gandelman
Status: Merged
Approved by: Juan L. Negron
Approved revision: 23
Merge reported by: Juan L. Negron
Merged at revision: not available
Proposed branch: lp:~gandelman-a/charms/oneiric/nova-cloud-controller/custom_ppa
Merge into: lp:~charmers/charms/oneiric/nova-cloud-controller/trunk
Diff against target: 44 lines (+18/-5)
2 files modified
config.yaml (+1/-1)
hooks/nova-cloud-controller-common (+17/-4)
To merge this branch: bzr merge lp:~gandelman-a/charms/oneiric/nova-cloud-controller/custom_ppa
Reviewer Review Type Date Requested Status
Juan L. Negron (community) Approve
Review via email: mp+85981@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Juan L. Negron (negronjl) wrote :

Reviewing this now.

-Juan

Revision history for this message
Juan L. Negron (negronjl) wrote :

Approved and Merged.

-Juan

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'config.yaml'
2--- config.yaml 2011-10-26 22:22:12 +0000
3+++ config.yaml 2011-12-16 02:43:25 +0000
4@@ -2,7 +2,7 @@
5 nova-release:
6 default: distro
7 type: string
8- description: Nova PPA from which to install. (distro, trunk, milestone, milestone-proposed)
9+ description: Nova PPA from which to install. (distro, trunk, milestone, milestone-proposed or ppa:somewhere/else)
10 nova-config:
11 default: /etc/nova/nova.conf
12 type: string
13
14=== modified file 'hooks/nova-cloud-controller-common'
15--- hooks/nova-cloud-controller-common 2011-11-15 01:00:20 +0000
16+++ hooks/nova-cloud-controller-common 2011-12-16 02:43:25 +0000
17@@ -114,11 +114,24 @@
18 }
19
20 function add_ppa {
21- # don't setup PPA, install from archive
22+ # Install from archive instead of PPA.
23 [[ $PPA == "distro" ]] && return 0
24- juju-log "nova-cloud-controller: Configuring PPA access for $PPA"
25 . /etc/lsb-release
26- PPA_URL="deb http://ppa.launchpad.net/nova-core/$PPA/ubuntu $DISTRIB_CODENAME main"
27- add-apt-repository "$PPA_URL" || exit 1
28+ [[ -z $PPA ]] && return 0
29+ # if referenced by name, setup ppa to upstream PPAs
30+ if [[ "$PPA" == "trunk" ]] ||
31+ [[ "$PPA" == "milestone" ]] ||
32+ [[ "$PPA" == "milestone-proposed" ]] ; then
33+ juju-log "nova: Configuring installation from upstream PPA ($PPA)"
34+ PPA_URL="deb http://ppa.launchpad.net/nova-core/$PPA/ubuntu $DISTRIB_CODENAME main"
35+ add-apt-repository "$PPA_URL" || exit 1
36+ return
37+ fi
38+ if [[ "${PPA:0:4}" == "ppa:" ]] ; then
39+ juju-log "nova: Configuring installation from custom PPA ($PPA)"
40+ add-apt-repository -y "$PPA" || exit 1
41+ return
42+ fi
43+ juju-log "nova: No PPA specified. Falling back to installation from Ubuntu archive."
44 }
45

Subscribers

People subscribed via source and target branches

to all changes: