'Lookup a connector dict from the bdm.connection_info if set
Gets the stashed connector dict out of the bdm.connection_info if set
and the connector host matches the instance host.
:param bdm: nova.objects.block_device.BlockDeviceMapping
:param instance: nova.objects.instance.Instance
:returns: volume connector dict or None'

def _get_stashed_volume_connector(self, bdm, instance):

    if (('connection_info' in bdm) and (bdm.connection_info is not None)):
        connector = jsonutils.loads(bdm.connection_info).get('connector')
        if connector:
            if (connector.get('host') == instance.host):
                return connector
            LOG.debug('Found    stashed    volume    connector    for    instance    but    connector    host    %(connector_host)s    does    not    match    the    instance    host    %(instance_host)s.', {'connector_host': connector.get('host'), 'instance_host': instance.host}, instance=instance)
