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)
repr(x)
 
__init__(self, parent_nodeacl, mapped_lun, tpg_lun=None, write_protect=None)
A MappedLUN object can be instanciated in two ways:
 
_configure(self, tpg_lun, write_protect)
 
_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

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

Class Methods [hide private]
 
setup(cls, tpg_obj, acl_obj, mlun, err_func)
Class Variables [hide private]

Inherited from node.CFSNode: configfs_dir

Properties [hide private]
  mapped_lun
Get the integer MappedLUN mapped_lun index.
  parent_nodeacl
Get the parent NodeACL object.
  write_protect
Get or set the boolean write protection.
  tpg_lun
Get the TPG LUN object the MappedLUN is pointing at.
  node_wwn
Get the wwn of the node for which the TPG LUN is mapped.
  alias
Get the MappedLUN alias.

Inherited from node.CFSNode: exists, path

Inherited from object: __class__

Method Details [hide private]

__repr__(self)
(Representation operator)

 

repr(x)

Overrides: object.__repr__
(inherited documentation)

__init__(self, parent_nodeacl, mapped_lun, tpg_lun=None, write_protect=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: object.__init__

delete(self)

 

Delete the MappedLUN.

Overrides: node.CFSNode.delete

dump(self)

 
Overrides: node.CFSNode.dump

Property Details [hide private]

mapped_lun

Get the integer MappedLUN mapped_lun index.

Get Method:
_get_mapped_lun(self)

parent_nodeacl

Get the parent NodeACL object.

Get Method:
_get_parent_nodeacl(self)

write_protect

Get or set the boolean write protection.

Get Method:
_get_write_protect(self)
Set Method:
_set_write_protect(self, write_protect)

tpg_lun

Get the TPG LUN object the MappedLUN is pointing at.

Get Method:
_get_tpg_lun(self)

node_wwn

Get the wwn of the node for which the TPG LUN is mapped.

Get Method:
_get_node_wwn(self)

alias

Get the MappedLUN alias.

Get Method:
_get_alias(self)