Changeset 11991 in vbox for trunk/src/libs/xpcom18a4/python/sample
- Timestamp:
- Sep 2, 2008 2:18:40 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 35896
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/python/sample/shellcommon.py
r11909 r11991 138 138 'resume': lambda: console.resume(), 139 139 'powerdown': lambda: console.powerDown(), 140 'stats': lambda: guestStats(ctx, console.guest) 140 'stats': lambda: guestStats(ctx, console.guest), 141 141 } 142 142 ops[cmd]() … … 167 167 print "Machine '%s' is unknown, use list command to find available machines" %(id) 168 168 return m 169 170 171 169 172 170 def helpCmd(ctx, args): … … 252 250 return 0 253 251 252 def setvarCmd(ctx, args): 253 if (len(args) < 4): 254 print "usage: setvar [vmname|uuid] expr value" 255 return 0 256 mach = argsToMach(ctx,args) 257 if mach == None: 258 return 0 259 vbox = ctx['vb'] 260 session = ctx['mgr'].getSessionObject(vbox) 261 vbox.openSession(session, mach.id) 262 mach = session.machine 263 expr = 'mach.'+args[2]+' = '+args[3] 264 print "Executing",expr 265 try: 266 #mach.BIOSSettings.IOAPICEnabled = True 267 exec expr 268 except Exception, e: 269 print 'failed: ',e 270 if g_verbose: 271 traceback.print_exc() 272 mach.saveSettings() 273 session.close() 274 return 0 275 254 276 def quitCmd(ctx, args): 255 277 return 1 … … 298 320 'aliases':['Shows aliases', aliasesCmd], 299 321 'verbose':['Toggle verbosity', verboseCmd], 322 'setvar':['Set VMs variable: "setvar Fedora BIOSSettings.ACPIEnabled True"', setvarCmd], 300 323 'quit':['Exits', quitCmd], 301 324 'host':['Show host information', hostCmd]}
Note:
See TracChangeset
for help on using the changeset viewer.