'Find CHAP info from xml.'

def find_chap_info(self, iscsi_info, initiator_name):

    chapinfo = None
    for ini in iscsi_info:
        if (ini['Name'] == initiator_name):
            if ('CHAPinfo' in ini):
                chapinfo = ini['CHAPinfo']
                break
    return chapinfo
