Package rtslib :: Module tcm :: Class PSCSIStorageObject
[hide private]
[frames] | no frames]

Class PSCSIStorageObject

  object --+        
           |        
node.CFSNode --+    
               |    
   StorageObject --+
                   |
                  PSCSIStorageObject

An interface to configFS storage objects for pscsi backstore.

Instance Methods [hide private]
 
__init__(self, name, dev=None)
A PSCSIStorageObject can be instantiated in two ways:
 
_configure(self, dev)
 
_set_wwn(self, wwn)
 
_get_model(self)
 
_get_vendor(self)
 
_get_revision(self)
 
_get_channel_id(self)
 
_get_target_id(self)
 
_get_lun(self)
 
_get_host_id(self)
 
dump(self)

Inherited from StorageObject: __eq__, __ne__, __repr__, delete, is_configured

Inherited from node.CFSNode: get_attribute, get_parameter, list_attributes, list_parameters, set_attribute, set_parameter

Class Methods [hide private]

Inherited from StorageObject: all, so_from_path

Class Variables [hide private]
  wwn = property(StorageObject._get_wwn, _set_wwn, doc= "Get the...
  model = property(_get_model, doc= "Get the SCSI device model s...
  vendor = property(_get_vendor, doc= "Get the SCSI device vendo...
  revision = property(_get_revision, doc= "Get the SCSI device r...
  host_id = property(_get_host_id, doc= "Get the SCSI device hos...
  channel_id = property(_get_channel_id, doc= "Get the SCSI devi...
  target_id = property(_get_target_id, doc= "Get the SCSI device...
  lun = property(_get_lun, doc= "Get the SCSI device LUN")

Inherited from StorageObject: attached_luns, name, status, udev_path, version

Inherited from node.CFSNode: configfs_dir, exists, path

Method Details [hide private]

__init__(self, name, dev=None)
(Constructor)

 

A PSCSIStorageObject can be instantiated in two ways:

  • Creation mode: If dev is specified, the underlying configFS object will be created with that parameter. No PSCSIStorageObject with the same name can pre-exist in the parent PSCSIBackstore in that mode, or instantiation will fail.
  • Lookup mode: If dev is not set, then the PSCSIStorageObject will be bound to the existing configFS object in the parent PSCSIBackstore having the specified name. The underlying configFS object must already exist in that mode, or instantiation will fail.
Parameters:
  • name (string) - The name of the PSCSIStorageObject.
  • dev (string) - You have two choices:
    • Use the SCSI id of the device: dev="H:C:T:L".
    • Use the path to the SCSI device: dev="/path/to/dev".
Returns:
A PSCSIStorageObject object.
Overrides: node.CFSNode.__init__

_configure(self, dev)

 
Overrides: StorageObject._configure

_set_wwn(self, wwn)

 
Overrides: StorageObject._set_wwn

dump(self)

 
Overrides: node.CFSNode.dump

Class Variable Details [hide private]

wwn

Value:
property(StorageObject._get_wwn, _set_wwn, doc= "Get the StorageObject\
 T10 WWN Unit Serial as a string."+ " You cannot set it for pscsi-back\
ed StorageObjects.")

model

Value:
property(_get_model, doc= "Get the SCSI device model string")

vendor

Value:
property(_get_vendor, doc= "Get the SCSI device vendor string")

revision

Value:
property(_get_revision, doc= "Get the SCSI device revision string")

host_id

Value:
property(_get_host_id, doc= "Get the SCSI device host id")

channel_id

Value:
property(_get_channel_id, doc= "Get the SCSI device channel id")

target_id

Value:
property(_get_target_id, doc= "Get the SCSI device target id")