Skip IPv6 addresses in cname_lookup middleware.

It already skips IPv4 addresses, and since IPv6 is the future of the
Internet*, we should probably do the right thing with those too.

* IPv6: Just two years away for over fifteen years!

Change-Id: I54f1db4e936fd38d05ac8b5c709efba76525b9d2
Don't delete containers when they weren't created.

When swift-bench is run in direct mode, don't try to delete the
containers which weren't created.

Fixes bug 1177960.

Change-Id: Ice07e8729bb776e2b215894cf95fb80b64167a8d
Fix two documentation warnings.

The crossdomain doc was named *.xml instead of *.rst causing it to not
get built or included in the toctree where it was supposed to.

The apache deployment guide wasn't linked to from anywhere, so I added
it under the normal deployment guide.

Change-Id: I817a1f2ca1ed7913e8ea5155cc1fac07caf0b637
Moved some code out of swift.obj.replicator

This will be needed in future replication work to avoid circular
imports.

I used swift.obj.base as the module name just because we seemed to
avoid putting code in __init__.py files so far and I didn't want to
buck the trend.

I would love to see other obj things like *_metadata and DiskFile
move into swift.obj.base as well and swift.obj.server just be the
WSGI server logic, but I'll leave that for the future.

I have changed the tests as little as possible (just the references
to where they get the code to test) to show the refactor has not
broken anything. I did add a test for tpool_reraise since there was
none before.

There will be a follow on patch for moving the tests to their new
location(s). I figured I'd wait to put the bikes in the shed until
everyone's done painting it.

Change-Id: I32b4ac88be21eb76c877d3f4cc1e6ac33304835b
Metadata retrieving from sqlite must be str for key

Encode metadata key as utf8 if key is unicode when
retriving it from sqlite database.

Change-Id: I4ba11543d1bed17098b5e52dd768c75b403188a1
Fixes: bug #1172202
Remove dead code.

While it is true that one *could* call ContainerBroker.get_info() with
include_metadata=True, it is also true that nobody actually does.

It's also true that the code path taken when include_metadata=True is
broken in the case of non-ASCII metadata keys
(e.g. X-Container-Meta-☃: snowman), so leaving it around is just
asking for future pain.

Change-Id: I4931add4b8fb7c4f57820e52f182c21040d8db10
Merge "Metadata retrieving from sqlite must be str for key"
Merge "Skip IPv6 addresses in cname_lookup middleware."
Autocreate cleanups

Autocreate was messy - now cleaned.
Auto-create now occurs at account POST, and container PUT only.
A method for autocreation was added
Autocreation was removed from account_info and container_info.

Fake-it as if the account exists on account HEAD and account GET.

Return 404 on everything else when the account does not exist.

Fix: Bug #1172223
Fix: Bug #1179140
Change-Id: Iac54c1438eb09883fbc29a1ad2ac2245b95efc92
Merge "Remove dead code."
Merge "Autocreate cleanups"
Merge "Moved some code out of swift.obj.replicator"
Moved tests for moved obj.base code

Follow-on to https://review.openstack.org/#/c/28895/

Moved the tests for the code that was moved to obj.base and also made
the new test file flake8 compliant.

Change-Id: I4be718927b6cd2de8efe32f8e54b458a4e05291b
Set TZ environment variable to avoid a stat call

By setting the TZ environment variable for the WSGI process we avoid
the stat("/etc/localtime") on every request handled that logs using
strftime().

Change-Id: Ifc78236a99ed193a42389e383d062b38f57a5a31
Signed-off-by: Peter Portante <peter.portante@redhat.com>
Merge "Don't delete containers when they weren't created."
Merge "Fix two documentation warnings."
Merge "Set TZ environment variable to avoid a stat call"