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

Class NodeACL

  object --+    
           |    
node.CFSNode --+
               |
              NodeACL

This is an interface to node ACLs in configFS. A NodeACL is identified by the initiator node wwn and parent TPG.

Instance Methods [hide private]
 
__repr__(self)
repr(x)
 
__init__(self, parent_tpg, node_wwn, mode='any')
Returns: A NodeACL object.
 
_get_node_wwn(self)
 
_get_parent_tpg(self)
 
_get_tcq_depth(self)
 
_set_tcq_depth(self, depth)
 
_get_tag(self)
 
_set_tag(self, tag_str)
 
_list_mapped_luns(self)
 
_get_session(self)
 
has_feature(self, feature)
Whether or not this NodeACL has a certain feature.
 
delete(self)
Delete the NodeACL, including all MappedLUN objects.
 
mapped_lun(self, mapped_lun, tpg_lun=None, write_protect=None)
Same as MappedLUN() but without the parent_nodeacl parameter.
 
_get_authenticate_target(self)
 
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, err_func)
Class Variables [hide private]
  tcq_depth = property(_get_tcq_depth, _set_tcq_depth, doc= "Set...
  tag = property(_get_tag, _set_tag, doc= "Set or get the NodeAC...
  parent_tpg = property(_get_parent_tpg, doc= "Get the parent TP...
  node_wwn = property(_get_node_wwn, doc= "Get the node wwn.")
  mapped_luns = property(_list_mapped_luns, doc= "Get the list o...
  session = property(_get_session, doc= "Gives a snapshot of the...
  chap_userid = property(partial(_get_auth_attr, attribute= 'aut...
  chap_password = property(partial(_get_auth_attr, attribute= 'a...
  chap_mutual_userid = property(partial(_get_auth_attr, attribut...
  chap_mutual_password = property(partial(_get_auth_attr, attrib...
  authenticate_target = property(_get_authenticate_target, doc= ...

Inherited from node.CFSNode: configfs_dir, exists, path

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__repr__(self)
(Representation operator)

 

repr(x)

Overrides: object.__repr__
(inherited documentation)

__init__(self, parent_tpg, node_wwn, mode='any')
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • parent_tpg (TPG) - The parent TPG object.
  • node_wwn (string) - The wwn of the initiator node for which the ACL is created.
  • mode (string) - An optionnal string containing the object creation mode:
    • 'any' means the configFS object will be either looked up or created.
    • 'lookup' means the object MUST already exist configFS.
    • 'create' means the object must NOT already exist in configFS.
Returns:
A NodeACL object.
Overrides: object.__init__

delete(self)

 

Delete the NodeACL, including all MappedLUN objects. If the underlying configFS object does not exist, this method does nothing.

Overrides: node.CFSNode.delete

dump(self)

 
Overrides: node.CFSNode.dump

Class Variable Details [hide private]

tcq_depth

Value:
property(_get_tcq_depth, _set_tcq_depth, doc= "Set or get the TCQ dept\
h for the initiator "+ "sessions matching this NodeACL.")

tag

Value:
property(_get_tag, _set_tag, doc= "Set or get the NodeACL tag. If not \
supported, return None")

parent_tpg

Value:
property(_get_parent_tpg, doc= "Get the parent TPG object.")

mapped_luns

Value:
property(_list_mapped_luns, doc= "Get the list of all MappedLUN object\
s in this NodeACL.")

session

Value:
property(_get_session, doc= "Gives a snapshot of the current session o\
r C{None}")

chap_userid

Value:
property(partial(_get_auth_attr, attribute= 'auth/userid'), partial(_s\
et_auth_attr, attribute= 'auth/userid'), doc= "Set or get the initiato\
r CHAP auth userid.")

chap_password

Value:
property(partial(_get_auth_attr, attribute= 'auth/password'), partial(\
_set_auth_attr, attribute= 'auth/password',), doc= "Set or get the ini\
tiator CHAP auth password.")

chap_mutual_userid

Value:
property(partial(_get_auth_attr, attribute= 'auth/userid_mutual'), par\
tial(_set_auth_attr, attribute= 'auth/userid_mutual'), doc= "Set or ge\
t the initiator CHAP auth userid.")

chap_mutual_password

Value:
property(partial(_get_auth_attr, attribute= 'auth/password_mutual'), p\
artial(_set_auth_attr, attribute= 'auth/password_mutual'), doc= "Set o\
r get the initiator CHAP auth password.")

authenticate_target

Value:
property(_get_authenticate_target, doc= "Get the boolean authenticate \
target flag.")