Reconfigure VIM after application install

When an application is successfully installed with armada,
reconfigure the VIM so that it can manage the newly
installed application (if necessary). This is done by
doing a runtime application of the VIM's puppet
manifest.

Change-Id: Id43f633d0571fa328410fcf8392a172abadf0e4f
Story: 2003910
Task: 27852
Signed-off-by: Bart Wensley <barton.wensley@windriver.com>
This commit is contained in:
Bart Wensley 2018-11-27 20:24:50 -06:00
parent b8bb709f18
commit 0c865f7d21
3 changed files with 11 additions and 2 deletions

View File

@ -8,6 +8,7 @@ class platform::nfv::params (
class platform::nfv {
include ::platform::params
include ::platform::amqp::params
include ::platform::kubernetes::params
group { 'nfv':
ensure => 'present',

View File

@ -602,6 +602,7 @@ class AppOperator(object):
correct/update a previous manifest apply.
:param rpc_app: application object in the RPC request
:return boolean: whether application apply was successful
"""
app = AppOperator.Application(rpc_app)
@ -649,12 +650,13 @@ class AppOperator(object):
self._update_app_status(app,
constants.APP_APPLY_SUCCESS)
LOG.info("Application (%s) apply completed." % app.name)
return
return True
except Exception as e:
LOG.exception(e)
# If it gets here, something went wrong
self._abort_operation(app, constants.APP_APPLY_OP)
return False
def perform_app_remove(self, rpc_app):
"""Process application remove request

View File

@ -10401,7 +10401,13 @@ class ConductorManager(service.PeriodicService):
:param rpc_app: data object provided in the rpc request
"""
return self._app.perform_app_apply(rpc_app)
app_installed = self._app.perform_app_apply(rpc_app)
if app_installed:
# Update the VIM configuration as it may need to manage the newly
# installed application.
self._update_vim_config(context)
return app_installed
def perform_app_remove(self, context, rpc_app):
"""Handling of application removal request (via AppOperator)