From f27f5dde738cdfc90f0becda12dd308ff2ee4894 Mon Sep 17 00:00:00 2001 From: Lingxian Kong Date: Wed, 14 Oct 2015 10:45:42 +0800 Subject: [PATCH] Adding "Services" section into API v2 specification Change-Id: I9da81482d862930467a922f6385a95ae4c17d7fb Closes-Bug: #1505623 --- doc/source/developer/webapi/v2.rst | 17 +++++++++++++++++ mistral/api/controllers/v2/service.py | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/doc/source/developer/webapi/v2.rst b/doc/source/developer/webapi/v2.rst index adeb2d93..b65a0ef0 100644 --- a/doc/source/developer/webapi/v2.rst +++ b/doc/source/developer/webapi/v2.rst @@ -156,3 +156,20 @@ Note: using CLI, Environment can be created via JSON or YAML file. .. rest-controller:: mistral.api.controllers.v2.environment:EnvironmentController :webprefix: /v2/environments + + +Services +-------- + +Through service management API, system administrator or operator can retrieve Mistral services information of the system, including service group and service identifier. The internal implementation of this feature make use of tooz library, which needs coordinator backend(the most commonly used at present is Zookeeper) installed, please refer to tooz official documentation for more detailed instruction. + +There are three service groups according to Mistral architecture currently, namely api_group, engine_group and executor_group. The service identifier contains name of the host the service is running on and the process identifier of the service on that host. + +.. autotype:: mistral.api.controllers.v2.service.Service + :members: + +.. autotype:: mistral.api.controllers.v2.service.Services + :members: + +.. rest-controller:: mistral.api.controllers.v2.service:ServicesController + :webprefix: /v2/services diff --git a/mistral/api/controllers/v2/service.py b/mistral/api/controllers/v2/service.py index 872603d6..07a98133 100644 --- a/mistral/api/controllers/v2/service.py +++ b/mistral/api/controllers/v2/service.py @@ -39,7 +39,7 @@ class Service(resource.Resource): @classmethod def sample(cls): - return cls(name='executor_host', type='executor_group') + return cls(name='host1_1234', type='executor_group') class Services(resource.Resource):