provider.py 文件源码

python
阅读 35 收藏 0 点赞 0 评论 0

项目:cloudbridge 作者: ms-azure-cloudbroker 项目源码 文件源码
def _connect_keystone(self):
        """Get an OpenStack Keystone (identity) client object."""
        if self._keystone_version == 3:
            return keystone_client.Client(session=self._keystone_session,
                                          auth_url=self.auth_url)
        else:
            # Wow, the internal keystoneV2 implementation is terribly buggy. It
            # needs both a separate Session object and the username, password
            # again for things to work correctly. Plus, a manual call to
            # authenticate() is also required if the service catalog needs
            # to be queried.
            keystone = keystone_client.Client(
                session=self._keystone_session,
                auth_url=self.auth_url,
                username=self.username,
                password=self.password,
                project_name=self.project_name,
                region_name=self.region_name)
            keystone.authenticate()
            return keystone
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号