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

Class StorageObject

  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]
 
__init__(self, backstore, backstore_class, name, mode)
x.__init__(...) initializes x; see help(type(x)) for signature
 
_get_wwn(self)
 
_set_wwn(self, wwn)
 
_set_udev_path(self, udev_path)
 
_get_udev_path(self)
 
_get_name(self)
 
_get_backstore(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

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 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

Properties [hide private]
  backstore
Get the backstore object.
  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, is_fresh, path

Inherited from object: __class__

Method Details [hide private]

__init__(self, backstore, backstore_class, name, mode)
(Constructor)

 

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

Overrides: object.__init__
(inherited documentation)

_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

Property Details [hide private]

backstore

Get the backstore object.

Get Method:
_get_backstore(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.