Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Fixed.

The issue was my code. Taking out the 'keystone =', removing 'endpoint=', and pointing session to 'sess' cleared up the attribute problem. I also had to pass user_domain_name and project_domain_name into loader.load_from_options for auth.

Passing in the domain name will make the code even better.

Working code:

    226     def auth_glance(self):
    227         loader = loading.get_plugin_loader('password')
    228         auth = loader.load_from_options(
    229             auth_url=self.auth_url,
    230             username=self.username,
    231             password=self.password,
    232             project_name=self.tenant_name,
    233             user_domain_name='default',
    234             project_domain_name='default')
    235
...
    240         sess = session.Session(auth=auth)
...
    243         glance = Client('2', session=sess)
    244         return glance