From: Daira Hopwood Date: Fri, 15 Feb 2013 03:13:13 +0000 (+0000) Subject: OpenStack: change provider names to rackspace.com and rackspace.co.uk. X-Git-Url: https://git.rkrishnan.org/maximilian?a=commitdiff_plain;h=f96419adbdcc4ed94e35f6d4faa9fa0a1424a06c;p=tahoe-lafs%2Ftahoe-lafs.git OpenStack: change provider names to rackspace.com and rackspace.co.uk. Signed-off-by: David-Sarah Hopwood --- diff --git a/src/allmydata/storage/backends/cloud/openstack/openstack_container.py b/src/allmydata/storage/backends/cloud/openstack/openstack_container.py index afc41e90..0aa20996 100644 --- a/src/allmydata/storage/backends/cloud/openstack/openstack_container.py +++ b/src/allmydata/storage/backends/cloud/openstack/openstack_container.py @@ -24,13 +24,13 @@ UNSAFE_DEBUG = False DEFAULT_AUTH_URLS = { - "rackspace": "https://identity.api.rackspacecloud.com/v1.0", - "rackspace-uk": "https://lon.identity.api.rackspacecloud.com/v1.0", + "rackspace.com": "https://identity.api.rackspacecloud.com/v1.0", + "rackspace.co.uk": "https://lon.identity.api.rackspacecloud.com/v1.0", } def configure_openstack_container(storedir, config): api_key = config.get_or_create_private_config("openstack_api_key") - provider = config.get_config("storage", "openstack.provider", "rackspace").lower() + provider = config.get_config("storage", "openstack.provider", "rackspace.com").lower() if provider not in DEFAULT_AUTH_URLS: raise InvalidValueError("[storage]openstack.provider %r is not recognized\n" "Valid providers are: %s" % (provider, ", ".join(DEFAULT_AUTH_URLS.keys()))) diff --git a/src/allmydata/test/test_client.py b/src/allmydata/test/test_client.py index b1b9e8a2..3dfae39e 100644 --- a/src/allmydata/test/test_client.py +++ b/src/allmydata/test/test_client.py @@ -362,13 +362,13 @@ class Basic(testutil.ReallyEqualMixin, unittest.TestCase): "[storage]\n" + "enabled = true\n" + "backend = cloud.openstack\n" + - "openstack.provider = rackspace\n" + + "openstack.provider = rackspace.com\n" + "openstack.username = alex\n" + "openstack.container = test\n") fileutil.write(os.path.join(basedir, "tahoe.cfg"), config) c = client.Client(basedir) - mock_AuthenticationClient.assert_called_with("dummy", "rackspace", + mock_AuthenticationClient.assert_called_with("dummy", "rackspace.com", "https://identity.api.rackspacecloud.com/v1.0", "alex", 23*60*60) container_call_args = mock_OpenStackContainer.call_args_list @@ -387,7 +387,7 @@ class Basic(testutil.ReallyEqualMixin, unittest.TestCase): "enabled = true\n" + "readonly = true\n" + "backend = cloud.openstack\n" + - "openstack.provider = rackspace\n" + + "openstack.provider = rackspace.com\n" + "openstack.username = alex\n" + "openstack.container = test\n") self.failUnlessRaises(InvalidValueError, client.Client, basedir) @@ -401,7 +401,7 @@ class Basic(testutil.ReallyEqualMixin, unittest.TestCase): "[storage]\n" + "enabled = true\n" + "backend = cloud.openstack\n" + - "openstack.provider = rackspace\n" + + "openstack.provider = rackspace.com\n" + "openstack.container = test\n") self.failUnlessRaises(MissingConfigEntry, client.Client, basedir) @@ -414,7 +414,7 @@ class Basic(testutil.ReallyEqualMixin, unittest.TestCase): "[storage]\n" + "enabled = true\n" + "backend = cloud.openstack\n" + - "openstack.provider = rackspace\n" + + "openstack.provider = rackspace.com\n" + "openstack.username = alex\n") self.failUnlessRaises(MissingConfigEntry, client.Client, basedir) @@ -426,7 +426,7 @@ class Basic(testutil.ReallyEqualMixin, unittest.TestCase): "[storage]\n" + "enabled = true\n" + "backend = cloud.openstack\n" + - "openstack.provider = rackspace\n" + + "openstack.provider = rackspace.com\n" + "openstack.username = alex\n" + "openstack.container = test\n") self.failUnlessRaises(MissingConfigEntry, client.Client, basedir) diff --git a/src/allmydata/test/test_storage.py b/src/allmydata/test/test_storage.py index 81f29f43..82b701ec 100644 --- a/src/allmydata/test/test_storage.py +++ b/src/allmydata/test/test_storage.py @@ -415,7 +415,7 @@ class CloudCommon(unittest.TestCase, ShouldFailMixin, WorkdirMixin): class OpenStackCloudBackend(ServiceParentMixin, WorkdirMixin, ShouldFailMixin, unittest.TestCase): - PROVIDER = "rackspace" + PROVIDER = "rackspace.com" AUTH_SERVICE_URL = "auth_service_url" USERNAME = "username" CONTAINER = "container"