Add service supervisor

This patch set adds supervisor mechanism for Watcher services
to get ability to track states.

Partially-Implements: blueprint watcher-service-list
Change-Id: Iab1cefb971c79ed27b22b6a5d1bed8698e35f9a4
This commit is contained in:
Alexander Chadin
2016-09-16 18:36:49 +03:00
parent 6cf796ca87
commit e7a1e148ca
30 changed files with 1714 additions and 77 deletions

View File

@@ -279,3 +279,24 @@ class InfraOptimClientJSON(base.BaseInfraOptimClient):
:return: Serialized strategy as a dictionary
"""
return self._show_request('/strategies', strategy)
# ### SERVICES ### #
@base.handle_errors
def list_services(self, **kwargs):
"""List all existing services"""
return self._list_request('/services', **kwargs)
@base.handle_errors
def list_services_detail(self, **kwargs):
"""Lists details of all existing services"""
return self._list_request('/services/detail', **kwargs)
@base.handle_errors
def show_service(self, service):
"""Gets a specific service
:param service: Name of the strategy
:return: Serialized strategy as a dictionary
"""
return self._show_request('/services', service)