Changeset 29556 in vbox
- Timestamp:
- May 17, 2010 2:46:22 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxShell/vboxshell.py
r29544 r29556 282 282 return colored(vm, 'blue') 283 283 284 def colPath(ctx,vm): 285 return colored(vm, 'green') 286 284 def colPath(ctx,p): 285 return colored(p, 'green') 286 287 def colSize(ctx,m): 288 return colored(m, 'red') 289 290 def colSizeM(ctx,m): 291 return colored(str(m)+'M', 'red') 287 292 288 293 def createVm(ctx,name,kind,base): … … 1685 1690 verbose = False 1686 1691 hdds = ctx['global'].getArray(ctx['vb'], 'hardDisks') 1687 print "Hard disks:"1692 print colCat(ctx,"Hard disks:") 1688 1693 for hdd in hdds: 1689 1694 if hdd.state != ctx['global'].constants.MediumState_Created: 1690 1695 hdd.refreshState() 1691 print " %s (%s)%s % dM [logical %dM]" %(hdd.location, hdd.format, optId(verbose,hdd.id),asSize(hdd.size, True), asSize(hdd.logicalSize, False))1696 print " %s (%s)%s %s [logical %s]" %(colPath(ctx,hdd.location), hdd.format, optId(verbose,hdd.id),colSizeM(ctx,asSize(hdd.size, True)), colSizeM(ctx,asSize(hdd.logicalSize, False))) 1692 1697 1693 1698 dvds = ctx['global'].getArray(ctx['vb'], 'DVDImages') 1694 print "CD/DVD disks:"1699 print colCat(ctx,"CD/DVD disks:") 1695 1700 for dvd in dvds: 1696 1701 if dvd.state != ctx['global'].constants.MediumState_Created: 1697 1702 dvd.refreshState() 1698 print " %s (%s)%s % dM" %(dvd.location, dvd.format,optId(verbose,hdd.id),asSize(hdd.size, True))1703 print " %s (%s)%s %s" %(colPath(ctx,dvd.location), dvd.format,optId(verbose,hdd.id),colSizeM(ctx,asSize(hdd.size, True))) 1699 1704 1700 1705 floppys = ctx['global'].getArray(ctx['vb'], 'floppyImages') 1701 print "Floopy disks:"1706 print colCat(ctx,"Floppy disks:") 1702 1707 for floppy in floppys: 1703 1708 if floppy.state != ctx['global'].constants.MediumState_Created: 1704 1709 floppy.refreshState() 1705 print " %s (%s)%s % dM" %(floppy.location, floppy.format,optId(verbose,hdd.id), asSize(hdd.size, True))1710 print " %s (%s)%s %s" %(colPath(ctx,floppy.location), floppy.format,optId(verbose,hdd.id), colSizeM(ctx,asSize(hdd.size, True))) 1706 1711 1707 1712 return 0
Note:
See TracChangeset
for help on using the changeset viewer.