Package rtslib :: Module tcm :: Class PSCSIBackstore

[hide private]
[frames] | no frames]

# Class PSCSIBackstore

      object --+
               |
    node.CFSNode --+
                   |
           Backstore --+
                       |
                      PSCSIBackstore

This is an interface to pscsi backstore plugin objects in configFS. A PSCSIBackstore object is identified by its backstore index.

Instance Methods | [hide private]

__init__(self, index, mode=`'``any``'`, legacy=False) Returns: A PSCSIBackstore object. |

_create_in_cfs_ine(self, mode) Creates the configFS node if it does not already exists depending on the mode. |

_get_legacy(self) |

storage_object(self, name, dev=None) Same as PSCSIStorageObject() without specifying the backstore |

Inherited from `Backstore`: `delete`

Inherited from `Backstore` (private): `_get_index`, `_get_name`, `_get_plugin`, `_get_version`, `_list_storage_objects`, `_parse_info`

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`, `_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]

| legacy_mode Get the legacy mode flag.
Inherited from `Backstore`: `index`, `name`, `plugin`, `storage_objects`, `version` Inherited from `node.CFSNode`: `exists`, `is_fresh`, `path` Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, index, mode=`'``any``'`, legacy=False)
(Constructor)

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  - `index` (int) - The backstore index matching a physical SCSI HBA.
  - `mode` (string) - An optionnal string containing the object creation mode:
    - 'any' the configFS object will be either lookuped or created.
    - 'lookup' the object MUST already exist configFS.
    - 'create' the object must NOT already exist in configFS.
  - `legacy` - Enable legacy physcal HBA mode. If True, you must specify it also in lookup mode for StorageObjects to be notified. You've been warned !
Returns:
  A PSCSIBackstore object.
Overrides: object.__init__

### _create_in_cfs_ine(self, mode)

Creates the configFS node if it does not already exists depending on the mode. any -> makes sure it exists, also works if the node already does exists lookup -> make sure it does NOT exists create -> create the node which must not exists beforehand Upon success (no exception raised), self._fresh is True if a node was created, else self._fresh is False.

Overrides: node.CFSNode._create_in_cfs_ine
  (inherited documentation)

Property Details | [hide private]

### legacy_mode

Get the legacy mode flag. If True, the Vitualbackstore index must match the StorageObjects real HBAs.

Get Method:
  _get_legacy(self)