]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
OpenStack: change provider names to rackspace.com and rackspace.co.uk.
authorDaira Hopwood <daira@jacaranda.org>
Fri, 15 Feb 2013 03:13:13 +0000 (03:13 +0000)
committerDaira Hopwood <daira@jacaranda.org>
Fri, 16 Oct 2015 16:45:30 +0000 (17:45 +0100)
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
src/allmydata/storage/backends/cloud/openstack/openstack_container.py
src/allmydata/test/test_client.py
src/allmydata/test/test_storage.py

index afc41e90ab249a2560a0c7db9678f7480169d74e..0aa2099677acb444083c829610a55e0670e5fd11 100644 (file)
@@ -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())))
index b1b9e8a277404345bd80e71fe9a30e467fa9dd6e..3dfae39e9b93fc17cccf0c5b28038f6ae16d9646 100644 (file)
@@ -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)
index 81f29f43011bc0e6985b1c3826ec9acf8e228fc3..82b701ec9f0b6ec7333690d5a157cb2e7e9625ad 100644 (file)
@@ -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"