From: Brian Warner Date: Wed, 6 Feb 2008 03:28:59 +0000 (-0700) Subject: storage: change service name from 'storageserver' to 'storage' X-Git-Tag: allmydata-tahoe-0.8.0~141 X-Git-Url: https://git.rkrishnan.org/vdrive/%22news.html/about.html?a=commitdiff_plain;h=5103bf8148bdbad410dd2c9698b11d925045556c;p=tahoe-lafs%2Ftahoe-lafs.git storage: change service name from 'storageserver' to 'storage' --- diff --git a/src/allmydata/storage.py b/src/allmydata/storage.py index c50aa58a..d720ef9b 100644 --- a/src/allmydata/storage.py +++ b/src/allmydata/storage.py @@ -668,7 +668,7 @@ def create_mutable_sharefile(filename, my_nodeid, write_enabler, parent): class StorageServer(service.MultiService, Referenceable): implements(RIStorageServer, IStatsProducer) - name = 'storageserver' + name = 'storage' # we're pretty narrow-minded right now OLDEST_SUPPORTED_VERSION = allmydata.__version__ diff --git a/src/allmydata/test/test_client.py b/src/allmydata/test/test_client.py index 2cab1d49..6f2e2f5b 100644 --- a/src/allmydata/test/test_client.py +++ b/src/allmydata/test/test_client.py @@ -53,8 +53,7 @@ class Basic(unittest.TestCase): open(os.path.join(basedir, "vdrive.furl"), "w").write("") open(os.path.join(basedir, "sizelimit"), "w").write("1000") c = client.Client(basedir) - self.failUnlessEqual(c.getServiceNamed("storageserver").sizelimit, - 1000) + self.failUnlessEqual(c.getServiceNamed("storage").sizelimit, 1000) def test_sizelimit_2(self): basedir = "client.Basic.test_sizelimit_2" @@ -63,8 +62,7 @@ class Basic(unittest.TestCase): open(os.path.join(basedir, "vdrive.furl"), "w").write("") open(os.path.join(basedir, "sizelimit"), "w").write("10K") c = client.Client(basedir) - self.failUnlessEqual(c.getServiceNamed("storageserver").sizelimit, - 10*1000) + self.failUnlessEqual(c.getServiceNamed("storage").sizelimit, 10*1000) def test_sizelimit_3(self): basedir = "client.Basic.test_sizelimit_3" @@ -73,7 +71,7 @@ class Basic(unittest.TestCase): open(os.path.join(basedir, "vdrive.furl"), "w").write("") open(os.path.join(basedir, "sizelimit"), "w").write("5mB") c = client.Client(basedir) - self.failUnlessEqual(c.getServiceNamed("storageserver").sizelimit, + self.failUnlessEqual(c.getServiceNamed("storage").sizelimit, 5*1000*1000) def test_sizelimit_4(self): @@ -83,7 +81,7 @@ class Basic(unittest.TestCase): open(os.path.join(basedir, "vdrive.furl"), "w").write("") open(os.path.join(basedir, "sizelimit"), "w").write("78Gb") c = client.Client(basedir) - self.failUnlessEqual(c.getServiceNamed("storageserver").sizelimit, + self.failUnlessEqual(c.getServiceNamed("storage").sizelimit, 78*1000*1000*1000) def test_sizelimit_bad(self): @@ -93,8 +91,7 @@ class Basic(unittest.TestCase): open(os.path.join(basedir, "vdrive.furl"), "w").write("") open(os.path.join(basedir, "sizelimit"), "w").write("bogus") c = client.Client(basedir) - self.failUnlessEqual(c.getServiceNamed("storageserver").sizelimit, - None) + self.failUnlessEqual(c.getServiceNamed("storage").sizelimit, None) def _permute(self, c, key): return [ peerid @@ -127,7 +124,7 @@ class Basic(unittest.TestCase): open(os.path.join(basedir, "introducer.furl"), "w").write("") open(os.path.join(basedir, "vdrive.furl"), "w").write("") c = client.Client(basedir) - ss = c.getServiceNamed("storageserver") + ss = c.getServiceNamed("storage") mine, oldest = ss.remote_get_versions() self.failUnlessEqual(mine, str(allmydata.__version__)) self.failIfEqual(str(allmydata.__version__), "unknown") diff --git a/src/allmydata/test/test_system.py b/src/allmydata/test/test_system.py index 15a7c62c..3834696b 100644 --- a/src/allmydata/test/test_system.py +++ b/src/allmydata/test/test_system.py @@ -288,7 +288,7 @@ class SystemTest(testutil.SignalMixin, testutil.PollMixin, unittest.TestCase): add_to_sparent=True)) def _added(extra_node): self.extra_node = extra_node - extra_node.getServiceNamed("storageserver").sizelimit = 0 + extra_node.getServiceNamed("storage").sizelimit = 0 d.addCallback(_added) HELPER_DATA = "Data that needs help to upload" * 1000