gnubila-france/pyrax-identity-hubic — pull request #1 by adrien-delhorme (2014-11-04 20:25:11+00:00)
Title: Set tenant_id to avoid HTTP 509 error

Hi,

I noticed that `set_credentials` method do not set `self.tenant_id`. That is a problem because `pyrax` will try to authenticate for each request:

pyrax/client.py in _api_request at line 207:

if not all((self.management_url, id_svc.token, id_svc.tenant_id)):
id_svc.authenticate()

Too many requests in a short amount of time causes Hubic to throw an HTTP 509 error code.

I am not familiar with `tenant_id` concept, so I don't know if it is a good choice to copy `client_id` in `tenant_id`, but it works well.