Remove duplicated code in direct_client.

- Add a base function _get_direct_account_container to do the direct
  account stuff instead of duplicating both methods.

Change-Id: I12059a741dd22d0dde20012d1dbc4be9b8e90957
some container serialization cleanup

Have json and xml use common record cleanup code.
Do a somewhat better job of parsing extensions from content-types.
Use a real XML serializer.

Change-Id: I10e14dffd1da590b4fd180b4d33ab5de862e2b55
Fake http_connect in test_replicator test

- mock http_connect in replicator.test_delete_partition test to not
  connect directly on 127.0.0.1 (which is not always avail on non
  linuxies).
- Fixes bug 1203907

Change-Id: I2622223c9fe5a3db2a113b6cd8d028a5db0915a7
give value [] if disallowed_metadata_keys is None

The default value of DiskFile.disallowed_metadata_keys is None. And it
will be iter in following codes even if it didn't get a new value. So
it is necessary to give Diskfile.disallowed_metadata_keys an empty list
in __init__ if the default value None is used.

fixes bug #1206740

Change-Id: I8454eba47b2c691166924356ab33b0235a800951
Make pending_timeout an argument of __init__

Just like stale_reads_ok, this was already an argument, end even
used by the replicator that way. We only make it used exclusively
this way, so that we can document it for LFS.

Change-Id: Ib722093a476ec75d87917b37b40b77dcf2627330
Just a tiny doc fix for a Sphinx warning

Change-Id: Iede31212065eafb94fd29a63103e1e73e2de770d
Merge "give value [] if disallowed_metadata_keys is None"
Merge "Fake http_connect in test_replicator test"
Merge "some container serialization cleanup"
Merge "Remove duplicated code in direct_client."
Merge "Make pending_timeout an argument of __init__"
Correct misspell in comments

In file: test/functional/tests.py

Change-Id: I4440123b95e38b40a7a0a5f1f031941f42c1085e
Merge "Correct misspell in comments"
Add swift-basicauth and better-staticweb to associated projects.

As announced here:
http://openstack.markmail.org/thread/jjjbdpurhb5jwaxe

Change-Id: I683c463745b34c003ecb79ba8261b94b9dc166b6
Fix sphinx error in swift.common.utils

- Error was swift/common/utils.py:docstring of
  swift.common.utils.parse_content_type:7: ERROR: Unexpected
  indentation.
- Closes-Bug: #1208396

Change-Id: Ia0c095d1b0b202e99991aabdf96e12b52c922c5c
Clarify staticweb configuration with keystone.

Since staticweb works with anonymous requests by default, explictly
mention delay_auth_decision for the authtoken middleware in
/etc/swift/proxy-server.conf.

Change-Id: I4879884b22224843cf9d4a50ba3359fac36957dc
Allow dispersion tools to use keystone server with insecure certificate

The swift-dispersion-populate and swift-dispersion-report tools now
accept a --insecure option.

Also, dispersion.conf now has a keystone_api_insecure option.

Default is obviously to use the secure path.

DocImpact

Change-Id: I4000352e547d9ce5b08ade54e0c886281caff891
Merge "Fix sphinx error in swift.common.utils"
Merge "Allow dispersion tools to use keystone server with insecure certificate"
Ensure http_connect is mocked out in tests

Otherwise this test will try to connect to several addresses that aren't
mapped. On Linux the entier 127.0.0.* block is mapped to localhost, so this
often isn't noticed, but on OS X only 127.0.0.1 is mapped by default.

Change-Id: I44034d5006ff25e052afdb6599ab5838e4c5ae5b