From 28ec68df42879a847eab6d314bfbf3a0157d9f45 Mon Sep 17 00:00:00 2001 From: Alejandro Sirgo Rica Date: Mon, 26 Aug 2024 14:56:29 +0200 Subject: repo: sync repo with new API Add repo update. Example command: update repo --id 20 --address 192.168.1.189 192.168.1.191 --name test --center 1 Use addr instead of ip to pass a list of addresses. --- 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 36fcb36..8e06c19 100644 --- a/cli/cli.py +++ b/cli/cli.py @@ -191,7 +191,7 @@ class OgCLI(): OgDisk.setup_disk(self.rest, args[1:]) def update(self, args): - choices = ['image', 'center', 'room', 'folder'] + choices = ['image', 'repo', 'center', 'room', 'folder'] parser = argparse.ArgumentParser(prog='ogcli update') parser.add_argument('update_obj', choices=choices) @@ -209,6 +209,8 @@ class OgCLI(): OgRoom.update_room(self.rest, args[1:]) elif parsed_args.update_obj == 'folder': OgFolder.update_folder(self.rest, args[1:]) + elif parsed_args.update_obj == 'repo': + OgRepo.update_repo(self.rest, args[1:]) def delete(self, args): choices = ['server', 'repo', 'center', 'room', 'client', 'folder'] -- cgit v1.2.3-18-g5258