'This creates a temporary snapshot of a volume.
This is used by cloning a volume so that we can then
issue extend volume against the original volume.'

def _create_temp_snapshot(self, volume):

    vol_name = self._get_3par_vol_name(volume['id'])
    snap_uuid = uuid.uuid4().hex
    snap_name = self._get_3par_snap_name(snap_uuid, temp_snap=True)
    extra = {'volume_name': volume['name'], 'volume_id': volume['id']}
    optional = {'comment': json.dumps(extra)}
    optional['expirationHours'] = 1
    LOG.info('Creating    temp    snapshot    %(snap)s    from    volume    %(vol)s', {'snap': snap_name, 'vol': vol_name})
    self.client.createSnapshot(snap_name, vol_name, optional)
    return self.client.getVolume(snap_name)
