def auth_session(self): if not self.__auth_session: log.debug( "Creating auth session with args {}", {k: v for k, v in self.__auth.items() if k != 'password'}) plugin = Password(**self.__auth) self.__auth_session = Session(auth=plugin, timeout=self.request_timeout) return self.__auth_session
def init_by_creds(cls, tenant_id, os_username, os_password, auth_url) -> 'OpenstackClientBase': plugin = Password(auth_url=auth_url, username=os_username, password=os_password, tenant_id=tenant_id) return cls.init_by_plugin(plugin)