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

Class StorageObject

source code

  object --+    
           |    
node.CFSNode --+
               |
              StorageObject
Known Subclasses:

This is an interface to storage objects in configFS. A StorageObject is identified by its backstore and its name.

Instance Methods [hide private]
 
__repr__(self)
repr(x)
source code
 
__init__(self, name, mode)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
_configure(self, wwn=None) source code
 
__eq__(self, other) source code
 
__ne__(self, other) source code
 
_config_pr_aptpl(self)
LIO actually *writes* pr aptpl info to the filesystem, so we need to read it in and squirt it back into configfs when we configure the storage object.
source code
 
_get_wwn(self) source code
 
_set_wwn(self, wwn) source code
 
_set_udev_path(self, udev_path) source code
 
_get_udev_path(self) source code
 
_get_version(self) source code
 
_get_name(self) source code
 
_enable(self) source code
 
_control(self, command) source code
 
_write_fd(self, contents) source code
 
_parse_info(self, key) source code
 
_get_status(self) source code
 
_gen_attached_luns(self)
Fast scan of luns attached to a storage object.
source code
 
_list_attached_luns(self)
Generates all luns attached to a storage object.
source code
 
delete(self)
Recursively deletes a StorageObject object.
source code
 
is_configured(self)
Returns: True if the StorageObject is configured, else returns False
source code
 
dump(self) source code

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

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

Class Methods [hide private]
 
all(cls) source code
 
so_from_path(cls, path)
Build a StorageObject of the correct type from a configfs path.
source code
Class Variables [hide private]

Inherited from node.CFSNode: configfs_dir

Properties [hide private]
  version
Get the version of the StorageObject's backstore
  name
Get the StorageObject name as a string.
  udev_path
Get the StorageObject udev_path as a string.
  wwn
Get or set the StorageObject T10 WWN Serial as a string.
  status
Get the storage object status, depending on whether or not itis used by any LUN
  attached_luns
Get the list of all LUN objects attached.

Inherited from node.CFSNode: exists, path

Inherited from object: __class__

Method Details [hide private]

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

__init__(self, name, mode)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

_config_pr_aptpl(self)

source code 

LIO actually *writes* pr aptpl info to the filesystem, so we need to read it in and squirt it back into configfs when we configure the storage object. BLEH.

_gen_attached_luns(self)

source code 

Fast scan of luns attached to a storage object. This is an order of magnitude faster than using root.luns and matching path on them.

delete(self)

source code 

Recursively deletes a StorageObject object. This will delete all attached LUNs currently using the StorageObject object, and then the StorageObject itself. The underlying file and block storages will not be touched, but all ramdisk data will be lost.

Overrides: node.CFSNode.delete

is_configured(self)

source code 
Returns:
True if the StorageObject is configured, else returns False

dump(self)

source code 
Overrides: node.CFSNode.dump

Property Details [hide private]

version

Get the version of the StorageObject's backstore

Get Method:
_get_version(self)

name

Get the StorageObject name as a string.

Get Method:
_get_name(self)

udev_path

Get the StorageObject udev_path as a string.

Get Method:
_get_udev_path(self)

wwn

Get or set the StorageObject T10 WWN Serial as a string.

Get Method:
_get_wwn(self)
Set Method:
_set_wwn(self, wwn)

status

Get the storage object status, depending on whether or not itis used by any LUN

Get Method:
_get_status(self)

attached_luns

Get the list of all LUN objects attached.

Get Method:
_list_attached_luns(self) - Generates all luns attached to a storage object.