__init__(self,
parent_tpg,
lun=None,
storage_object=None,
alias=None)
(Constructor)
|
|
A LUN object can be instanciated in two ways:
-
Creation mode: If storage_object is specified, the
underlying configFS object will be created with that parameter. No
LUN with the same lun index can pre-exist in the parent TPG in
that mode, or instanciation will fail.
-
Lookup mode: If storage_object is not set, then the LUN
will be bound to the existing configFS LUN object of the parent TPG
having the specified lun index. The underlying configFS object
must already exist in that mode.
- Parameters:
parent_tpg (TPG) - The parent TPG object.
lun (0-255) - The LUN index.
storage_object (StorageObject subclass) - The storage object to be exported as a LUN.
alias (string) - An optional parameter to manually specify the LUN alias. You
probably do not need this.
- Returns:
- A LUN object.
- Overrides:
node.CFSNode.__init__
|