swift/test/functional
Samuel Merritt 1901719542 Move all SLO functionality to middleware
This way, with zero additional effort, SLO will support enhancements
to object storage and retrieval, such as:
 * automatic resume of GETs on broken connection (today)
 * storage policies (in the near future)
 * erasure-coded object segments (in the far future)

This also lets SLOs work with other sorts of hypothetical third-party
middleware, for example object compression or encryption.

Getting COPY to work here is sort of a hack; the proxy's object
controller now checks for "swift.copy_response_hook" in the request's
environment and feeds the GET response (the source of the new object's
data) through it. This lets a COPY of a SLO manifest actually combine
the segments instead of merely copying the manifest document.

Updated ObjectController to expect a response's app_iter to be an
iterable, not just an iterator. (PEP 333 says "When called by the
server, the application object must return an iterable yielding zero
or more strings." ObjectController was just being too strict.) This
way, SLO can re-use the same response-generation logic for GET and
COPY requests.

Added a (sort of hokey) mechanism to allow middlewares to close
incompletely-consumed app iterators without triggering a warning. SLO
does this when it realizes it's performed a ranged GET on a manifest;
it closes the iterable, removes the range, and retries the
request. Without this change, the proxy logs would get 'Client
disconnected on read' in them.

DocImpact

blueprint multi-ring-large-objects

Change-Id: Ic11662eb5c7176fbf422a6fc87a569928d6f85a1
2014-01-13 10:52:29 -08:00
..
__init__.py made functional tests more configurable 2011-02-22 18:00:11 -06:00
swift_test_client.py Merge "change the last-modified header value with valid one" 2013-12-20 00:57:36 +00:00
swift_testing.py Move the tests from functionalnosetests 2014-01-07 15:58:11 +08:00
test_account.py Move the tests from functionalnosetests 2014-01-07 15:58:11 +08:00
test_container.py Move the tests from functionalnosetests 2014-01-07 15:58:11 +08:00
test_object.py Move the tests from functionalnosetests 2014-01-07 15:58:11 +08:00
tests.py Move all SLO functionality to middleware 2014-01-13 10:52:29 -08:00