rtslib/target.py
def add_acl(self, node_wwn):
        '''
        Add a WWN to the NodeACLGroup. If a NodeACL already exists for this WWN,
        its configuration will be changed to match the NodeACLGroup, except for its
        auth parameters, which can vary among group members.
        @param node_wwn: An initiator WWN
        @type node_wwn: string
        '''
        nacl = NodeACL(self.parent_tpg, node_wwn)

        if nacl in self._node_acls:
            return

        # if joining a group, take its config
        try:
            model = next(self._node_acls)
        except StopIteration:
            pass
        else:
            for mlun in nacl.mapped_luns:
                mlun.delete()

            for mlun in model.mapped_luns:
                MappedLUN(nacl, mlun.mapped_lun, mlun.tpg_lun, mlun.write_protect)

            for item in model.list_attributes(writable=True):
                nacl.set_attribute(item, model.get_attribute(item))
            for item in model.list_parameters(writable=True):
                nacl.set_parameter(item, model.get_parameter(item))
        finally:
            nacl.tag = self.name

        Add a WWN to the NodeACLGroup. If a NodeACL already exists for this WWN,
        its configuration will be changed to match the NodeACLGroup, except for its
        auth parameters, which can vary among group members.
        @param node_wwn: An initiator WWN
        @type node_wwn: string
        
Add a WWN to the NodeACLGroup. If a NodeACL already exists for this WWN,
its configuration will be changed to match the NodeACLGroup, except for its
auth parameters, which can vary among group members.
Add a WWN to the NodeACLGroup . If a NodeACL already exists for this WWN its configuration will be changed to match the NodeACLGroup except for its auth parameters which can vary among group members .
def add_acl(self, node_wwn):
        nacl = NodeACL(self.parent_tpg, node_wwn)
        if nacl in self._node_acls:
            return
        try:
            model = next(self._node_acls)
        except StopIteration:
            pass
        else:
            for mlun in nacl.mapped_luns:
                mlun.delete()
            for mlun in model.mapped_luns:
                MappedLUN(nacl, mlun.mapped_lun, mlun.tpg_lun, mlun.write_protect)
            for item in model.list_attributes(writable=True):
                nacl.set_attribute(item, model.get_attribute(item))
            for item in model.list_parameters(writable=True):
                nacl.set_parameter(item, model.get_parameter(item))
        finally:
            nacl.tag = self.name
def add_acl ( self , node_wwn ) : nacl = NodeACL ( self . parent_tpg , node_wwn ) if nacl in self . _node_acls : return try : model = next ( self . _node_acls ) except StopIteration : pass else : for mlun in nacl . mapped_luns : mlun . delete ( ) for mlun in model . mapped_luns : MappedLUN ( nacl , mlun . mapped_lun , mlun . tpg_lun , mlun . write_protect ) for item in model . list_attributes ( writable = True ) : nacl . set_attribute ( item , model . get_attribute ( item ) ) for item in model . list_parameters ( writable = True ) : nacl . set_parameter ( item , model . get_parameter ( item ) ) finally : nacl . tag = self . name
Add a WWN to the NodeACLGroup.
Add a WWN to the NodeACLGroup .
'''
        Add a WWN to the NodeACLGroup. If a NodeACL already exists for this WWN,
        its configuration will be changed to match the NodeACLGroup, except for its
        auth parameters, which can vary among group members.
        @param node_wwn: An initiator WWN
        @type node_wwn: string
        ''' # if joining a group, take its config
self
node_wwn
An initiator WWN
An initiator WWN