F5Networks / f5-common-python

Python SDK for configuration and monitoring of F5® BIG-IP® devices via the iControl® REST API.
https://f5-sdk.readthedocs.org
Apache License 2.0
262 stars 134 forks source link

Populate HTTP User Agent String when communicating with BIG-IP #677

Open mattgreene opened 8 years ago

mattgreene commented 8 years ago

In order to facilitate measurement of who/what is managing BIG-IP, the f5-sdk must add an HTTP User Agent String when accessing the REST API. A new API must also be added to allow an SDK user (e.g. f5-openstack-agent) to overwrite the default f5-sdk user agent string.

caphrim007 commented 8 years ago

I believe a portion of this feature will require changing the underlining https://github.com/F5Networks/f5-icontrol-rest-python code

swormke commented 7 years ago

@mattgreene @caphrim007 Here are my thoughts on this.

https://tools.ietf.org/html/rfc7231#section-5.5.3 https://en.wikipedia.org/wiki/User_agent

  1. We should make a change in the https://github.com/F5Networks/f5-icontrol-rest-python code that allows the setting of the user agent
  2. The SDK should append its user agent info to a string that identifies itself as the f5-sdk, for example f5-sdk/1.1.4 (python2.7 platform info)
  3. The SDK should allow its users to add to their own user agent string. For example the openstack agent may append f5-openstack-agent/9.0.1 (Neutron v9.0.1 Mitaka)

So in the end the user agent header would look something like this:

User-Agent: python-requests/2.9.1 f5-sdk/1.4.1 (python2.7 Ubuntu14) f5-openstack-agent/9.0.1 (Neutron v9.0.1 Mitaka)

chen23 commented 7 years ago

Having an option to update the virtual server description as well would make it crystal clear in iHealth that the resource was built by LBaaS. By default I don't think that the User-Agent is captured in the log on BIG-IP.

wojtek0806 commented 6 years ago

@caphrim007 I believe we addressed this no ?