Commit Graph

5912 Commits

Author SHA1 Message Date
Itamar Turner-Trauring
b3bd6a1279 Fix prefix inclusion, so authentication works. 2014-04-09 01:33:55 +01:00
Daira Hopwood
3303b94ab3 Configuration for MS Azure.
Author: Itamar Turner-Trauring <itamar@futurefoundries.com>
Signed-off-by: Daira Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:55 +01:00
Itamar Turner-Trauring
d091b735cf First pass at implementing the Azure GET/PUT/DELETE. 2014-04-09 01:33:55 +01:00
Itamar Turner-Trauring
74b796d939 Address review comments from Daira.
1. Fix typo.
2. Rename config item googlestorage.bucket_name to googlestorage.bucket for
   consistency.
2014-04-09 01:33:55 +01:00
Itamar Turner-Trauring
afdbce1569 Add documentation for Google Cloud Storage backend. 2014-04-09 01:33:55 +01:00
Daira Hopwood
df3fc111b1 msazure_container.py: Implement authentication signature scheme.
Signed-off-by: Daira Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:55 +01:00
Daira Hopwood
f6dd94465c Fix pyflakes errors.
Signed-off-by: Daira Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:55 +01:00
Daira Hopwood
18c5fda670 Unconditionally use HTTPConnectionPool, and depend on a Twisted that provides it.
Signed-off-by: Daira Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:55 +01:00
Daira Hopwood
d070ec0e9c googlestorage_container.py: Use Amazon S3 namespace, since Google insists on using it.
Signed-off-by: Daira Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:55 +01:00
Itamar Turner-Trauring
88c5c01081 If oauth2client isn't present, skip Google Storage tests rather than blowing up. 2014-04-09 01:33:55 +01:00
Itamar Turner-Trauring
47110710ea Configuration support for Google Cloud Storage backend. 2014-04-09 01:33:55 +01:00
Itamar Turner-Trauring
7eec2f4fc9 googlestorage_container.py: Implement PUT and listing of bucket contents. 2014-04-09 01:33:55 +01:00
Itamar Turner-Trauring
96f3c65f14 googlestorage_container.py: Implement DELETE object. 2014-04-09 01:33:55 +01:00
Itamar Turner-Trauring
72612ea906 googlestorage_container.py: Implement GET object. 2014-04-09 01:33:55 +01:00
Itamar Turner-Trauring
b82146a0cb Refactor useful functionality out of OpenStackContainer and into utility class. 2014-04-09 01:33:55 +01:00
Itamar Turner-Trauring
f1ca398ca6 More tests for the Google Storage container, and fixes to the tests. 2014-04-09 01:33:55 +01:00
Itamar Turner-Trauring
24ed626678 Start of tests for the Google Storage container. 2014-04-09 01:33:55 +01:00
Itamar Turner-Trauring
818648cbf5 Tests for googlestorage_container.AuthenticationClient.
Author: Itamar Turner-Trauring <itamar@futurefoundries.com>
2014-04-09 01:33:55 +01:00
Itamar Turner-Trauring
d42b232e6a Sketch of working Google Cloud Storage authentication, with some demo code. 2014-04-09 01:33:55 +01:00
David-Sarah Hopwood
5304c0b152 docs/backends/cloud.rst: clarify how to get to API Access in the Rackspace console.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:55 +01:00
David-Sarah Hopwood
2e38b3912a OpenStack: fix a type error introduced by the fix to #1921.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:55 +01:00
David-Sarah Hopwood
512cc28663 OpenStack: support HP Cloud Object Storage.
Also make the choice of auth protocol for Rackspace configurable via
openstack.provider, and change the reauth period to 11 hours.

Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:55 +01:00
David-Sarah Hopwood
9f6d12691e leasedb/accounting crawler: only treat stable shares as disappeared or unleased.
fixes #1921

Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:55 +01:00
David-Sarah Hopwood
76e7c5b97a Cloud backend: move potentially reusable HTTP request utilities to cloud_common.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:55 +01:00
David-Sarah Hopwood
81b396767e OpenStack: if we get a 401 Unauthorized response, reauthenticate immediately.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:55 +01:00
David-Sarah Hopwood
7fdb015e0c cloud_common.py: generalize ContainerRetryMixin to allow the container class to specify what to retry.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:55 +01:00
David-Sarah Hopwood
e0f8942abd openstack_container.py: remove a superfluous argument to get_auth_info_locked.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:55 +01:00
David-Sarah Hopwood
46b00cfbd6 accounting_crawler.py: disable removing leasedb entries for disappeared shares.
This works around ticket #1921 for now.

Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:55 +01:00
David-Sarah Hopwood
96291392d3 openstack_container.py: avoid logging secrets in request headers.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:55 +01:00
David-Sarah Hopwood
70b8d5ac67 docs: add references to OpenStack/cloud backend in configuration.rst and running.rst.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:55 +01:00
David-Sarah Hopwood
fa2cf092e3 OpenStack: generalize to support multiple auth protocols, and add V2 protocol.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:55 +01:00
David-Sarah Hopwood
f311418382 OpenStack: add _http_request helper.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:55 +01:00
David-Sarah Hopwood
4e04008e75 openstack_container.py: factor out HTTP response code checking.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:55 +01:00
David-Sarah Hopwood
ea8ec9c137 docs/backends/cloud.rst: add documentation for OpenStack config parameters.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:55 +01:00
David-Sarah Hopwood
956601dd16 openstack_container.py: improve name of _auth_lock; simplify by using DeferredLock.run.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:55 +01:00
David-Sarah Hopwood
27d4810349 OpenStack: change provider names to rackspace.com and rackspace.co.uk.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:55 +01:00
David-Sarah Hopwood
7db6c7f028 test_storage.py: add tests for OpenStackContainer.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:55 +01:00
David-Sarah Hopwood
f53ef0baf1 openstack_container.py: disable or remove debug prints.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:54 +01:00
David-Sarah Hopwood
3a76e63690 openstack_container.py: fix a bug in type of ContainerListing.is_truncated.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:54 +01:00
David-Sarah Hopwood
4f1b51a26c Move classes common to mock and OpenStack cloud services, to cloud_common.py.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:54 +01:00
David-Sarah Hopwood
18a30d4d25 test_storage.py: refactor OpenStackCloudBackend to make it easier to add new tests.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:54 +01:00
David-Sarah Hopwood
ed6ee84786 OpenStack: mostly complete implementation of OpenStackContainer.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:54 +01:00
David-Sarah Hopwood
b9a9f9f30b OpenStack: improve logging in openstack_container.py.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:54 +01:00
David-Sarah Hopwood
e85b97b253 OpenStack: add openstack.container config parameter.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:54 +01:00
David-Sarah Hopwood
5792a602a5 Add test for OpenStack authentication client.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:54 +01:00
David-Sarah Hopwood
b20f10ee10 openstack_container.py: add shutdown() to avoid unclean reactor errors in tests.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:54 +01:00
David-Sarah Hopwood
a4d66b49d0 openstack_container.py: add _ prefix to private attributes.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:54 +01:00
David-Sarah Hopwood
6a4f26456c setup.py: add allmydata.storage.backends.cloud.openstack module.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:54 +01:00
David-Sarah Hopwood
ff8cd14fac test_client.py: add OpenStack config tests.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:54 +01:00
David-Sarah Hopwood
0da49ed0d7 test_client.py: cleanups to S3 config tests.
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2014-04-09 01:33:54 +01:00