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, backstore, name, dev=None) A PSCSIStorageObject can be instantiated in two ways: |

_configure(self, dev) |

_get_model(self) |

_get_vendor(self) |

_get_revision(self) |

_get_channel_id(self) |

_get_target_id(self) |

_get_lun(self) |

_get_host_id(self) |

Inherited from `StorageObject`: `delete`, `is_configured`

Inherited from `StorageObject` (private): `_control`, `_enable`, `_gen_attached_luns`, `_get_backstore`, `_get_name`, `_get_status`, `_get_udev_path`, `_get_wwn`, `_list_attached_luns`, `_parse_info`, `_set_udev_path`, `_set_wwn`, `_write_fd`

Inherited from `node.CFSNode`: `__nonzero__`, `__str__`, `get_attribute`, `get_auth_attr`, `get_parameter`, `list_attributes`, `list_auth_attrs`, `list_parameters`, `set_attribute`, `set_auth_attr`, `set_parameter`

Inherited from `node.CFSNode` (private): `_check_self`, `_create_in_cfs_ine`, `_exists`, `_get_path`, `_is_fresh`, `_list_files`

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

Class Variables | [hide private]

Inherited from `node.CFSNode`: `alua_metadata_dir`, `configfs_dir`, `spec_dir`

Properties | [hide private]

| wwn Get the StorageObject T10 WWN Unit Serial as a string.
| model Get the SCSI device model string
| vendor Get the SCSI device vendor string
| revision Get the SCSI device revision string
| host_id Get the SCSI device host id
| channel_id Get the SCSI device channel id
| target_id Get the SCSI device target id
| lun Get the SCSI device LUN
Inherited from `StorageObject`: `attached_luns`, `backstore`, `name`, `status`, `udev_path` Inherited from `node.CFSNode`: `exists`, `is_fresh`, `path` Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, backstore, 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:
  - `backstore` (PSCSIBackstore) - The parent backstore of the PSCSIStorageObject.
  - `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". If the parent backstore is in legacy mode, you must use dev="C:T:L" instead, as the backstore index of the SCSI dev device would then be constrained by the parent backstore index.
    - Use the path to the SCSI device: dev="/path/to/dev". Note that if the parent Backstore is in legacy mode, the device must have the same backstore index as the parent backstore.
Returns:
  A PSCSIStorageObject object.
Overrides: object.__init__

Property Details | [hide private]

### wwn

Get the StorageObject T10 WWN Unit Serial as a string. You cannot set it for pscsi-backed StorageObjects.

Get Method:
  unreachable._get_wwn(self)

### model

Get the SCSI device model string

Get Method:
  _get_model(self)

### vendor

Get the SCSI device vendor string

Get Method:
  _get_vendor(self)

### revision

Get the SCSI device revision string

Get Method:
  _get_revision(self)

### host_id

Get the SCSI device host id

Get Method:
  _get_host_id(self)

### channel_id

Get the SCSI device channel id

Get Method:
  _get_channel_id(self)

### target_id

Get the SCSI device target id

Get Method:
  _get_target_id(self)

### lun

Get the SCSI device LUN

Get Method:
  _get_lun(self)