storage/v2: start using -1 for 'rest of disk'
This commit is contained in:
parent
69873d8ab2
commit
92500bf8c9
|
@ -138,11 +138,10 @@ async def v2(client):
|
|||
data = {
|
||||
'disk_id': disk_id,
|
||||
'partition': {
|
||||
'size': 0,
|
||||
'size': -1,
|
||||
'number': 4,
|
||||
'mount': '',
|
||||
'format': '',
|
||||
'annotations': None
|
||||
}
|
||||
}
|
||||
await client.post('/storage/v2/delete_partition', data)
|
||||
|
@ -150,11 +149,10 @@ async def v2(client):
|
|||
data = {
|
||||
'disk_id': disk_id,
|
||||
'partition': {
|
||||
'size': 0,
|
||||
'size': -1,
|
||||
'number': 2,
|
||||
'mount': '/',
|
||||
'format': 'ext3',
|
||||
'annotations': None
|
||||
}
|
||||
}
|
||||
await client.post('/storage/v2/add_partition', data)
|
||||
|
|
|
@ -321,7 +321,7 @@ class FilesystemController(SubiquityController, FilesystemManipulator):
|
|||
-> StorageResponseV2:
|
||||
disk = self.model._one(id=data.disk_id)
|
||||
size = data.partition.size
|
||||
if not size:
|
||||
if size is None or size < 0:
|
||||
size = disk.free_for_partitions
|
||||
flag = ""
|
||||
wipe = "superblock"
|
||||
|
|
Loading…
Reference in New Issue