From: Daira Hopwood Date: Sun, 18 Nov 2012 06:22:18 +0000 (+0000) Subject: Rename 'buckets' to 'sharesets' on storage status page. X-Git-Url: https://git.rkrishnan.org/?a=commitdiff_plain;h=cae933a8826165a3d587a573bd17d86827115423;p=tahoe-lafs%2Ftahoe-lafs.git Rename 'buckets' to 'sharesets' on storage status page. Signed-off-by: David-Sarah Hopwood --- diff --git a/src/allmydata/test/test_storage.py b/src/allmydata/test/test_storage.py index d993d95e..150ba9bc 100644 --- a/src/allmydata/test/test_storage.py +++ b/src/allmydata/test/test_storage.py @@ -2794,7 +2794,7 @@ class BucketCounterTest(unittest.TestCase, CrawlerTestMixin, ReallyEqualMixin): s = remove_tags(html) self.failUnlessIn("Accepting new shares: Yes", s) self.failUnlessIn("Reserved space: - 0 B (0)", s) - self.failUnlessIn("Total buckets: Not computed yet", s) + self.failUnlessIn("Total sharesets: Not computed yet", s) self.failUnlessIn("Next crawl in", s) def _after_first_prefix(prefix): @@ -2821,7 +2821,7 @@ class BucketCounterTest(unittest.TestCase, CrawlerTestMixin, ReallyEqualMixin): def _after_yield(ign): html = w.renderSynchronously() s = remove_tags(html) - self.failUnlessIn("Total buckets: 0 (the number of", s) + self.failUnlessIn("Total sharesets: 0 (the number of", s) self.failUnless("Next crawl in 59 minutes" in s or "Next crawl in 60 minutes" in s, s) d.addCallback(_after_yield) return d @@ -3032,9 +3032,9 @@ class AccountingCrawlerTest(unittest.TestCase, CrawlerTestMixin, WebRenderingMix def _check_html_in_cycle(html): s = remove_tags(html) self.failUnlessIn("So far, this cycle has examined " - "1 shares in 1 buckets (0 mutable / 1 immutable) ", s) + "1 shares in 1 sharesets (0 mutable / 1 immutable) ", s) self.failUnlessIn("and has recovered: " - "0 shares, 0 buckets (0 mutable / 0 immutable), " + "0 shares, 0 sharesets (0 mutable / 0 immutable), " "0 B (0 B / 0 B)", s) return ac.set_hook('after_cycle') @@ -3083,9 +3083,9 @@ class AccountingCrawlerTest(unittest.TestCase, CrawlerTestMixin, WebRenderingMix d.addCallback(lambda ign: self.render1(webstatus)) def _check_html_after_cycle(html): s = remove_tags(html) - self.failUnlessIn("recovered: 0 shares, 0 buckets " + self.failUnlessIn("recovered: 0 shares, 0 sharesets " "(0 mutable / 0 immutable), 0 B (0 B / 0 B) ", s) - self.failUnlessIn("and saw a total of 4 shares, 4 buckets " + self.failUnlessIn("and saw a total of 4 shares, 4 sharesets " "(2 mutable / 2 immutable),", s) self.failUnlessIn("but expiration was not enabled", s) d.addCallback(_check_html_after_cycle) @@ -3170,10 +3170,10 @@ class AccountingCrawlerTest(unittest.TestCase, CrawlerTestMixin, WebRenderingMix # all. This part of the test depends upon the SIs landing right # where they do now. self.failUnlessIn("The remainder of this cycle is expected to " - "recover: 4 shares, 4 buckets", s) + "recover: 4 shares, 4 sharesets", s) self.failUnlessIn("The whole cycle is expected to examine " - "5 shares in 5 buckets and to recover: " - "5 shares, 5 buckets", s) + "5 shares in 5 sharesets and to recover: " + "5 shares, 5 sharesets", s) return ac.set_hook('after_cycle') d.addCallback(_check_html_in_cycle) @@ -3213,7 +3213,7 @@ class AccountingCrawlerTest(unittest.TestCase, CrawlerTestMixin, WebRenderingMix s = remove_tags(html) self.failUnlessIn("Expiration Enabled: expired leases will be removed", s) self.failUnlessIn("Leases created or last renewed more than 33 minutes ago will be considered expired.", s) - self.failUnlessIn(" recovered: 2 shares, 2 buckets (1 mutable / 1 immutable), ", s) + self.failUnlessIn(" recovered: 2 shares, 2 sharesets (1 mutable / 1 immutable), ", s) d.addCallback(_check_html_after_cycle) d.addBoth(self._wait_for_yield, ac) return d @@ -3290,10 +3290,10 @@ class AccountingCrawlerTest(unittest.TestCase, CrawlerTestMixin, WebRenderingMix # all. This part of the test depends upon the SIs landing right # where they do now. self.failUnlessIn("The remainder of this cycle is expected to " - "recover: 4 shares, 4 buckets", s) + "recover: 4 shares, 4 sharesets", s) self.failUnlessIn("The whole cycle is expected to examine " - "5 shares in 5 buckets and to recover: " - "5 shares, 5 buckets", s) + "5 shares in 5 sharesets and to recover: " + "5 shares, 5 sharesets", s) return ac.set_hook('after_cycle') d.addCallback(_check_html_in_cycle) @@ -3336,7 +3336,7 @@ class AccountingCrawlerTest(unittest.TestCase, CrawlerTestMixin, WebRenderingMix date = time.strftime("%Y-%m-%d (%d-%b-%Y) UTC", time.gmtime(then)) substr = "Leases created or last renewed before %s will be considered expired." % date self.failUnlessIn(substr, s) - self.failUnlessIn(" recovered: 2 shares, 2 buckets (1 mutable / 1 immutable), ", s) + self.failUnlessIn(" recovered: 2 shares, 2 sharesets (1 mutable / 1 immutable), ", s) d.addCallback(_check_html_after_cycle) d.addBoth(self._wait_for_yield, ac) return d diff --git a/src/allmydata/web/storage.py b/src/allmydata/web/storage.py index 656090f3..19d40e18 100644 --- a/src/allmydata/web/storage.py +++ b/src/allmydata/web/storage.py @@ -144,7 +144,7 @@ class StorageStatus(rend.Page): if d is None: return "?" return "%d" % d - return "%s shares, %s buckets (%s mutable / %s immutable), %s (%s / %s)" % \ + return "%s shares, %s sharesets (%s mutable / %s immutable), %s (%s / %s)" % \ (maybe(sr["%s-shares" % a]), maybe(sr["%s-buckets" % a]), maybe(sr["%s-buckets-mutable" % a]), @@ -180,7 +180,7 @@ class StorageStatus(rend.Page): if d is None: return "?" return "%d" % d - add("So far, this cycle has examined %d shares in %d buckets" + add("So far, this cycle has examined %d shares in %d sharesets" % (sr["examined-shares"], sr["examined-buckets"]), " (%d mutable / %d immutable)" % (sr["examined-buckets-mutable"], sr["examined-buckets-immutable"]), @@ -191,7 +191,7 @@ class StorageStatus(rend.Page): if so_far["expiration-enabled"]: add("The remainder of this cycle is expected to recover: ", self.format_recovered(esr, "actual")) - add("The whole cycle is expected to examine %s shares in %s buckets" + add("The whole cycle is expected to examine %s shares in %s sharesets" % (maybe(ecr["examined-shares"]), maybe(ecr["examined-buckets"]))) add("and to recover: ", self.format_recovered(ecr, "actual")) else: diff --git a/src/allmydata/web/storage_status.xhtml b/src/allmydata/web/storage_status.xhtml index d97daf9a..9c218b5f 100644 --- a/src/allmydata/web/storage_status.xhtml +++ b/src/allmydata/web/storage_status.xhtml @@ -59,7 +59,7 @@
  • Server Nodeid:
  • Accepting new shares:
  • -
  • Total buckets: +
  • Total sharesets: (the number of files and directories for which this server is holding a share)