diff options
Diffstat (limited to 'cli/objects/images.py')
-rw-r--r-- | cli/objects/images.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/cli/objects/images.py b/cli/objects/images.py index 3bed476..f0e2076 100644 --- a/cli/objects/images.py +++ b/cli/objects/images.py @@ -169,6 +169,11 @@ class OgImage(): nargs='?', required=True, help='Image id') + parser.add_argument('--backup', + action='store_true', + required=False, + default=False, + help='Create a backup before updating the image (No backup is created by default)') parser.add_argument('--repo-id', nargs='?', default=1, @@ -210,13 +215,14 @@ class OgImage(): else: print(f'Updating {image_name} image') - payload = {'clients': parsed_args.client_ip, + payload = {'repository_id': parsed_args.repo_id, + 'clients': parsed_args.client_ip, + 'partition': parsed_args.part, + 'backup': parsed_args.backup, 'disk': parsed_args.disk, 'center_id': center_id, - 'partition': parsed_args.part, - 'code': str(fs_code), 'id': parsed_args.id, - 'name': image_name, - 'repository_id': parsed_args.repo_id} + 'code': str(fs_code), + 'name': image_name} rest.post('/image/create', payload=payload) |