Package rtslib :: Module target :: Class MappedLUN
[hide private]
[frames] | no frames]

Class MappedLUN

  object --+    
           |    
node.CFSNode --+
               |
              MappedLUN

This is an interface to RTS Target Mapped LUNs. A MappedLUN is a mapping of a TPG LUN to a specific initiator node, and is part of a NodeACL. It allows the initiator to actually access the TPG LUN if ACLs are enabled for the TPG. The initial TPG LUN will then be seen by the initiator node as the MappedLUN.

Instance Methods [hide private]
 
__repr__(self)
 
__init__(self, parent_nodeacl, mapped_lun, tpg_lun=None, write_protect=None, alias=None)
A MappedLUN object can be instanciated in two ways:
 
_configure(self, tpg_lun, write_protect, alias)
 
_get_alias(self)
 
_get_mapped_lun(self)
 
_get_parent_nodeacl(self)
 
_set_write_protect(self, write_protect)
 
_get_write_protect(self)
 
_get_tpg_lun(self)
 
_get_node_wwn(self)
 
delete(self)
Delete the MappedLUN.
 
dump(self)

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

Class Methods [hide private]
 
setup(cls, tpg_obj, acl_obj, mlun, err_func)
Class Variables [hide private]
  mapped_lun = property(_get_mapped_lun, doc= "Get the integer M...
  parent_nodeacl = property(_get_parent_nodeacl, doc= "Get the p...
  write_protect = property(_get_write_protect, _set_write_protec...
  tpg_lun = property(_get_tpg_lun, doc= "Get the TPG LUN object ...
  node_wwn = property(_get_node_wwn, doc= "Get the wwn of the no...
  alias = property(_get_alias, doc= "Get the MappedLUN alias.")

Inherited from node.CFSNode: configfs_dir, exists, path

Method Details [hide private]

__repr__(self)
(Representation operator)

 
Overrides: object.__repr__
(inherited documentation)

__init__(self, parent_nodeacl, mapped_lun, tpg_lun=None, write_protect=None, alias=None)
(Constructor)

 

A MappedLUN object can be instanciated in two ways:

  • Creation mode: If tpg_lun is specified, the underlying configFS object will be created with that parameter. No MappedLUN with the same mapped_lun index can pre-exist in the parent NodeACL in that mode, or instanciation will fail.
  • Lookup mode: If tpg_lun is not set, then the MappedLUN will be bound to the existing configFS MappedLUN object of the parent NodeACL having the specified mapped_lun index. The underlying configFS object must already exist in that mode.
Parameters:
  • mapped_lun (int) - The mapped LUN index.
  • tpg_lun (int or LUN) - The TPG LUN index to map, or directly a LUN object that belong to the same TPG as the parent NodeACL.
  • write_protect (bool) - The write-protect flag value, defaults to False (write-protection disabled).
Overrides: node.CFSNode.__init__

delete(self)

 

Delete the MappedLUN.

Overrides: node.CFSNode.delete

dump(self)

 
Overrides: node.CFSNode.dump

Class Variable Details [hide private]

mapped_lun

Value:
property(_get_mapped_lun, doc= "Get the integer MappedLUN mapped_lun i\
ndex.")

parent_nodeacl

Value:
property(_get_parent_nodeacl, doc= "Get the parent NodeACL object.")

write_protect

Value:
property(_get_write_protect, _set_write_protect, doc= "Get or set the \
boolean write protection.")

tpg_lun

Value:
property(_get_tpg_lun, doc= "Get the TPG LUN object the MappedLUN is p\
ointing at.")

node_wwn

Value:
property(_get_node_wwn, doc= "Get the wwn of the node for which the TP\
G LUN is mapped.")