summaryrefslogtreecommitdiffstats
path: root/cli/objects/disks.py
diff options
context:
space:
mode:
authorJose M. Guisado <jguisado@soleta.eu>2023-10-09 12:45:07 +0200
committerJose M. Guisado <jguisado@soleta.eu>2023-10-09 12:45:07 +0200
commit68a9d6fe8fb69a5c089b11f98dca9b3deda22e10 (patch)
treec7690481c341e064d3fddd3e1f70240c86545bde /cli/objects/disks.py
parentd2596294456da9f5ffa809a67a2d68fa21ce1fb3 (diff)
disks: remove --format parameter in setup diskv0.3.2
Every partition will be formatted since disk setup command was rewritten into Python code in ogClient. This makes "ogcli setup disk" --format parameter unusable. As the time of this commit, for backward compatibility (with the legacy web console interface) ogServer expects the "format" field inside the partition json objects conforming the "partition_setup" array. For this reason, ogCLI still adds the "format" field into the partition objects present in the partition_setup array, but using a default value which will have no effect whatsoever.
Diffstat (limited to 'cli/objects/disks.py')
-rw-r--r--cli/objects/disks.py13
1 files changed, 1 insertions, 12 deletions
diff --git a/cli/objects/disks.py b/cli/objects/disks.py
index d1a9ed7..9de76c4 100644
--- a/cli/objects/disks.py
+++ b/cli/objects/disks.py
@@ -54,12 +54,6 @@ class OgDisk():
nargs='?',
default=1,
help='Disk number (defaults to 1)')
- parser.add_argument('--format',
- nargs='?',
- const=True,
- type=lambda x: x.split(','),
- help='Indicates which partitions to reformat if they are already present. '
- 'Use --part alone to mean all partitions.')
parser.add_argument('--part',
nargs='+',
action='append',
@@ -124,18 +118,13 @@ class OgDisk():
'format': '0'}
payload['partition_setup'].append(part)
- if parsed_args.format is True or (type(parsed_args.format) == list and part_num in parsed_args.format):
- do_format = '1'
- else:
- do_format = '0'
-
if fs == 'CACHE':
# Assuming flag specifying if there's cache in the setup
payload['cache'] = '1'
payload['cache_size'] = size
part = {'partition': str(p[0]), 'code': code.upper(),
'filesystem': fs.upper(), 'size': size,
- 'format': do_format}
+ 'format': '0'}
payload['partition_setup'].append(part)
last_partnum = int(parsed_args.part[-1][0][0])