keystoneauth/keystoneauth1
briancurtin bbd85fded7 Provide a RFC 7231 compliant user agent string
The current default of "keystoneauth1" doesn't convey enough
information, and additionally when the user of a Session supplies their
own user agent, it stomps on any notion of keystoneauth1 being there.

Per RFC 7231 Section 5.5.3
(https://tools.ietf.org/html/rfc7231#section-5.5.3), user agents should
basically be a space-delimited list of product/version pairs in
decreasing order of importance. This change makes the default user agent
something like the following:

keystoneauth1/2.1.1 python-requests/2.8.1 CPython/3.4.1+

Due to the decreasing order of importance, when a user creates a Session
with something like Session(user_agent="my-product/1.0"),
'my-product/1.0' is then prepended to the above list. The only time this
is not the case is if a user agent is provided directly to
Session.request. In that case, the User-Agent header is set to whatever
the provided argument is, verbatim.

This was a change we had originally made to the Transport class in
python-openstacksdk (I80ca26fff3f2522b8232472676396abb86166f91), but
upon moving to keystoneauth instead of our own implementation, it was
noticed that we lost this, and keystoneauth is a better place for this
than for us to re-implement it inside of python-openstacksdk.

Change-Id: I46f336f25fac5b524547bb13e4f5438ebf1d4320
2015-12-15 16:45:17 -06:00
..
access Merge "Address hacking check H405" 2015-11-19 07:21:38 +00:00
exceptions Address hacking check H405 2015-11-18 21:18:37 -08:00
extras Migrate kerberos plugin 2015-11-10 10:05:57 -06:00
fixture Add BetaMax Fixture 2015-12-06 17:57:06 -05:00
hacking Move to the keystoneauth1 namespace 2015-06-25 16:48:54 -07:00
identity Cleanups to K2K plugin 2015-12-07 15:29:05 +11:00
loading Add oslo.config compatibility attributes 2015-12-05 12:00:49 -05:00
tests Provide a RFC 7231 compliant user agent string 2015-12-15 16:45:17 -06:00
__init__.py Provide a RFC 7231 compliant user agent string 2015-12-15 16:45:17 -06:00
_utils.py Keep a consistent logger name for keystoneauth 2015-08-24 18:16:33 -07:00
adapter.py Default for service service type should be empty 2015-12-03 08:27:02 -08:00
discover.py Merge "Address hacking check H405" 2015-11-19 07:21:38 +00:00
plugin.py Allow saving and caching the plugin auth state 2015-11-16 16:10:33 +11:00
session.py Provide a RFC 7231 compliant user agent string 2015-12-15 16:45:17 -06:00
token_endpoint.py Split plugin loading 2015-08-06 10:07:51 +10:00