'Creates a snapshot of a volume.'

def create_snapshot(self, snapshot):

    LOG.info('Creating    snapshot:    %s', snapshot['name'])
    lcfg = self.configuration
    snap_name = self._create_snapshot_name()
    self.zfssa.create_snapshot(lcfg.zfssa_nfs_pool, lcfg.zfssa_nfs_project, lcfg.zfssa_nfs_share, snap_name)
    src_file = ((snap_name + '/') + snapshot['volume_name'])
    try:
        self.zfssa.create_snapshot_of_volume_file(src_file=src_file, dst_file=snapshot['name'])
    except Exception:
        with excutils.save_and_reraise_exception():
            LOG.debug('Error    thrown    during    snapshot:    %s    creation', snapshot['name'])
    finally:
        self.zfssa.delete_snapshot(lcfg.zfssa_nfs_pool, lcfg.zfssa_nfs_project, lcfg.zfssa_nfs_share, snap_name)
