diff options
author | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-02-09 11:32:10 +0100 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2024-02-13 12:13:00 +0100 |
commit | 9be4de87b7ba14adc6754f408d855b960ffeca25 (patch) | |
tree | a39db25f300b338ffb71a538485f22c646286d06 /cli/cli.py | |
parent | 499272fa2996fa0d1152645e190d8012b6b83a50 (diff) |
ogcli: add update command for folder, room and center
Expand of the update command to be able to modify the values of
previous folder, room and center configurations.
Diffstat (limited to 'cli/cli.py')
-rw-r--r-- | cli/cli.py | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -186,7 +186,7 @@ class OgCLI(): OgDisk.setup_disk(self.rest, args[1:]) def update(self, args): - choices = ['image'] + choices = ['image', 'center', 'room', 'folder'] parser = argparse.ArgumentParser(prog='ogcli update') parser.add_argument('update_obj', choices=choices) @@ -198,6 +198,12 @@ class OgCLI(): parsed_args = parser.parse_args([args[0]]) if parsed_args.update_obj == 'image': OgImage.update_image(self.rest, args[1:]) + elif parsed_args.update_obj == 'center': + OgCenter.update_center(self.rest, args[1:]) + elif parsed_args.update_obj == 'room': + OgRoom.update_room(self.rest, args[1:]) + elif parsed_args.update_obj == 'folder': + OgFolder.update_folder(self.rest, args[1:]) def delete(self, args): choices = ['server', 'repo', 'center', 'room', 'client', 'folder'] @@ -220,7 +226,7 @@ class OgCLI(): OgRoom.delete_room(self.rest, args[1:]) elif parsed_args.delete_obj == 'client': OgClient.delete_client(self.rest, args[1:]) - elif parsed_args.add_obj == 'folder': + elif parsed_args.delete_obj == 'folder': OgFolder.delete_folder(self.rest, args[1:]) def add(self, args): |