def create_client(self, service_type=None): """Return Mistral client.""" from mistralclient.api import client kc = self.keystone() client = client.client( mistral_url=self._get_endpoint(service_type), service_type=self.choose_service_type(service_type), auth_token=kc.auth_token) return client
def create_client(self, service_type=None): """Return Mistral client.""" from mistralclient.api import client kc = self.keystone() mistral_url = kc.service_catalog.url_for( service_type=self.choose_service_type(service_type), endpoint_type=self.credential.endpoint_type, region_name=self.credential.region_name) client = client.client( mistral_url=mistral_url, service_type=self.choose_service_type(service_type), auth_token=kc.auth_token) return client