From 6b4a7a64eedc3f4feb4a8be0177de059c99507d3 Mon Sep 17 00:00:00 2001 From: OpenGnSys Support Team Date: Thu, 30 Nov 2023 22:17:39 +0100 Subject: repository: delete command Allow to delete a repository with: $ ogcli delete repo --id 10 --- cli/cli.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cli/cli.py') diff --git a/cli/cli.py b/cli/cli.py index 8933b93..1a31d61 100644 --- a/cli/cli.py +++ b/cli/cli.py @@ -197,7 +197,7 @@ class OgCLI(): OgImage.update_image(self.rest, args[1:]) def delete(self, args): - choices = ['server', 'center', 'room', 'client'] + choices = ['server', 'repo', 'center', 'room', 'client'] parser = argparse.ArgumentParser(prog='ogcli delete') parser.add_argument('delete_obj', choices=choices) @@ -209,6 +209,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 == 'repo': + OgRepo.delete_repo(self.rest, args[1:]) elif parsed_args.delete_obj == 'center': OgCenter.delete_center(self.rest, args[1:]) elif parsed_args.delete_obj == 'room': -- cgit v1.2.3-18-g5258