From 15b2e9b7a85ecc7dbdb10701e4f71f18665822a2 Mon Sep 17 00:00:00 2001 From: Michael Haigh Date: Tue, 23 Apr 2024 11:47:55 -0400 Subject: [PATCH] improving protections/schedules output and deletion Signed-off-by: Michael Haigh --- astraSDK/k8s.py | 2 ++ tkSrc/choices.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/astraSDK/k8s.py b/astraSDK/k8s.py index f326693..9fe2dc7 100644 --- a/astraSDK/k8s.py +++ b/astraSDK/k8s.py @@ -243,6 +243,7 @@ def getTableInfo(self, plural, headers=False): "dayOfMonth", "snapRetention", "backupRetention", + "appVaultRef", ] return [ "spec.applicationRef", @@ -254,6 +255,7 @@ def getTableInfo(self, plural, headers=False): "spec.dayOfMonth", "spec.snapshotRetention", "spec.backupRetention", + "spec.appVaultRef", ] elif plural == "snapshots": if headers: diff --git a/tkSrc/choices.py b/tkSrc/choices.py index 82214b1..d1cf6ba 100644 --- a/tkSrc/choices.py +++ b/tkSrc/choices.py @@ -375,7 +375,9 @@ def main(argv, verbs, verbPosition, ard, acl, v3, v3_skip_tls_verify=False): acl.apps = ard.buildList("apps", "id") ard.hooks = astraSDK.hooks.getHooks().main() acl.hooks = ard.buildList("hooks", "id", fKey="appID", fVal=argv[verbPosition + 2]) - elif argv[verbPosition + 1] == "protection" and len(argv) - verbPosition >= 3: + elif ( + argv[verbPosition + 1] == "protection" or argv[verbPosition + 1] == "schedule" + ) and len(argv) - verbPosition >= 3: if v3: ard.apps = astraSDK.k8s.getResources( config_context=v3, skip_tls_verify=v3_skip_tls_verify