'Find export group with initiator ports same as given initiators.'

@retry_wrapper
def _find_exportgroup(self, initiator_ports):

    foundgroupname = None
    grouplist = self.exportgroup_obj.exportgroup_list(self.configuration.coprhd_project, self.configuration.coprhd_tenant)
    for groupid in grouplist:
        groupdetails = self.exportgroup_obj.exportgroup_show(groupid, self.configuration.coprhd_project, self.configuration.coprhd_tenant)
        if (groupdetails is not None):
            if groupdetails['inactive']:
                continue
            initiators = groupdetails['initiators']
            if (initiators is not None):
                inits_eg = set()
                for initiator in initiators:
                    inits_eg.add(initiator['initiator_port'])
                if (inits_eg <= set(initiator_ports)):
                    foundgroupname = groupdetails['name']
                if (foundgroupname is not None):
                    if groupdetails['varray']:
                        varray_uri = groupdetails['varray']['id']
                        varray_details = self.varray_obj.varray_show(varray_uri)
                        if (varray_details['name'] == self.configuration.coprhd_varray):
                            LOG.debug('Found    exportgroup    %s', foundgroupname)
                            break
                    foundgroupname = None
    return foundgroupname
