Changed several files to be Python3 friendly

The print syntax has been changed to be Python3 compatible.

Change-Id: Id3fcbab390f08dcb3380cfda16d7b820b03ef683
Add X-Backend-Timestamp on more object server responses

It's particularly interesting on writes (PUT, POST, DELETE) where the
current on-disk timestamp would prevent the object server from serving
the incoming request and returns 409 Conflict.

The FakeConn has also been updated to respond in kind for 409's on
expect and all responses generaly just cause it's good to keep fakes in
line with the reals - not that I expected any existing tests to break
because of the new headers.

Change-Id: Iac6fbd2f872a9521bb2db84a333365b69f54fb6c
Increase Account Auditor Test Code Coverage

Some simple additional test code to bring coverage from 82% to 99%

Change-Id: I561bc0a043f3451bb0a84cad274fedc907e61ee8
Allow HEAD for POST tempurls

HEAD requests are already allowed for GET and PUT tempurls; this
commit adds that for POST tempurls. Since POST replaces all the
object's metadata, it's quite useful to be able to HEAD the object in
order to fetch the old metadata and do a client-side merge of the new
metadata (like with normal, token-authenticated POST requests).

Change-Id: I603c7822cd27f0e304fd27024f83f95114eb0aef
Update doc for list_endpoints v2 API

Adds some v2 doc to list_endpoints module.

Also adds LE to list of swift sources in logs.rst

Change-Id: I6ccbcf677b12f5aa7db0f9d81e43ce5ca990cc57
Make swift-form-signature testable

Moved the body of bin/swift-form-signature into
swift/cli/form_signature.py, like was done with swift-ring-builder and
others. Added a couple basic tests; there's not 100% coverage, but
it's better than the 0% coverage we had before.

It's almost a straight forklift, but I changed exit() calls to return
statements.

Change-Id: Ie2f702c070da24d9cdface83b9e838e9e2965085
Put proxy-logging in object expirer's sample config

It's generally better to have logs for something than to not have
logs. This way, the object expirer (if using the sample config as a
starting point) will log what it does.

Note that the container reconciler's sample config already contains
proxy-logging, as does the proxy server's. The object expirer is the
odd man out.

Change-Id: I32aac99131746501820319b94405440c1934a694
Fix swift-dispersion-populate bug when using SimpleClient class

Commit 7fcbbebb changed the internal client a little bit and removed the
class variable self.attempts in SimpleClient. This is currently still
needed in swift-dispersion-populate to track the number of retries, thus
re-adding it again.

Closes-Bug: 1351323
Change-Id: I98ba6441607158b34708b2dbb2d1a63788681d63
Enable object system metadata on PUTs

This patch takes a first step towards support
for object system metadata by enabling headers
in the x-object-sysmeta- namespace to be
persisted when objects are PUT. This should be
useful for other pending patches such as on
demand migration and server side encryption
(https://review.openstack.org/#/c/64430/ and
https://review.openstack.org/#/c/76578/1).

The x-object-sysmeta- namespace is already
reserved/protected by the gatekeeper and
passed through the proxy. This patch modifies
the object server to persist these headers
alongside user metadata when an object is
PUT.

This patch will preserve existing object
system metadata and ignore any new system
metadata when handling object POSTs,
including POST-as-copy operations. Support
for modification of object system metadata
with a POST request requires further work
as discussed in the blueprint.

This patch will preserve existing object
system metadata and update it with new
system metadata when copying an object.

A new probe test is added which makes use of
the BrainSplitter class that has been moved
from test_container_merge_policy_index.py to
a new module brain.py.

blueprint object-system-metadata

Change-Id: If716bc15730b7322266ebff4ab8dd31e78e4b962
fix expirer bug with unicode container listings

If the container names in the expirer's account are returned as
unicode strings (as is the case with some json libraries), the
expirer compared eg u'1' == '1', which is problematic. This patch
ensures that the unicode is coerced to ascii so the comparison
is correct.

Change-Id: I72b322e7513f7da32e8dc75c6bf0e7e016948c88
Merge "Enable object system metadata on PUTs"
Merge "fix expirer bug with unicode container listings"
Merge "Add X-Backend-Timestamp on more object server responses"
Merge "Put proxy-logging in object expirer's sample config"
Merge "Update doc for list_endpoints v2 API"
Add a env var to use in-memory obj server in func

Add an environment variable to enable the use of the in-memory object
server during in-process functional test runs.

It might be worth-while to just run under both object servers in-tree,
but this at least enables it, without having to figure out how to make
two test runs in two different environments.

DocImpact

Change-Id: Id76b008e1f273c639ae61550affddc32c5d7c419
Signed-off-by: Thiago da Silva <thiago@redhat.com>
Merge "Allow HEAD for POST tempurls"
Bail out a little faster when object write affinity is off

This function was calling a couple functions prior to checking for
early bailout; if it did bail out, the results of those function calls
were unused. Bail out earlier to avoid wasted work.

Change-Id: Ia023549a45355b44ebfb41212565c42f993415a9
Update the swift documentation theme

Currently the theme used by the swift developer docs are out of
date, it should be using oslosphinx, to provide a similar look
and feel between all openstack related projects.

Change-Id: Id7c226cdc13c6c4f3b5082b1ef4dfe09966b21ec
Merge "Bail out a little faster when object write affinity is off"