]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
move debugshell.py into allmydata/
authorBrian Warner <warner@allmydata.com>
Wed, 13 Dec 2006 22:14:20 +0000 (15:14 -0700)
committerBrian Warner <warner@allmydata.com>
Wed, 13 Dec 2006 22:14:20 +0000 (15:14 -0700)
allmydata/debugshell.py [new file with mode: 0644]
allmydata/manhole.py
debugshell.py [deleted file]

diff --git a/allmydata/debugshell.py b/allmydata/debugshell.py
new file mode 100644 (file)
index 0000000..130c909
--- /dev/null
@@ -0,0 +1,17 @@
+import os
+
+def get_random_bucket_on(nodeid, size=200):
+    d = app.get_remote_service(nodeid, 'storageserver')
+    def get_bucket(rss):
+        return rss.callRemote('allocate_bucket',
+                              verifierid=os.urandom(20),
+                              bucket_num=26,
+                              size=size,
+                              leaser=app.tub.tubID,
+                              )
+    d.addCallback(get_bucket)
+    return d
+
+def write_to_bucket(bucket, bytes=100):
+    return bucket.callRemote('write', data=os.urandom(bytes))
+
index 3926a2b73ea81d712bf2aad0f45be92fb80c0a89..c0858dc9f3249f7caa99c48eb15ab2a8b4b6818b 100644 (file)
@@ -140,7 +140,7 @@ class _BaseManhole(service.MultiService):
 
         def makeNamespace():
             # close over 'self' so we can get access to .parent later
-            import debugshell
+            from allmydata import debugshell
             debugshell.app = self.parent # make client/queen accesible via 'app'
             namespace = {}
             for sym in dir(debugshell):
diff --git a/debugshell.py b/debugshell.py
deleted file mode 100644 (file)
index 130c909..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-import os
-
-def get_random_bucket_on(nodeid, size=200):
-    d = app.get_remote_service(nodeid, 'storageserver')
-    def get_bucket(rss):
-        return rss.callRemote('allocate_bucket',
-                              verifierid=os.urandom(20),
-                              bucket_num=26,
-                              size=size,
-                              leaser=app.tub.tubID,
-                              )
-    d.addCallback(get_bucket)
-    return d
-
-def write_to_bucket(bucket, bytes=100):
-    return bucket.callRemote('write', data=os.urandom(bytes))
-