Package pyanaconda :: Package storage :: Module devices :: Class OpticalDevice
[hide private]
[frames] | no frames]

Class OpticalDevice

source code

object --+        
         |        
    Device --+    
             |    
 StorageDevice --+
                 |
                OpticalDevice

An optical drive, eg: cdrom, dvd+r, &c.

XXX Is this useful?

Instance Methods [hide private]
 
__init__(self, name, major=None, minor=None, exists=None, format=None, parents=None, sysfsPath='', vendor="", model="")
Create a StorageDevice instance.
source code
 
mediaPresent(self)
Return a boolean indicating whether or not the device contains media.
source code
 
eject(self)
Eject the drawer.
source code

Inherited from StorageDevice: __repr__, __str__, checkSize, create, currentSize, destroy, dict, disks, encrypted, formatArgs, fstabSpec, growable, isDisk, maxSize, minSize, model, notifyKernel, packages, partedDevice, partitionable, partitioned, path, preCommitFixup, removable, resizable, resize, serial, services, setup, setupParents, status, teardown, updateSysfsPath, vendor

Inherited from Device: __deepcopy__, addChild, dependsOn, dracutSetupArgs, isleaf, name, removeChild, teardownParents, type, typeDescription, writeKS

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  _type = "cdrom"

Inherited from StorageDevice: format, size, sysfsBlockDir, targetSize

Inherited from StorageDevice (private): _devDir, _isDisk, _partitionable, _resizable

Inherited from Device (private): _id, _packages, _services

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name, major=None, minor=None, exists=None, format=None, parents=None, sysfsPath='', vendor="", model="")
(Constructor)

source code 
Create a StorageDevice instance.

Arguments:

    name -- the device name (generally a device node's basename)

Keyword Arguments:

    size -- the device's size (units/format TBD)
    major -- the device major
    minor -- the device minor
    sysfsPath -- sysfs device path
    format -- a DeviceFormat instance
    uuid -- universally unique identifier
    parents -- a list of required Device instances
    serial -- the ID_SERIAL_SHORT for this device
    vendor -- the manufacturer of this Device
    model -- manufacturer's device model string
    bus -- the interconnect this device uses

Overrides: object.__init__
(inherited documentation)

mediaPresent(self)

source code 

Return a boolean indicating whether or not the device contains media.

Decorators:
  • @property
Overrides: Device.mediaPresent