'create snapshot of a share'

def create_snapshot(self, pool, project, share, snapshot):

    svc = (self.share_snapshots_path % (pool, project, share))
    arg = {'name': snapshot}
    ret = self.rclient.post(svc, arg)
    if (ret.status != restclient.Status.CREATED):
        exception_msg = (_('Error    Creating    Snapshot:    %(snapshot)s    onshare:    %(share)s    to    Pool:    %(pool)s    Project:    %(project)s        Return    code:    %(ret.status)d    Message:    %(ret.data)s.') % {'snapshot': snapshot, 'share': share, 'pool': pool, 'project': project, 'ret.status': ret.status, 'ret.data': ret.data})
        LOG.error(exception_msg)
        raise exception.VolumeBackendAPIException(data=exception_msg)
