From: Itamar Turner-Trauring Date: Thu, 18 Apr 2013 13:04:33 +0000 (-0400) Subject: Address review comments from Daira. X-Git-Url: https://git.rkrishnan.org/%5B/%5D%20/frontends/vdrive?a=commitdiff_plain;h=32bacbf6fbd8f8daa442554daf3c428cbfb8233b;p=tahoe-lafs%2Ftahoe-lafs.git Address review comments from Daira. 1. Fix typo. 2. Rename config item googlestorage.bucket_name to googlestorage.bucket for consistency. --- diff --git a/docs/backends/cloud.rst b/docs/backends/cloud.rst index e8b258fb..c580da65 100644 --- a/docs/backends/cloud.rst +++ b/docs/backends/cloud.rst @@ -168,11 +168,11 @@ the server's ``tahoe.cfg`` file: ``googlestorage.project_id = (string, required)`` - This is the project number of the project you you created, + This is the project number of the project you created, e.g. ``123456``. You can find this number in the Google Cloud Storage section of the APIs console (the number following `x-goog-project-id`). -``googlestorage.bucket_name = (string, required)`` +``googlestorage.bucket = (string, required)`` This controls which bucket (aka container) will be used to hold shares. The Tahoe-LAFS storage server will only modify and access objects diff --git a/src/allmydata/storage/backends/cloud/googlestorage/googlestorage_container.py b/src/allmydata/storage/backends/cloud/googlestorage/googlestorage_container.py index 05f2f17e..e06e754e 100644 --- a/src/allmydata/storage/backends/cloud/googlestorage/googlestorage_container.py +++ b/src/allmydata/storage/backends/cloud/googlestorage/googlestorage_container.py @@ -238,7 +238,7 @@ def configure_googlestorage_container(storedir, config): """ account_email = config.get_config("storage", "googlestorage.account_email") private_key = config.get_private_config("googlestorage_private_key") - bucket_name = config.get_config("storage", "googlestorage.bucket_name") + bucket_name = config.get_config("storage", "googlestorage.bucket") # Only necessary if we do bucket creation/deletion, otherwise can be # removed: project_id = config.get_config("storage", "googlestorage.project_id") diff --git a/src/allmydata/test/test_client.py b/src/allmydata/test/test_client.py index bb7a086a..9bcf0b97 100644 --- a/src/allmydata/test/test_client.py +++ b/src/allmydata/test/test_client.py @@ -432,11 +432,11 @@ class Basic(testutil.ReallyEqualMixin, unittest.TestCase): def test_googlestorage_config_required(self): """ - account_email, bucket_name and project_id are all required by + account_email, bucket and project_id are all required by googlestorage configuration. """ configs = ["googlestorage.account_email = u@example.com", - "googlestorage.bucket_name = bucket", + "googlestorage.bucket = bucket", "googlestorage.project_id = 456"] for i in range(len(configs)): basedir = self.mktemp() @@ -465,7 +465,7 @@ class Basic(testutil.ReallyEqualMixin, unittest.TestCase): "enabled = true\n" + "backend = cloud.googlestorage\n" + "googlestorage.account_email = u@example.com\n" + - "googlestorage.bucket_name = bucket\n" + + "googlestorage.bucket = bucket\n" + "googlestorage.project_id = 456\n") self.failUnlessRaises(MissingConfigEntry, client.Client, basedir) @@ -484,7 +484,7 @@ class Basic(testutil.ReallyEqualMixin, unittest.TestCase): "enabled = true\n" + "backend = cloud.googlestorage\n" + "googlestorage.account_email = u@example.com\n" + - "googlestorage.bucket_name = bucket\n" + + "googlestorage.bucket = bucket\n" + "googlestorage.project_id = 456\n") c = client.Client(basedir) server = c.getServiceNamed("storage")