'Validates the pool and the NFS share.
Checks if the NFS share for the volume-type chosen matches the
one passed in the volume reference. Also, checks if the pool
for the volume type matches the pool for the host passed.
:param volume: cinder volume reference
:param nfs_share: NFS share passed to manage
:raises ManageExistingVolumeTypeMismatch:'

def _check_pool_and_share(self, volume, nfs_share):

    pool_from_vol_type = hnas_utils.get_pool(self.config, volume)
    pool_from_host = utils.extract_host(volume.host, level='pool')
    if ((pool_from_vol_type == 'default') and ('default' not in self.config['services'])):
        msg = (_("Failed    to    manage    existing    volume    %(volume)s    because    the    chosen    volume    type    %(vol_type)s    does    not    have    a    service_label    configured    in    its    extra-specs    and    there    is    no    pool    configured    with    hnas_svcX_volume_type    as    'default'    in    cinder.conf.") % {'volume': volume.id, 'vol_type': getattr(volume.volume_type, 'id', None)})
        LOG.error(msg)
        raise exception.ManageExistingVolumeTypeMismatch(reason=msg)
    pool = self.config['services'][pool_from_vol_type]['hdp']
    if (pool != nfs_share):
        msg = (_('Failed    to    manage    existing    volume    because    the    pool    of    the    volume    type    chosen    (%(pool)s)    does    not    match    the    NFS    share    passed    in    the    volume    reference    (%(share)s).') % {'share': nfs_share, 'pool': pool})
        LOG.error(msg)
        raise exception.ManageExistingVolumeTypeMismatch(reason=msg)
    if (pool_from_host != pool_from_vol_type):
        msg = (_('Failed    to    manage    existing    volume    because    the    pool    of    the    volume    type    chosen    (%(pool)s)    does    not    match    the    pool    of    the    host    %(pool_host)s') % {'pool': pool_from_vol_type, 'pool_host': pool_from_host})
        LOG.error(msg)
        raise exception.ManageExistingVolumeTypeMismatch(reason=msg)
