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

Class UserBackedStorageObject

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

An interface to configFS storage objects for userspace-backed backstore.

Instance Methods [hide private]
 
__init__(self, name, config=None, size=None, wwn=None)
Returns: A UserBackedStorageObject object.
 
_configure(self, config, size, wwn)
 
_get_size(self)
 
_get_config(self)
 
dump(self)

Inherited from StorageObject: __eq__, __ne__, __repr__, delete, is_configured

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

Class Methods [hide private]

Inherited from StorageObject: all, so_from_path

Class Variables [hide private]
  size = property(_get_size, doc= "Get the size in bytes.")
  config = property(_get_config, doc= "Get the TCMU config.")

Inherited from StorageObject: attached_luns, name, status, udev_path, version, wwn

Inherited from node.CFSNode: configfs_dir, exists, path

Method Details [hide private]

__init__(self, name, config=None, size=None, wwn=None)
(Constructor)

 
Parameters:
  • name (string) - The name of the UserBackedStorageObject.
  • dev (string) - The path to the backend block device to be used.
    • Example: dev="/dev/sda".
    • The only device type that is accepted TYPE_DISK. For other device types, use pscsi.
  • size (int) - The size of the device to create, in bytes.
  • config (string) - user-handler-specific config string.
    • e.g. "rbd/machine1@snap4"
Returns:
A UserBackedStorageObject object.
Overrides: node.CFSNode.__init__

_configure(self, config, size, wwn)

 
Overrides: StorageObject._configure

dump(self)

 
Overrides: node.CFSNode.dump