Image client v1 and v2 try to auth in __init__
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| tempest |
Fix Released
|
Low
|
Matthew Treinish | ||
Bug Description
The image clients try to auth against the identity service at __init__ time.
This is inconsistent with what all other clients do.
Even if not running glance tests, even if glance is set to false in the service_available config group, the glance client will try to authenticate.
def __init__(self, config, username, password, auth_url, tenant_name=None):
self.http = self._get_http()
This can be solved for instance by definiting get_http and calling that in place of self.http, or by using __getattr__ to handle the case of self.http not being defined yet.
e.g.
def get_http(self):
return self.http if self.http is not None else self._get_http()
or
def __getattr__(self, name):
if name == 'http':
return self.http
else:
raise AttributeError(
| Changed in tempest: | |
| importance: | Undecided → Low |
| milestone: | none → havana-rc |
| status: | New → Triaged |
Still valid.