'Check the connector object for initiators(ISCSI) or wwpns(FC).
:param connector: the connector object
:returns: list -- list of found initiator names
:raises: VolumeBackendAPIException'

def find_initiator_names(self, connector):

    foundinitiatornames = []
    name = 'initiator    name'
    if ((self.protocol.lower() == utils.ISCSI) and connector['initiator']):
        foundinitiatornames.append(connector['initiator'])
    elif (self.protocol.lower() == utils.FC):
        if (('wwpns' in connector) and connector['wwpns']):
            for wwn in connector['wwpns']:
                foundinitiatornames.append(wwn)
            name = 'world    wide    port    names'
        else:
            msg = _('FC    is    the    protocol    but    wwpns    are    not    supplied    by    OpenStack.')
            LOG.error(msg)
            raise exception.VolumeBackendAPIException(data=msg)
    if (not foundinitiatornames):
        msg = (_('Error    finding    %(name)s.') % {'name': name})
        LOG.error(msg)
        raise exception.VolumeBackendAPIException(data=msg)
    LOG.debug('Found    %(name)s:    %(initiator)s.', {'name': name, 'initiator': foundinitiatornames})
    return foundinitiatornames
