Add support for POST commit coverage runs

Modeled on how keystone does it.

Change-Id: Idad4f854f1bfb915a48ff69988553810a76accc0
Signed-off-by: Peter Portante <peter.portante@redhat.com>
Assume ETag is always in the metadata

Currently the GET and HEAD calls always assume that the ETag is
present in the on-disk metadata, as they index the metadata dictionary
directly for the value to fill in the proper response header (a
KeyError would be thrown if missing and turn into a 503).

The close code that handles quarantining checked to see if an ETag is
present in the metadata before making the comparison. However, a close
operation would never even be attempted if an ETag was not present,
since the response headers are filled in before the object is read.

Change-Id: I5032251414eceb38079d235504cc9e589dea5f3e
Signed-off-by: Peter Portante <peter.portante@redhat.com>
Handle X-Copy-From header in account_quota mw

Content length of the copied object
is checked before allowing the copy
request according to the account
quota set by Reseller.

Fixes: bug #1200271
Change-Id: Ie4700f23466dd149ea5a497e6c72438cf52940fd
Split backends off swift/common/db.py

The main purpose of this patch is to lay the groundwork for allowing
the container and account servers to optionally use pluggable backend
implementations. The backend.py files will eventually be the module
where the backend APIs are defined via docstrings of this reference
implementation. The swift/common/db.py module will remain an internal
module used by the reference implementation.

We have a raft of changes to docstrings staged for later, but this
patch takes care to relocate ContainerBroker and AccountBroker into
their new home intact.

Change-Id: Ibab5c7605860ab768c8aa5a3161a705705689b04
Remove keep_data_fp argument from DiskFile constructor

All access to the data_file fp for DiskFile is moved after the new "open"
method.  This prepares to move some additional smarts into DiskFile and reduce
the surface area of the abstraction and the exposure of the underlying
implementation in the object-server.

Future work:

 * Consolidate put_metadata to DiskWriter
 * Add public "update_metdata" method to DiskFile
 * Create DiskReader class to gather all access of methods under "open"

Change-Id: I4de2f265bf099a810c5f1c14b5278d89bd0b382d
Merge "Split backends off swift/common/db.py"
Improve unittest coverage of account reaper

Add more unittests for account_reaper in order to
improve code coverage.

Fixes: bug #1210045
Change-Id: I73490f80ac70b814a0abc490dc932f2a86fca703
Man page lintian errors and warnings

Used groff to recreate the errors. I believe all the issues
except `binary-without-manpage` are solved. Would like
confirmation from someone using Lintian.

Closes-Bug: #1210114
Change-Id: I533205c53efdb7cdf3645cc3e3dc487f9ee5640a
Verbose functional test request failures.

* test/__init__.py: Put safe_repr import/implementation here so that it
is available to functional and unit tests.

* test/functional/swift_test_client.py: When a request fails
record why that request failed, how many requests failed, and what the
request was when raising RequestError to aid in debugging. Makes use of
safe_repr from test/__init__.py.

* test/unit/common/test_constraints.py: Remove implementation of
safe_repr and use the implementation in test/__init__.py.

Change-Id: I6c957343fb4b8b95d3875fd5ca87b3cf28a5f47a
Merge "Man page lintian errors and warnings"
Fix sync test when localhost on port 80 is binded

- When localhost:80 was binding the tests was trying to connect into it.
- To test you can simply run sudo python -m SimpleHTTPServer 80 which
  should show :

  1.0.0.127.in-addr.arpa - - [06/Aug/2013 14:10:42] code 501, message Unsupported method ('DELETE')
  1.0.0.127.in-addr.arpa - - [06/Aug/2013 14:10:42] "DELETE /a/c/o HTTP/1.1" 501 -

  (the test was passing since 501 would raise ClientException).
  mock delete_object in the fourth test to fix that
- Refactor the code to use mock.patch as well.

Closes-Bug: 1208802
Change-Id: I5ddd4ac3a97879f51cf5883fcfc0fe0f0adaeff6
Merge "Remove keep_data_fp argument from DiskFile constructor"
Tinker with dockstrings in back-ends and related places

Change-Id: If80509e2e19cec5d0b8c5cfccd15e6d893558de4
fix race in test_wait on busy server

fix bug 1224208

Change-Id: I83c673a87c31214a7c54b6399ca53512885e6bc3
remove useless if from slo

Change-Id: Id232c6973dcb55c19233b6d517770e58c2737ba0
Ensure audit tests don't cause unwanted errors

Because the audit code catches all Exceptions, bugs in the code, like
misspelled names, bad logic, can result in errors which don't cause
exceptions that kill the unit tests.

Change-Id: Idb8e3b00a49863ab920161a46edb61a5c47fffe2
Merge "Fix sync test when localhost on port 80 is binded"
Merge "Ensure audit tests don't cause unwanted errors"
Remove unused method iter_devices_partition

Change-Id: I69a14bcb92490abd3ad1070799bf1580a2dcaa92
Signed-off-by: Peter Portante <peter.portante@redhat.com>
Merge "Verbose functional test request failures."