Exposing the API to collect all apps
Adding the api that returns all apps from the database to the client to be used in the 21-k8s-app-upgrade script in order to correctly log the current update/revert state of the apps. Test Plan: PASS: build-pkgs && build-image PASS: Fresh install AIO-SX PASS: Platform upgrade stx-10 to master PASS: Platform rollback from master to stx-10 PASS: The api returns a list of apps loaded into the database as expected. Partial-bug: 2121827 Change-Id: I1e1d6e653e7bc0f0a529413b7c31996dff7d95ef Signed-off-by: David Bastos <david.barbosabastos@windriver.com>
This commit is contained in:
@@ -15,6 +15,10 @@ class KubeAppManager(base.Manager):
|
||||
_, body = self.api.json_request('POST', f"{self.path}evaluate_apps_reapply/", body=triggers)
|
||||
return body
|
||||
|
||||
def get_all_apps(self):
|
||||
_, response = self.api.json_request('GET', f"{self.path}apps/")
|
||||
return response.get('apps', [])
|
||||
|
||||
def update_all(self):
|
||||
return self.api.json_request('POST', f"{self.path}apps/update_all/")
|
||||
|
||||
|
Reference in New Issue
Block a user