VirtualBox

Ignore:
Timestamp:
Mar 22, 2011 2:37:51 PM (14 years ago)
Author:
vboxsync
Message:

vboxshell: use new media API

File:
1 edited

Legend:

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

    r36246 r36346  
    21732173   setParentId = False
    21742174   parentId = ""
    2175    hdd = vb.openHardDisk(loc, ctx['global'].constants.AccessMode_ReadWrite, setImageId, imageId, setParentId, parentId)
     2175   hdd = vb.openMedium(loc, ctx['global'].constants.DeviceType_HardDisk, ctx['global'].constants.AccessMode_ReadWrite)
    21762176   print "registered HDD as %s" %(hdd.id)
    21772177   return 0
     
    22882288   vb = ctx['vb']
    22892289   loc = args[1]
    2290    id = ""
    2291    iso = vb.openDVDImage(loc, id)
     2290   iso = vb.openMedium(loc, ctx['global'].constants.DeviceType_DVD, ctx['global'].constants.AccessMode_ReadOnly)
    22922291   print "registered ISO as %s" %(iso.id)
    22932292   return 0
     
    23012300   loc = args[1]
    23022301   try:
    2303       dvd = vb.findMedium(loc, )
     2302      dvd = vb.findMedium(loc, ctx['global'].constants.DeviceType_DVD)
    23042303   except:
    23052304      print "no DVD with path %s registered" %(loc)
     
    23072306
    23082307   progress = dvd.close()
    2309    print "Unregistered ISO at %s" %(colPath(ctx,dvd.location))
     2308   print "Unregistered ISO at %s" %(colPath(ctx,loc))
    23102309
    23112310   return 0
Note: See TracChangeset for help on using the changeset viewer.

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