mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-02-12 04:51:51 +00:00
Fix 500 on IDE Drives
This commit is contained in:
parent
9b26311b9c
commit
a097f30c6b
1 changed files with 5 additions and 3 deletions
|
@ -261,7 +261,10 @@ class VM:
|
|||
disk_size = val.split(',')
|
||||
for split in disk_size:
|
||||
if 'size' in split:
|
||||
disk_size = split.split('=')[1].rstrip('G')
|
||||
size = split.split('=')[1]
|
||||
if size[-1] == 'M':
|
||||
size = f'{int(size.rstrip("M")) / 1000}G'
|
||||
disk_size = size.rstrip('G')
|
||||
disks.append([key, disk_size])
|
||||
disks = sorted(disks, key=lambda x: x[0])
|
||||
return disks
|
||||
|
@ -280,11 +283,10 @@ class VM:
|
|||
@lazy_property
|
||||
def isos(self):
|
||||
isos = []
|
||||
for iso in filter(lambda interface: 'ide' in interface, self.config.keys()):
|
||||
for iso in filter(lambda interface: interface in self.cdroms, self.config.keys()):
|
||||
iso_info = self.config[iso]
|
||||
if iso_info:
|
||||
if 'cloudinit' in iso_info:
|
||||
isos.append((iso, 'Clountinit Drive'))
|
||||
continue
|
||||
if iso_info.split(',')[0] == 'none':
|
||||
isos.append((iso, 'None'))
|
||||
|
|
Loading…
Reference in a new issue