Package rtslib :: Module tcm :: Class RDMCPStorageObject

[hide private]
[frames] | no frames]

# Class RDMCPStorageObject

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

An interface to configFS storage objects for rd_mcp backstore.

Instance Methods | [hide private]

__init__(self, name, size=None, wwn=None, nullio=False) A RDMCPStorageObject can be instantiated in two ways: |

_configure(self, size, wwn, nullio) |

_get_page_size(self) |

_get_pages(self) |

_get_size(self) |

_get_nullio(self) |

dump(self) |

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

Inherited from `StorageObject` (private): `_config_pr_aptpl`, `_control`, `_enable`, `_gen_attached_luns`, `_get_name`, `_get_status`, `_get_udev_path`, `_get_version`, `_get_wwn`, `_list_attached_luns`, `_parse_info`, `_set_udev_path`, `_set_wwn`, `_write_fd`

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

Inherited from `node.CFSNode` (private): `_check_self`, `_create_in_cfs_ine`, `_exists`, `_get_path`, `_list_files`

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

Class Methods | [hide private]

Inherited from `StorageObject`: `all`, `so_from_path`

Class Variables | [hide private]

Inherited from `node.CFSNode`: `configfs_dir`

Properties | [hide private]

| page_size Get the ramdisk page size.
| pages Get the ramdisk number of pages.
| size Get the ramdisk size in bytes.
| nullio Get the nullio status.
Inherited from `StorageObject`: `attached_luns`, `name`, `status`, `udev_path`, `version`, `wwn` Inherited from `node.CFSNode`: `exists`, `path` Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, name, size=None, wwn=None, nullio=False)
(Constructor)

A RDMCPStorageObject can be instantiated in two ways:

- Creation mode: If size is specified, the underlying configFS object will be created with that parameter. No RDMCPStorageObject with the same name can pre-exist in the parent Backstore in that mode, or instantiation will fail.
- Lookup mode: If size is not set, then the RDMCPStorageObject will be bound to the existing configFS object in the parent Backstore having the specified name. The underlying configFS object must already exist in that mode, or instantiation will fail.

Parameters:
  - `name` (string) - The name of the RDMCPStorageObject.
  - `size` (int) - The size of the ramdrive to create, in bytes.
  - `wwn` (string) - T10 WWN Unit Serial, will generate if None
  - `nullio` (boolean) - If rd should be created w/o backing page store.
Returns:
  A RDMCPStorageObject object.
Overrides: object.__init__

### _configure(self, size, wwn, nullio)

Overrides: StorageObject._configure

### dump(self)

Overrides: node.CFSNode.dump

Property Details | [hide private]

### page_size

Get the ramdisk page size.

Get Method:
  _get_page_size(self)

### pages

Get the ramdisk number of pages.

Get Method:
  _get_pages(self)

### size

Get the ramdisk size in bytes.

Get Method:
  _get_size(self)

### nullio

Get the nullio status.

Get Method:
  _get_nullio(self)