b47217a447
This enhancement to system application commands entails adding a monitoring capability which monitors and updates progress throughout the execution application upload, apply and remove. Now the user can issue one of these long running system commands and subsequently run system application-list or system application-show to view the current execution progress. Tests conducted: - config controller - upload, apply and remove stx-openstack app while watching 'system application-show stx-openstack' for progress update - apply and remove two applications simultaneously while watching 'system application-list' for progress update - induce timeout Story: 2003908 Task: 28053 Change-Id: I0bd14afdc47e97985080e3fcfdaf91a96dee1402 Signed-off-by: Tee Ngo <Tee.Ngo@windriver.com>
33 lines
843 B
Python
33 lines
843 B
Python
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
|
# coding=utf-8
|
|
#
|
|
# Copyright (c) 2018 Wind River Systems, Inc.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
from sysinv.db import api as db_api
|
|
from sysinv.objects import base
|
|
from sysinv.objects import utils
|
|
|
|
|
|
class KubeApp(base.SysinvObject):
|
|
# VERSION 1.0: Initial version
|
|
VERSION = '1.0'
|
|
|
|
dbapi = db_api.get_instance()
|
|
|
|
fields = {'name': utils.str_or_none,
|
|
'manifest_name': utils.str_or_none,
|
|
'manifest_file': utils.str_or_none,
|
|
'status': utils.str_or_none,
|
|
'progress': utils.str_or_none,
|
|
}
|
|
|
|
@base.remotable_classmethod
|
|
def get_by_name(cls, context, name):
|
|
return cls.dbapi.kube_app_get(name)
|
|
|
|
def save_changes(self, context, updates):
|
|
self.dbapi.kube_app_update(self.name, updates)
|