Changeset 27953 in vbox
- Timestamp:
- Apr 1, 2010 8:09:40 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxShell/vboxshell.py
r27952 r27953 1 1 #!/usr/bin/python 2 2 # 3 # Copyright (C) 2009 Sun Microsystems, Inc.3 # Copyright (C) 2009-2010 Sun Microsystems, Inc. 4 4 # 5 5 # This file is part of VirtualBox Open Source Edition (OSE), as … … 20 20 # # 21 21 # It also provides you with examples on how to use VirtualBox's Python API. # 22 # This shell is even somewhat documented and supports TAB-completion and#22 # This shell is even somewhat documented, supports TAB-completion and # 23 23 # history if you have Python readline installed. # 24 24 # # 25 # Finally, shell allows arbitrary custom extensions, just create # 26 # .VirtualBox/shexts/ and drop your extensions there. # 25 27 # Enjoy. # 26 28 ################################################################################ … … 525 527 return 0 526 528 527 def getControllerType(type):528 if type == 0:529 return "Null"530 elif type == 1:531 return "LsiLogic"532 elif type == 2:533 return "BusLogic"534 elif type == 3:535 return "IntelAhci"536 elif type == 4:537 return "PIIX3"538 elif type == 5:539 return "PIIX4"540 elif type == 6:541 return "ICH6"542 else:543 return "Unknown"544 545 529 def asEnumElem(ctx,enum,elem): 546 530 all = ctx['ifaces'].all_values(enum) … … 589 573 590 574 print " HPET [hpetEnabled]: %s" %(asState(mach.hpetEnabled)) 575 if mach.audioAdapter.enabled: 576 print " Audio [via audioAdapter]: chip %s; host driver %s" %(asEnumElem(ctx,"AudioControllerType", mach.audioAdapter.audioController), asEnumElem(ctx,"AudioDriverType", mach.audioAdapter.audioDriver)) 591 577 print " CPU hotplugging [CPUHotPlugEnabled]: %s" %(asState(mach.CPUHotPlugEnabled)) 592 578 … … 601 587 print " Controllers:" 602 588 for controller in controllers: 603 print " %s %s bus: %d" % (controller.name, getControllerType(controller.controllerType), controller.bus)589 print " %s %s bus: %d" % (controller.name, asEnumElem(ctx,"StorageControllerType", controller.controllerType), controller.bus) 604 590 605 591 attaches = ctx['global'].getArray(mach, 'mediumAttachments') … … 1347 1333 group = False 1348 1334 continue 1335 if ch == 'W': 1336 # just wait a bit 1337 time.sleep(0.3) 1338 continue 1349 1339 if ch == '^' or ch == '|' or ch == '$' or ch == '_': 1350 1340 if ch == '^': … … 1453 1443 'gueststats':['Print available guest stats (only Windows guests with additions so far): gueststats Win32', gueststatsCmd, 0], 1454 1444 'plugcpu':['Add a CPU to a running VM: plugcpu Win 1', plugcpuCmd, 0], 1455 'unplugcpu':['Remove a CPU from a running VM : plugcpu Win1', unplugcpuCmd, 0],1445 'unplugcpu':['Remove a CPU from a running VM (additions required, Windows cannot unplug): unplugcpu Linux 1', unplugcpuCmd, 0], 1456 1446 } 1457 1447
Note:
See TracChangeset
for help on using the changeset viewer.