Package rtslib :: Module root :: Class RTSRoot

[hide private]
[frames] | no frames]

# Class RTSRoot

      object --+
               |
    node.CFSNode --+
                   |
                  RTSRoot

This is an interface to the root of the configFS object tree. Is allows one to start browsing Target and Backstore objects, as well as helper methods to return arbitrary objects from the configFS tree.

    >>> import rtslib.root as root
    >>> rtsroot = root.RTSRoot()
    >>> rtsroot.path
    '/sys/kernel/config/target'
    >>> rtsroot.exists
    True
    >>> rtsroot.targets # doctest: +ELLIPSIS
    [...]
    >>> rtsroot.backstores # doctest: +ELLIPSIS
    [...]
    >>> rtsroot.tpgs # doctest: +ELLIPSIS
    [...]
    >>> rtsroot.storage_objects # doctest: +ELLIPSIS
    [...]
    >>> rtsroot.network_portals # doctest: +ELLIPSIS
    [...]

Instance Methods | [hide private]

__init__(self) Instantiate an RTSRoot object. |

_list_targets(self) |

_list_backstores(self) |

_list_storage_objects(self) |

_list_tpgs(self) |

_list_node_acls(self) |

_list_network_portals(self) |

_list_luns(self) |

_list_fabric_modules(self) |

_list_loaded_fabric_modules(self) |

__str__(self) str(x) |

Inherited from `node.CFSNode`: `__nonzero__`, `delete`, `get_attribute`, `get_auth_attr`, `get_parameter`, `list_attributes`, `list_auth_attrs`, `list_parameters`, `set_attribute`, `set_auth_attr`, `set_parameter`

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

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

Class Variables | [hide private]

| target_core_mod = ``'``target_core_mod``'``
Inherited from `node.CFSNode`: `alua_metadata_dir`, `configfs_dir`, `spec_dir`

Properties | [hide private]

| backstores Get the list of Backstore objects.
| targets Get the list of Target objects.
| tpgs Get the list of all the existing TPG objects.
| node_acls Get the list of all the existing NodeACL objects.
| network_portals Get the list of all the existing Network Portal objects.
| storage_objects Get the list of all the existing Storage objects.
| luns Get the list of all existing LUN objects.
| fabric_modules Get the list of all FabricModule objects.
| loaded_fabric_modules Get the list of all loaded FabricModule objects.
Inherited from `node.CFSNode`: `exists`, `is_fresh`, `path` Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self)
(Constructor)

Instantiate an RTSRoot object. Basically checks for configfs setup and base kernel modules (tcm )

Overrides: object.__init__

### __str__(self)
(Informal representation operator)

str(x)

Overrides: object.__str__
  (inherited documentation)

Property Details | [hide private]

### backstores

Get the list of Backstore objects.

Get Method:
  _list_backstores(self)

### targets

Get the list of Target objects.

Get Method:
  _list_targets(self)

### tpgs

Get the list of all the existing TPG objects.

Get Method:
  _list_tpgs(self)

### node_acls

Get the list of all the existing NodeACL objects.

Get Method:
  _list_node_acls(self)

### network_portals

Get the list of all the existing Network Portal objects.

Get Method:
  _list_network_portals(self)

### storage_objects

Get the list of all the existing Storage objects.

Get Method:
  _list_storage_objects(self)

### luns

Get the list of all existing LUN objects.

Get Method:
  _list_luns(self)

### fabric_modules

Get the list of all FabricModule objects.

Get Method:
  _list_fabric_modules(self)

### loaded_fabric_modules

Get the list of all loaded FabricModule objects.

Get Method:
  _list_loaded_fabric_modules(self)