def client(mistral_url=None, username=None, api_key=None, project_name=None, auth_url=None, project_id=None, endpoint_type='publicURL', service_type='workflow', auth_token=None, user_id=None, cacert=None, insecure=False): if mistral_url and not isinstance(mistral_url, six.string_types): raise RuntimeError('Mistral url should be a string.') return client_v2.Client(mistral_url=mistral_url, username=username, api_key=api_key, project_name=project_name, auth_url=auth_url, project_id=project_id, endpoint_type=endpoint_type, service_type=service_type, auth_token=auth_token, user_id=user_id, cacert=cacert, insecure=insecure)
def client(mistral_url=None, username=None, api_key=None, project_name=None, auth_url=None, project_id=None, endpoint_type='publicURL', service_type='workflow', auth_token=None, user_id=None, cacert=None, insecure=False, profile=None, auth_type=auth_types.KEYSTONE, client_id=None, client_secret=None, target_username=None, target_api_key=None, target_project_name=None, target_auth_url=None, target_project_id=None, target_auth_token=None, target_user_id=None, target_cacert=None, target_insecure=False, **kwargs): if mistral_url and not isinstance(mistral_url, six.string_types): raise RuntimeError('Mistral url should be a string.') return client_v2.Client(mistral_url=mistral_url, username=username, api_key=api_key, project_name=project_name, auth_url=auth_url, project_id=project_id, endpoint_type=endpoint_type, service_type=service_type, auth_token=auth_token, user_id=user_id, cacert=cacert, insecure=insecure, profile=profile, auth_type=auth_type, client_id=client_id, client_secret=client_secret, target_username=target_username, target_api_key=target_api_key, target_project_name=target_project_name, target_auth_url=target_auth_url, target_project_id=target_project_id, target_auth_token=target_auth_token, target_user_id=target_user_id, target_cacert=target_cacert, target_insecure=target_insecure, **kwargs)
def __init__(self, name='', args=None): super(MistralDriver, self).__init__(name, args=args) datasource_driver.ExecutionDriver.__init__(self) session = ds_utils.get_keystone_session(args) self.mistral_client = mistral_client.Client(session=session) self.add_executable_client_methods(self.mistral_client, 'mistralclient.api.v2.') self.initialize_update_method() self._init_end_start_poll()
def setUp(self): super(BaseClientV2Test, self).setUp() self._client = client.Client(project_name="test", mistral_url="test") self.workbooks = self._client.workbooks self.executions = self._client.executions self.tasks = self._client.tasks self.workflows = self._client.workflows self.environments = self._client.environments self.action_executions = self._client.action_executions self.actions = self._client.actions self.services = self._client.services
def setUp(self): super(BaseClientV2Test, self).setUp() with mock.patch( 'mistralclient.auth.keystone.KeystoneAuthHandler.authenticate', return_value={'session': None}): self._client = client.Client(project_name="test", mistral_url=self.TEST_URL) self.workbooks = self._client.workbooks self.executions = self._client.executions self.tasks = self._client.tasks self.workflows = self._client.workflows self.environments = self._client.environments self.action_executions = self._client.action_executions self.actions = self._client.actions self.services = self._client.services self.members = self._client.members
def get_mistral_client(**kwargs): return mistralclient.Client()
def client(auth_type='keystone', **kwargs): return client_v2.Client(auth_type=auth_type, **kwargs)