def get_volume_connector(self, instance):
    if (not self._initiator):
        self._initiator = libvirt_utils.get_iscsi_initiator()
        if (not self._initiator):
            LOG.debug('Could not determine iscsi initiator name', instance=instance)
    if (not self._fc_wwnns):
        self._fc_wwnns = libvirt_utils.get_fc_wwnns()
        if ((not self._fc_wwnns) or (len(self._fc_wwnns) == 0)):
            LOG.debug('Could not determine fibre channel world wide node names', instance=instance)
    if (not self._fc_wwpns):
        self._fc_wwpns = libvirt_utils.get_fc_wwpns()
        if ((not self._fc_wwpns) or (len(self._fc_wwpns) == 0)):
            LOG.debug('Could not determine fibre channel world wide port names', instance=instance)
    connector = {'ip': CONF.my_ip, 'host': CONF.host}
    if self._initiator:
        connector['initiator'] = self._initiator
    if (self._fc_wwnns and self._fc_wwpns):
        connector['wwnns'] = self._fc_wwnns
        connector['wwpns'] = self._fc_wwpns
    return connector
def get_volume_connector(self, instance):
    if (not self._initiator):
        self._initiator = libvirt_utils.get_iscsi_initiator()
        if (not self._initiator):
            LOG.debug('Could not determine iscsi initiator name', instance=instance)
    if (not self._fc_wwnns):
        self._fc_wwnns = libvirt_utils.get_fc_wwnns()
        if ((not self._fc_wwnns) or (len(self._fc_wwnns) == 0)):
            LOG.debug('Could not determine fibre channel world wide node names', instance=instance)
    if (not self._fc_wwpns):
        self._fc_wwpns = libvirt_utils.get_fc_wwpns()
        if ((not self._fc_wwpns) or (len(self._fc_wwpns) == 0)):
            LOG.debug('Could not determine fibre channel world wide port names', instance=instance)
    connector = {'ip': CONF.my_ip, 'host': CONF.host}
    if self._initiator:
        connector['initiator'] = self._initiator
    if (self._fc_wwnns and self._fc_wwpns):
        connector['wwnns'] = self._fc_wwnns
        connector['wwpns'] = self._fc_wwpns
    return connector