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

Class StorageObject

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

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)
 
__init__(self, name, mode)
x.__init__(...) initializes x; see help(type(x)) for signature
 
_configure(self, wwn=None)
 
__eq__(self, other)
 
__ne__(self, other)
 
_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.
 
_get_wwn(self)
 
_set_wwn(self, wwn)
 
_set_udev_path(self, udev_path)
 
_get_udev_path(self)
 
_get_version(self)
 
_get_name(self)
 
_enable(self)
 
_control(self, command)
 
_write_fd(self, contents)
 
_parse_info(self, key)
 
_get_status(self)
 
_gen_attached_luns(self)
Fast scan of luns attached to a storage object.
 
_list_attached_luns(self)
Generates all luns attached to a storage object.
 
delete(self)
Recursively deletes a StorageObject object.
 
is_configured(self)
Returns: True if the StorageObject is configured, else returns False
 
dump(self)

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)
 
so_from_path(cls, path)
Build a StorageObject of the correct type from a configfs path.
Class Variables [hide private]
  version = property(_get_version, doc= "Get the version of the ...
  name = property(_get_name, doc= "Get the StorageObject name as...
  udev_path = property(_get_udev_path, doc= "Get the StorageObje...
  wwn = property(_get_wwn, _set_wwn, doc= "Get or set the Storag...
  status = property(_get_status, doc= "Get the storage object st...
  attached_luns = property(_list_attached_luns, doc= "Get the li...

Inherited from node.CFSNode: configfs_dir, exists, path

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__repr__(self)
(Representation operator)

 

repr(x)

Overrides: object.__repr__
(inherited documentation)

__init__(self, name, mode)
(Constructor)

 

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

Overrides: object.__init__
(inherited documentation)

__eq__(self, other)
(Equality operator)

 
Overrides: node.CFSNode.__eq__

__ne__(self, other)

 
Overrides: node.CFSNode.__ne__

_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. BLEH.

_gen_attached_luns(self)

 

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)

 

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)

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

dump(self)

 
Overrides: node.CFSNode.dump

Class Variable Details [hide private]

version

Value:
property(_get_version, doc= "Get the version of the StorageObject's ba\
ckstore")

name

Value:
property(_get_name, doc= "Get the StorageObject name as a string.")

udev_path

Value:
property(_get_udev_path, doc= "Get the StorageObject udev_path as a st\
ring.")

wwn

Value:
property(_get_wwn, _set_wwn, doc= "Get or set the StorageObject T10 WW\
N Serial as a string.")

status

Value:
property(_get_status, doc= "Get the storage object status, depending o\
n whether or not it"+ "is used by any LUN")

attached_luns

Value:
property(_list_attached_luns, doc= "Get the list of all LUN objects at\
tached.")