From: Daira Hopwood Date: Sat, 18 May 2013 01:56:11 +0000 (+0100) Subject: Azure: change 'container_name' config entry to 'container' for consistency with OpenS... X-Git-Url: https://git.rkrishnan.org/schema.xhtml?a=commitdiff_plain;h=36b5655deb64bae9e3f4e0b8a729e20648c14d3a;p=tahoe-lafs%2Ftahoe-lafs.git Azure: change 'container_name' config entry to 'container' for consistency with OpenStack. Also fix a hidden bug in a test. Signed-off-by: Daira Hopwood --- diff --git a/docs/backends/cloud.rst b/docs/backends/cloud.rst index aafcae3d..a7a296b3 100644 --- a/docs/backends/cloud.rst +++ b/docs/backends/cloud.rst @@ -224,7 +224,7 @@ server's ``tahoe.cfg`` file: This is the account name (subdomain) you chose when creating the account, e.g. ``mydomain``. -``msazure.container_name = (string, required)`` +``msazure.container = (string, required)`` This controls which container will be used to hold shares. The Tahoe-LAFS storage server will only modify and access objects in the configured diff --git a/src/allmydata/storage/backends/cloud/msazure/msazure_container.py b/src/allmydata/storage/backends/cloud/msazure/msazure_container.py index c2936b04..ddeb3a10 100644 --- a/src/allmydata/storage/backends/cloud/msazure/msazure_container.py +++ b/src/allmydata/storage/backends/cloud/msazure/msazure_container.py @@ -233,7 +233,7 @@ def configure_msazure_container(storedir, config): Configure the MS Azure storage container. """ account_name = config.get_config("storage", "msazure.account_name") - container_name = config.get_config("storage", "msazure.container_name") + container_name = config.get_config("storage", "msazure.container") account_key = config.get_private_config("msazure_account_key") return MSAzureStorageContainer(account_name, account_key, container_name) diff --git a/src/allmydata/test/test_client.py b/src/allmydata/test/test_client.py index f4fca539..321fa2d6 100644 --- a/src/allmydata/test/test_client.py +++ b/src/allmydata/test/test_client.py @@ -500,11 +500,10 @@ class Basic(testutil.ReallyEqualMixin, unittest.TestCase): def test_msazure_config_required(self): """ - account_name and container_name are all required by MS Azure - configuration. + account_name and container are all required by MS Azure configuration. """ configs = ["mszure.account_name = theaccount", - "msazure.container_name = bucket"] + "msazure.container = bucket"] for i in range(len(configs)): basedir = self.mktemp() os.mkdir(basedir) @@ -530,8 +529,8 @@ class Basic(testutil.ReallyEqualMixin, unittest.TestCase): "[storage]\n" + "enabled = true\n" + "backend = cloud.msazure\n" + - "googlestorage.account_name = theaccount\n" + - "googlestorage.container_name = bucket\n") + "msazure.account_name = theaccount\n" + + "msazure.container = bucket\n") self.failUnlessRaises(MissingConfigEntry, client.Client, basedir) @mock.patch('allmydata.storage.backends.cloud.msazure.msazure_container.MSAzureStorageContainer') @@ -548,7 +547,7 @@ class Basic(testutil.ReallyEqualMixin, unittest.TestCase): "enabled = true\n" + "backend = cloud.msazure\n" + "msazure.account_name = theaccount\n" + - "msazure.container_name = bucket\n") + "msazure.container = bucket\n") c = client.Client(basedir) server = c.getServiceNamed("storage") self.failUnless(isinstance(server.backend, CloudBackend), server.backend)