Changeset 42380 in vbox for trunk/src/VBox/Frontends/VBoxShell/vboxshell.py
- Timestamp:
- Jul 25, 2012 9:22:54 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxShell/vboxshell.py
r40402 r42380 1 1 #!/usr/bin/python 2 2 # 3 # Copyright (C) 2009-201 1Oracle Corporation3 # Copyright (C) 2009-2012 Oracle Corporation 4 4 # 5 5 # This file is part of VirtualBox Open Source Edition (OSE), as … … 219 219 mgr = ctx['mgr'] 220 220 vb = ctx['vb'] 221 mach = vb.createMachine("", name, kind, "", False)221 mach = vb.createMachine("", name, [], kind, "", False) 222 222 mach.saveSettings() 223 223 print "created machine with UUID",mach.id … … 2168 2168 setParentId = False 2169 2169 parentId = "" 2170 hdd = vb.openMedium(loc, ctx['global'].constants.DeviceType_HardDisk, ctx['global'].constants.AccessMode_ReadWrite )2170 hdd = vb.openMedium(loc, ctx['global'].constants.DeviceType_HardDisk, ctx['global'].constants.AccessMode_ReadWrite, false) 2171 2171 print "registered HDD as %s" %(hdd.id) 2172 2172 return 0 … … 2187 2187 loc = args[2] 2188 2188 try: 2189 hdd = vb. findMedium(loc, ctx['global'].constants.DeviceType_HardDisk)2189 hdd = vb.openMedium(loc, ctx['global'].constants.DeviceType_HardDisk, ctx['global'].constants.AccessMode_ReadWrite, false) 2190 2190 except: 2191 2191 print "no HDD with path %s registered" %(loc) … … 2222 2222 loc = args[2] 2223 2223 try: 2224 hdd = vb. findMedium(loc, ctx['global'].constants.DeviceType_HardDisk)2224 hdd = vb.openMedium(loc, ctx['global'].constants.DeviceType_HardDisk, ctx['global'].constants.AccessMode_ReadWrite, false) 2225 2225 except: 2226 2226 print "no HDD with path %s registered" %(loc) … … 2242 2242 vmunreg = 0 2243 2243 try: 2244 hdd = vb. findMedium(loc, ctx['global'].constants.DeviceType_HardDisk)2244 hdd = vb.openMedium(loc, ctx['global'].constants.DeviceType_HardDisk, ctx['global'].constants.AccessMode_ReadWrite, false) 2245 2245 except: 2246 2246 print "no HDD with path %s registered" %(loc) … … 2267 2267 loc = args[1] 2268 2268 try: 2269 hdd = vb. findMedium(loc, ctx['global'].constants.DeviceType_HardDisk)2269 hdd = vb.openMedium(loc, ctx['global'].constants.DeviceType_HardDisk, ctx['global'].constants.AccessMode_ReadWrite, false) 2270 2270 except: 2271 2271 print "no HDD with path %s registered" %(loc) … … 2283 2283 vb = ctx['vb'] 2284 2284 loc = args[1] 2285 iso = vb.openMedium(loc, ctx['global'].constants.DeviceType_DVD, ctx['global'].constants.AccessMode_ReadOnly )2285 iso = vb.openMedium(loc, ctx['global'].constants.DeviceType_DVD, ctx['global'].constants.AccessMode_ReadOnly, false) 2286 2286 print "registered ISO as %s" %(iso.id) 2287 2287 return 0 … … 2295 2295 loc = args[1] 2296 2296 try: 2297 dvd = vb. findMedium(loc, ctx['global'].constants.DeviceType_DVD)2297 dvd = vb.openMedium(loc, ctx['global'].constants.DeviceType_DVD, ctx['global'].constants.AccessMode_ReadOnly, false) 2298 2298 except: 2299 2299 print "no DVD with path %s registered" %(loc) … … 2313 2313 loc = args[1] 2314 2314 try: 2315 dvd = vb. findMedium(loc, ctx['global'].constants.DeviceType_DVD)2315 dvd = vb.openMedium(loc, ctx['global'].constants.DeviceType_DVD, ctx['global'].constants.AccessMode_ReadOnly, false) 2316 2316 except: 2317 2317 print "no DVD with path %s registered" %(loc) … … 2336 2336 loc = args[2] 2337 2337 try: 2338 dvd = vb. findMedium(loc, ctx['global'].constants.DeviceType_DVD)2338 dvd = vb.openMedium(loc, ctx['global'].constants.DeviceType_DVD, ctx['global'].constants.AccessMode_ReadOnly, false) 2339 2339 except: 2340 2340 print "no DVD with path %s registered" %(loc) … … 2359 2359 loc = args[2] 2360 2360 try: 2361 dvd = vb. findMedium(loc, ctx['global'].constants.DeviceType_DVD)2361 dvd = vb.openMedium(loc, ctx['global'].constants.DeviceType_DVD, ctx['global'].constants.AccessMode_ReadOnly, false) 2362 2362 except: 2363 2363 print "no DVD with path %s registered" %(loc) … … 2378 2378 loc = args[2] 2379 2379 try: 2380 dvd = vb. findMedium(loc, ctx['global'].constants.DeviceType_DVD)2380 dvd = vb.openMedium(loc, ctx['global'].constants.DeviceType_DVD, ctx['global'].constants.AccessMode_ReadOnly, false) 2381 2381 except: 2382 2382 print "no DVD with path %s registered" %(loc)
Note:
See TracChangeset
for help on using the changeset viewer.