diff options
author | Jose M. Guisado <jguisado@soleta.eu> | 2022-10-18 17:07:04 +0200 |
---|---|---|
committer | Jose M. Guisado <jguisado@soleta.eu> | 2022-10-20 12:25:10 +0200 |
commit | dff298d421afcbe2bdd2246be961d5e963b7fdd0 (patch) | |
tree | 8bef16b6ed461d29690304ebfd4b6bc9c49355a5 /cli/cli.py | |
parent | 0c1a747a31b32a068078c27fb81bc158b2ea8af5 (diff) |
create image: split into create and updatev0.2
Image creation example:
ogcli create image
--disk
--part 1
--name 18oct2
--desc 18oct2
--repo-id 1
--client-ip 192.168.56.11
Image update example:
ogcli update image
--disk 1
--part 1
--id 20
--client-ip 192.168.56.11
Diffstat (limited to 'cli/cli.py')
-rw-r--r-- | cli/cli.py | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -125,3 +125,12 @@ class OgCLI(): if parsed_args.setup_obj == 'disk': OgDisk.setup_disk(self.rest, args[1:]) + + def update(self, args): + choices = ['image'] + parser = argparse.ArgumentParser(prog='ogcli update') + parser.add_argument('update_obj', choices=choices) + parsed_args = parser.parse_args([args[0]]) + + if parsed_args.update_obj == 'image': + OgImage.update_image(self.rest, args[1:]) |