'Get igroups exactly matching a set of initiators.'

def get_igroup_by_initiators(self, initiator_list):

    igroup_list = []
    if (not initiator_list):
        return igroup_list
    initiator_set = set(initiator_list)
    igroup_list_info = netapp_api.NaElement('igroup-list-info')
    result = self.connection.invoke_successfully(igroup_list_info, True)
    initiator_groups = (result.get_child_by_name('initiator-groups') or netapp_api.NaElement('none'))
    for initiator_group_info in initiator_groups.get_children():
        initiator_set_for_igroup = set()
        initiators = (initiator_group_info.get_child_by_name('initiators') or netapp_api.NaElement('none'))
        for initiator_info in 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': initiator_group_info.get_child_content('initiator-group-os-type'), 'initiator-group-type': initiator_group_info.get_child_content('initiator-group-type'), 'initiator-group-name': initiator_group_info.get_child_content('initiator-group-name')}
            igroup_list.append(igroup)
    return igroup_list
