summaryrefslogtreecommitdiffstats
path: root/cli/cli.py
diff options
context:
space:
mode:
authorJavier Hernandez <jhernandez@soleta.eu>2023-10-17 13:29:26 +0200
committerJose M. Guisado <jguisado@soleta.eu>2023-10-18 09:29:38 +0200
commit181075e5053f03080f2a82784bf0368d53365e9d (patch)
treea99716f7f588efc36cd8ab4f510f22cab0303e61 /cli/cli.py
parent8be21d4ac51943c326d368a70c778fb96fa60b94 (diff)
center: add delete command
command to delete center ogcli delete center --id <center id> To delete the center with id 6 $ ogcli delete center --id 6
Diffstat (limited to 'cli/cli.py')
-rw-r--r--cli/cli.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/cli/cli.py b/cli/cli.py
index 9eab3f5..db52b4c 100644
--- a/cli/cli.py
+++ b/cli/cli.py
@@ -196,7 +196,7 @@ class OgCLI():
OgImage.update_image(self.rest, args[1:])
def delete(self, args):
- choices = ['server']
+ choices = ['server', 'center']
parser = argparse.ArgumentParser(prog='ogcli delete')
parser.add_argument('delete_obj', choices=choices)
@@ -208,6 +208,8 @@ class OgCLI():
parsed_args = parser.parse_args([args[0]])
if parsed_args.delete_obj == 'server':
OgServer.delete_server(self.rest, args[1:])
+ elif parsed_args.delete_obj == 'center':
+ OgCenter.delete_center(self.rest, args[1:])
def add(self, args):
choices = ['server', 'repo', 'center']