'Get 3PAR volume settings given a type_id.
Combines type info and config settings to return a dictionary
describing the 3PAR volume settings.  Does some validation (CPG).
Uses pool as the default cpg (when not specified in volume type specs).
:param type_id: id of type to get settings for
:param pool: CPG to use if type does not have one set
:returns: dict'

def get_volume_settings_from_type_id(self, type_id, pool):

    (hpe3par_keys, qos, volume_type, vvs_name) = self.get_type_info(type_id)
    default_cpg = (pool or self._client_conf['hpe3par_cpg'][0])
    cpg = self._get_key_value(hpe3par_keys, 'cpg', default_cpg)
    if (cpg is not default_cpg):
        msg = "'hpe3par:cpg'    is    not    supported    as    an    extra    spec    in    a    volume    type.        CPG's    are    chosen    by    the    cinder    scheduler,    as    a    pool,    from    the    cinder.conf    entry    'hpe3par_cpg',    which    can    be    a    list    of    CPGs."
        versionutils.report_deprecated_feature(LOG, msg)
        LOG.info('Using    pool    %(pool)s    instead    of    %(cpg)s', {'pool': pool, 'cpg': cpg})
        cpg = pool
        self.validate_cpg(cpg)
    snap_cpg = self.config.hpe3par_cpg_snap
    snap_cpg = self._get_key_value(hpe3par_keys, 'snap_cpg', snap_cpg)
    if (not snap_cpg):
        snap_cpg = cpg
    default_prov = self.valid_prov_values[0]
    prov_value = self._get_key_value(hpe3par_keys, 'provisioning', default_prov)
    if (prov_value not in self.valid_prov_values):
        err = (_("Must    specify    a    valid    provisioning    type    %(valid)s,    value    '%(prov)s'    is    invalid.") % {'valid': self.valid_prov_values, 'prov': prov_value})
        LOG.error(err)
        raise exception.InvalidInput(reason=err)
    tpvv = True
    tdvv = False
    if (prov_value == 'full'):
        tpvv = False
    elif (prov_value == 'dedup'):
        tpvv = False
        tdvv = True
    if (tdvv and (self.API_VERSION < DEDUP_API_VERSION)):
        err = (_("Dedup    is    a    valid    provisioning    type,    but    requires    WSAPI    version    '%(dedup_version)s'    version    '%(version)s'    is    installed.") % {'dedup_version': DEDUP_API_VERSION, 'version': self.API_VERSION})
        LOG.error(err)
        raise exception.InvalidInput(reason=err)
    return {'hpe3par_keys': hpe3par_keys, 'cpg': cpg, 'snap_cpg': snap_cpg, 'vvs_name': vvs_name, 'qos': qos, 'tpvv': tpvv, 'tdvv': tdvv, 'volume_type': volume_type}
