Version specific install of packages enabled
This commit is contained in:
parent
ee78ac30a2
commit
97edfaac50
10
config.yaml
10
config.yaml
@ -23,6 +23,16 @@ options:
|
||||
default: null
|
||||
type: string
|
||||
description: Provide the respective keys of the install sources.
|
||||
plumgrid-build:
|
||||
default: 'latest'
|
||||
type: string
|
||||
description: |
|
||||
Provide the build version of PLUMgrid packages that needs to be installed
|
||||
iovisor-build:
|
||||
default: 'latest'
|
||||
type: string
|
||||
description: |
|
||||
Provide the build version of iovisor package that needs to be installed
|
||||
plumgrid-license-key:
|
||||
default: null
|
||||
type: string
|
||||
|
@ -204,8 +204,8 @@ def neutron_plugins():
|
||||
database=config('database'),
|
||||
ssl_dir=NEUTRON_CONF_DIR)],
|
||||
'services': [],
|
||||
'packages': [['plumgrid-lxc'],
|
||||
['iovisor-dkms']],
|
||||
'packages': ['plumgrid-lxc',
|
||||
'iovisor-dkms'],
|
||||
'server_packages': ['neutron-server',
|
||||
'neutron-plugin-plumgrid'],
|
||||
'server_services': ['neutron-server']
|
||||
|
@ -15,6 +15,9 @@ from charmhelpers.contrib.network.ip import (
|
||||
get_bridge_nics,
|
||||
is_ip
|
||||
)
|
||||
from charmhelpers.fetch import (
|
||||
apt_cache
|
||||
)
|
||||
from charmhelpers.contrib.openstack import templating
|
||||
from charmhelpers.core.host import set_nic_mtu
|
||||
from collections import OrderedDict
|
||||
@ -80,7 +83,25 @@ def determine_packages():
|
||||
Returns list of packages required by PLUMgrid director as specified
|
||||
in the neutron_plugins dictionary in charmhelpers.
|
||||
'''
|
||||
return neutron_plugin_attribute('plumgrid', 'packages', 'neutron')
|
||||
pkgs = []
|
||||
tag = 'latest'
|
||||
for pkg in neutron_plugin_attribute('plumgrid', 'packages', 'neutron'):
|
||||
if 'plumgrid' in pkg:
|
||||
tag = config('plumgrid-build')
|
||||
elif pkg == 'iovisor-dkms':
|
||||
tag = config('iovisor-build')
|
||||
|
||||
if tag == 'latest':
|
||||
pkgs.append(pkg)
|
||||
else:
|
||||
if tag in [i.ver_str for i in apt_cache()[pkg].version_list]:
|
||||
pkgs.append('%s=%s' % (pkg, tag))
|
||||
else:
|
||||
error_msg = \
|
||||
"Build version '%s' for package '%s' not available" \
|
||||
% (tag, pkg)
|
||||
raise ValueError(error_msg)
|
||||
return pkgs
|
||||
|
||||
|
||||
def register_configs(release=None):
|
||||
|
Loading…
Reference in New Issue
Block a user