File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -261,7 +261,10 @@ def disks(self):
261261 disk_size = val .split (',' )
262262 for split in disk_size :
263263 if 'size' in split :
264- disk_size = split .split ('=' )[1 ].rstrip ('G' )
264+ size = split .split ('=' )[1 ]
265+ if size [- 1 ] == 'M' :
266+ size = f'{ int (size .rstrip ("M" )) / 1000 } G'
267+ disk_size = size .rstrip ('G' )
265268 disks .append ([key , disk_size ])
266269 disks = sorted (disks , key = lambda x : x [0 ])
267270 return disks
@@ -280,11 +283,10 @@ def cdroms(self):
280283 @lazy_property
281284 def isos (self ):
282285 isos = []
283- for iso in filter (lambda interface : 'ide' in interface , self .config .keys ()):
286+ for iso in filter (lambda interface : interface in self . cdroms , self .config .keys ()):
284287 iso_info = self .config [iso ]
285288 if iso_info :
286289 if 'cloudinit' in iso_info :
287- isos .append ((iso , 'Clountinit Drive' ))
288290 continue
289291 if iso_info .split (',' )[0 ] == 'none' :
290292 isos .append ((iso , 'None' ))
You can’t perform that action at this time.
0 commit comments