catch errors in wsgi.Middleware.

- Catch errors in wsgi.Middleware like done in wsgi.Applications.
- Add tests for test_middleware.
- Fixes bug 1128379.

Change-Id: I2e95595c392631aebf2682d4506e4dde78cd6d69
Rework S3Token middleware tests.

- Split between good and bad tests.
- Add more tests to get to 100% coverage.

Change-Id: Iffd00c2b557e54b122f29f8b0ec7f7ab7a92d16e
Remove TODO that didn't land in grizzly

This was intended to be removed during grizzly by utilizing centralized
policy storage on /v3/policies -- but such a feature hasn't been
implemented yet beyond the API.

Change-Id: Ie696bc671fc1d6fd05cc1dda376d2be945097845
residual grants after delete action (bug1125637)

remove all applicable grants when role is deleted
(sql/kvs solution only)

Fixes: bug #1125637
Change-Id: I3a958c6d56739e37a95f6c713fab154827e9ceca
Remove un-needed LimitingReader read() function.

We only need one read function here.

Change-Id: I86533399d33fd5784b8b942acf37ea5c42363236
quiet route logging on skipped tests

Change-Id: I0ab9886d9b546a787230300d3dd2f4715241e483
Revise docs to use keystoneclient.middleware.auth_token

Change-Id: Ic6caf991cb3eda359658ea679b0fd2f75180c2a9
Fixes bug 1151747: broken XML translation for resource collections

Special-case "links" when converting a collection from JSON to XML and
vice versa.

Change-Id: I7ab1f50c1da3ec389930c1bf45d498551c4cf954
xml_body returns backtrace on XMLSyntaxError

Protected against XMLSyntaxError that can occur in from_xml.  Return
a validation error (400) instead of an internal server error (500).

Change-Id: Ic5160f4f6c810e96b74dbf9563547ac739a54c5e
Fixes: bug #1101043
Merge "quiet route logging on skipped tests"
Merge "Remove TODO that didn't land in grizzly"
Remove duplicate password/token opts.

Consolidate the 'auth' method option registration
in config.py.

This makes it so we don't have to catch Exceptions when the
default 'auth' options are registered twice and avoids some
log WARNING messages as well.

Fixes LP Bug #1154406.

Change-Id: I301328ec3ec4823dd7fbec1e639e2841516352e5
No parent exception to wrap

Change-Id: I60b3555e032a126554a57bf5ef7a2e636cf9f5db
Merge "Remove duplicate password/token opts."
Merge "Fixes bug 1151747: broken XML translation for resource collections"
Merge "xml_body returns backtrace on XMLSyntaxError"
extracting user and trust ids into normalized fields

These fields are used for queries, and may need to be indexed
Also moves the delete token for... functions into the base class
for controllers.

Removed the token API revoke token call as that needed access to other
APIs.  Logic was moved into the controller.

Bug 1152801

Change-Id: I59c360fe5aef905dfa30cb55ee54ff1fbe64dc58
Discard null endpoints (bug 1152632)

If a v2 client passed {..., "adminurl": null, ...} in a endpoint-create
request, then the null value was being persisted on an endpoint with a
different interface value (i.e. a publicly facing endpoint would have an
"adminurl": null value inexplicably attached to it.)

This change simply pops null urls from the endpoint and discards them.

Change-Id: Idd0964b6ec34fbc8b979253d32f655ea9797f259
Merge "Discard null endpoints (bug 1152632)"
Fix XML handling of member links (bug 1156594)

This is a was revealed as a blocker for the default_project_id scoping
tests.

Also improves test coverage of XML de/serialization invertibility. The
tests were previously sensitive to things like attribute ordering which
are not relevant to test results. The fix is to compare canonically
serialized XML instead of whatever lxml spews out.

Change-Id: I003583038421d35aadbc781144d4cafb09392db5