VirtualBox

Ignore:
Timestamp:
Jul 9, 2009 8:59:53 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
49803
Message:

Python shell: minor improvments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxShell/vboxshell.py

    r21384 r21418  
    394394    return 0
    395395
     396def getControllerType(type):
     397    if type == 0:
     398        return "Null"
     399    elif  type == 1:
     400        return "LsiLogic"
     401    elif type == 2:
     402        return "BusLogic"
     403    elif type == 3:
     404        return "IntelAhci"
     405    elif type == 4:
     406        return "PIIX3"
     407    elif type == 5:
     408        return "PIIX4"
     409    elif type == 6:
     410        return "ICH6"
     411    else:
     412        return "Unknown"
     413
    396414def infoCmd(ctx,args):
    397415    import time
     
    407425    print "  ID [n/a]: " + mach.id
    408426    print "  OS Type [n/a]: " + os.description
     427    print
    409428    print "  CPUs [CPUCount]: %d" %(mach.CPUCount)
    410429    print "  RAM [memorySize]: %dM" %(mach.memorySize)
    411430    print "  VRAM [VRAMSize]: %dM" %(mach.VRAMSize)
    412431    print "  Monitors [monitorCount]: %d" %(mach.monitorCount)
     432    print
    413433    print "  Clipboard mode [clipboardMode]: %d" %(mach.clipboardMode)
    414434    print "  Machine status [n/a]: %d" % (mach.sessionState)
     435    print
    415436    bios = mach.BIOSSettings
    416437    print "  ACPI [BIOSSettings.ACPIEnabled]: %s" %(asState(bios.ACPIEnabled))
     
    422443    print "  Nested paging [HWVirtExNestedPagingEnabled]: " + asState(mach.HWVirtExNestedPagingEnabled)
    423444    print "  Last changed [n/a]: " + time.asctime(time.localtime(mach.lastStateChange/1000))
     445    print "  VRDP server [VRDPServer.enabled]: %s" %(asState(mach.VRDPServer.enabled))
     446
     447    controllers = ctx['global'].getArray(mach, 'storageControllers')
     448    if controllers:
     449        print
     450        print "  Controllers:"
     451    for controller in controllers:
     452        print "      %s %s bus: %d" % (controller.name, getControllerType(controller.controllerType), controller.bus)
    424453
    425454    disks = ctx['global'].getArray(mach, 'hardDiskAttachments')
    426455    if disks:
    427456        print
     457        print "  Disks:"
    428458    for disk in disks:
    429         print "  Controller: %s port: %d device: %d:" % (disk.controller, disk.port, disk.device)
     459        print "    Controller: %s port: %d device: %d:" % (disk.controller, disk.port, disk.device)
    430460        hd = disk.hardDisk
    431461        print "    id: " + hd.id
     
    433463        print "    name: " +  hd.name
    434464        print "    format: " +  hd.format
     465        print
    435466    return 0
    436467
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette