From 0bf2f9ec215f3c638701631e5676b670d7acc1b9 Mon Sep 17 00:00:00 2001 From: drebs Date: Wed, 22 Jan 2014 14:51:45 -0200 Subject: Fix dev scripts doc and names. --- scripts/server-side-db.py | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 scripts/server-side-db.py (limited to 'scripts/server-side-db.py') diff --git a/scripts/server-side-db.py b/scripts/server-side-db.py deleted file mode 100644 index 01a9aaac..00000000 --- a/scripts/server-side-db.py +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/python - -# This script gives server-side access to one Soledad user database by using -# the configuration stored in /etc/leap/soledad-server.conf. - -import sys -from ConfigParser import ConfigParser - -from leap.soledad.common.couch import CouchDatabase - -if len(sys.argv) != 2: - print 'Usage: %s ' % sys.argv[0] - exit(1) - -uuid = sys.argv[1] - -# get couch url -cp = ConfigParser() -cp.read('/etc/leap/soledad-server.conf') -url = cp.get('soledad-server', 'couch_url') - -# access user db -dbname = 'user-%s' % uuid -db = CouchDatabase(url, dbname) - -# get replica info -replica_uid = db._replica_uid -gen, docs = db.get_all_docs() -print "dbname: %s" % dbname -print "replica_uid: %s" % replica_uid -print "generation: %d" % gen - -# get relevant docs -schemes = map(lambda d: d.content['_enc_scheme'], docs) -pubenc = filter(lambda d: d.content['_enc_scheme'] == 'pubkey', docs) - -print "total number of docs: %d" % len(docs) -print "pubkey encrypted docs: %d" % len(pubenc) -- cgit v1.2.3