'Clone volume from snapshot.
Extend the volume if the size of the volume is more than the snapshot.'

@cinder_utils.trace
def create_volume_from_snapshot(self, volume, snapshot):

    LOG.info('cloning    new    volume(%(new_vol)s)    from    snapshot(%(snapshot)s),    src    volume(%(src_vol)s)', {'new_vol': volume['name'], 'snapshot': snapshot['name'], 'src_vol': snapshot['volume_name']})
    parent_name = self._cinder_id_to_rdx(snapshot['volume_id'])
    clone_name = self._cinder_id_to_rdx(volume['id'])
    bookmark_name = self._cinder_id_to_rdx(snapshot['id'])
    self.rdxApi.clone_volume(parent_name=parent_name, clone_name=clone_name, bookmark_name=bookmark_name, description=self._create_vol_managed_description(volume))
    if (volume['size'] > snapshot['volume_size']):
        self.rdxApi.update_volume(name=clone_name, size=volume['size'])
