'Convert the volume to be of the new type.  Given old type settings.
Returns True if the retype was successful.
Uses taskflow to revert changes if errors occur.
:param volume: A dictionary describing the volume to retype
:param new_type: A dictionary describing the volume type to convert to
:param old_volume_settings: Volume settings describing the old type.
:param host: A dictionary describing the host, where
host[\'host\'] is its name, and host[\'capabilities\'] is a
dictionary of its reported capabilities.  Host validation
is just skipped if host is None.'

def _retype_from_old_to_new(self, volume, new_type, old_volume_settings, host):

    volume_id = volume['id']
    volume_name = self._get_3par_vol_name(volume_id)
    new_type_name = None
    new_type_id = None
    if new_type:
        new_type_name = new_type['name']
        new_type_id = new_type['id']
    pool = None
    if host:
        pool = volume_utils.extract_host(host['host'], 'pool')
    else:
        pool = volume_utils.extract_host(volume['host'], 'pool')
    new_volume_settings = self.get_volume_settings_from_type_id(new_type_id, pool)
    new_cpg = new_volume_settings['cpg']
    new_snap_cpg = new_volume_settings['snap_cpg']
    new_tpvv = new_volume_settings['tpvv']
    new_tdvv = new_volume_settings['tdvv']
    new_qos = new_volume_settings['qos']
    new_vvs = new_volume_settings['vvs_name']
    new_persona = None
    new_hpe3par_keys = new_volume_settings['hpe3par_keys']
    if ('persona' in new_hpe3par_keys):
        new_persona = new_hpe3par_keys['persona']
    new_flash_cache = self.get_flash_cache_policy(new_hpe3par_keys)
    new_compression = self.get_compression_policy(new_hpe3par_keys)
    old_qos = old_volume_settings['qos']
    old_vvs = old_volume_settings['vvs_name']
    old_hpe3par_keys = old_volume_settings['hpe3par_keys']
    old_flash_cache = self.get_flash_cache_policy(old_hpe3par_keys)
    old_volume_info = self.client.getVolume(volume_name)
    old_tpvv = (old_volume_info['provisioningType'] == self.THIN)
    old_tdvv = (old_volume_info['provisioningType'] == self.DEDUP)
    old_cpg = old_volume_info['userCPG']
    old_comment = old_volume_info['comment']
    old_snap_cpg = None
    if ('snapCPG' in old_volume_info):
        old_snap_cpg = old_volume_info['snapCPG']
    LOG.debug('retype    old_volume_info=%s', old_volume_info)
    LOG.debug('retype    old_volume_settings=%s', old_volume_settings)
    LOG.debug('retype    new_volume_settings=%s', new_volume_settings)
    self._retype(volume, volume_name, new_type_name, new_type_id, host, new_persona, old_cpg, new_cpg, old_snap_cpg, new_snap_cpg, old_tpvv, new_tpvv, old_tdvv, new_tdvv, old_vvs, new_vvs, old_qos, new_qos, old_flash_cache, new_flash_cache, old_comment, new_compression)
    if host:
        return (True, self._get_model_update(host['host'], new_cpg))
    else:
        return (True, self._get_model_update(volume['host'], new_cpg))
