diff --git a/config.yaml b/config.yaml index b9e2d7d..d313f30 100644 --- a/config.yaml +++ b/config.yaml @@ -15,7 +15,12 @@ options: default: 'latest' type: string description: | - Provide the build version of PLUMgrid packages that needs to be installed + Provide the build version of plumgrid-pythonlib package that needs to be installed + networking-build: + default: 'latest' + type: string + description: | + Provide the build version of networking-plumgrid package that needs to be installed networking-plumgrid-version: default: null type: string diff --git a/hooks/neutron_plumgrid_hooks.py b/hooks/neutron_plumgrid_hooks.py index 21c0d85..9c4c10c 100755 --- a/hooks/neutron_plumgrid_hooks.py +++ b/hooks/neutron_plumgrid_hooks.py @@ -64,6 +64,7 @@ def config_changed(): charm_config = config() if (charm_config.changed('install_sources') or charm_config.changed('plumgrid-build') or + charm_config.changed('networking-build') or charm_config.changed('install_keys')): status_set('maintenance', 'Upgrading apt packages') if charm_config.changed('install_sources'): diff --git a/hooks/neutron_plumgrid_utils.py b/hooks/neutron_plumgrid_utils.py index eae024e..ed4fd67 100644 --- a/hooks/neutron_plumgrid_utils.py +++ b/hooks/neutron_plumgrid_utils.py @@ -28,7 +28,8 @@ from charmhelpers.contrib.openstack.utils import ( TEMPLATES = 'templates/' PG_PACKAGES = [ - 'plumgrid-pythonlib' + 'plumgrid-pythonlib', + 'networking-plumgrid' ] NEUTRON_CONF_DIR = "/etc/neutron" @@ -86,8 +87,14 @@ def determine_packages(): enable PLUMgrid in Openstack. ''' pkgs = [] - tag = config('plumgrid-build') + tag = 'latest' for pkg in PG_PACKAGES: + if pkg == 'plumgrid-pythonlib': + tag = config('plumgrid-build') + elif (pkg == 'networking-plumgrid' and + config('enable-deb-networking-install')): + tag = config('networking-build') + if tag == 'latest': pkgs.append(pkg) else: