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>
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
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
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
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."
Merge "fix race in test_wait on busy server"
Merge "Tinker with dockstrings in back-ends and related places"
Add handoffs_first and handoff_delete to obj-repl

If handoffs_first is True, then the object replicator will give
partitions that are not supposed to be on the node priority.

If handoff_delete is set to a number (n), then it will delete a handoff
partition if at least n replicas were successfully replicated

Also fixed a couple of things in the object replicator unit tests and
added some more

DocImpact

Change-Id: Icb9968953cf467be2a52046fb16f4b84eb5604e4
Use an existing local var rather than doing alookup

This should make ``Ring.get_more_nodes`` microscopically faster.

Change-Id: Ibf0988fe0630ad94ac0c04040766d89ef86d1488
Switched some relative imports to be absolute

Implicit relative imports don't work on Python3, and are also prone to
several different classes of errors.

Change-Id: I7b62e9bfbe9c0b1fc9876413e3139fda019a4e57
Merge "Add handoffs_first and handoff_delete to obj-repl"