'Get igroups exactly matching a set of initiators.'

def get_igroup_by_initiators(self, initiator_list):

    tag = None
    igroup_list = []
    if (not initiator_list):
        return igroup_list
    initiator_set = set(initiator_list)
    while True:
        query = self._get_igroup_by_initiator_query(initiator_list[0], tag)
        result = self.connection.invoke_successfully(query, True)
        tag = result.get_child_content('next-tag')
        num_records = result.get_child_content('num-records')
        if (num_records and (int(num_records) >= 1)):
            for igroup_info in result.get_child_by_name('attributes-list').get_children():
                initiator_set_for_igroup = set()
                for initiator_info in igroup_info.get_child_by_name('initiators').get_children():
                    initiator_set_for_igroup.add(initiator_info.get_child_content('initiator-name'))
                if (initiator_set == initiator_set_for_igroup):
                    igroup = {'initiator-group-os-type': igroup_info.get_child_content('initiator-group-os-type'), 'initiator-group-type': igroup_info.get_child_content('initiator-group-type'), 'initiator-group-name': igroup_info.get_child_content('initiator-group-name')}
                    igroup_list.append(igroup)
        if (tag is None):
            break
    return igroup_list
