'Get a dict of provisioning options matching existing flexvol.'

def get_provisioning_options_from_flexvol(self, flexvol_name):

    flexvol_info = self.get_flexvol(flexvol_name=flexvol_name)
    dedupe_info = self.get_flexvol_dedupe_info(flexvol_name)
    provisioning_opts = {'aggregate': flexvol_info['aggregate'], 'space_guarantee_type': flexvol_info.get('space-guarantee'), 'snapshot_policy': flexvol_info['snapshot-policy'], 'language': flexvol_info['language'], 'dedupe_enabled': dedupe_info['dedupe'], 'compression_enabled': dedupe_info['compression'], 'snapshot_reserve': flexvol_info['percentage-snapshot-reserve'], 'volume_type': flexvol_info['type'], 'size': int(math.ceil((float(flexvol_info['size']) / units.Gi)))}
    return provisioning_opts
