Twiddle default openstack-origin to work like cinder

This commit is contained in:
James Page 2013-09-25 17:46:09 +01:00
parent b1c25d3ef0
commit 85273685eb
2 changed files with 10 additions and 3 deletions

View File

@ -15,7 +15,7 @@ options:
traffic to the external public network. traffic to the external public network.
openstack-origin: openstack-origin:
type: string type: string
default: cloud:precise-folsom default: distro
description: | description: |
Optional configuration to support use of additional sources such as: Optional configuration to support use of additional sources such as:
. .
@ -23,6 +23,8 @@ options:
- cloud:precise-folsom/proposed - cloud:precise-folsom/proposed
- cloud:precise-folsom - cloud:precise-folsom
- deb http://my.archive.com/ubuntu main|KEYID - deb http://my.archive.com/ubuntu main|KEYID
.
Note that quantum/neutron is only supports > Folsom.
rabbit-user: rabbit-user:
type: string type: string
default: nova default: nova

View File

@ -14,7 +14,8 @@ from charmhelpers.fetch import (
filter_installed_packages, filter_installed_packages,
) )
from charmhelpers.core.host import ( from charmhelpers.core.host import (
restart_on_change restart_on_change,
lsb_release
) )
from charmhelpers.contrib.hahelpers.cluster import( from charmhelpers.contrib.hahelpers.cluster import(
eligible_leader eligible_leader
@ -50,7 +51,11 @@ CONFIGS = register_configs()
@hooks.hook('install') @hooks.hook('install')
def install(): def install():
configure_installation_source(config('openstack-origin')) src = config('openstack-origin')
if (lsb_release()['DISTRIB_CODENAME'] == 'precise' and
src == 'distro'):
src = 'cloud:precise-folsom'
configure_installation_source(src)
apt_update(fatal=True) apt_update(fatal=True)
if valid_plugin(): if valid_plugin():
apt_install(filter_installed_packages(get_early_packages()), apt_install(filter_installed_packages(get_early_packages()),