From a690b16b5d88642aec800b8437fff32f132b72af Mon Sep 17 00:00:00 2001 From: Ricardo Dias Date: Mon, 10 Dec 2018 12:23:18 +0000 Subject: [PATCH] mgr/orchestrator: added useful attributes to ServiceDescription Signed-off-by: Ricardo Dias --- src/pybind/mgr/orchestrator.py | 11 +++++++++++ src/pybind/mgr/orchestrator_cli/module.py | 6 ++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/pybind/mgr/orchestrator.py b/src/pybind/mgr/orchestrator.py index 4a0190fad7d..b71002f5a54 100644 --- a/src/pybind/mgr/orchestrator.py +++ b/src/pybind/mgr/orchestrator.py @@ -333,6 +333,17 @@ class ServiceDescription(object): # The type of service (osd, mon, mgr, etc.) self.service_type = None + # Service version that was deployed + self.version = None + + # Location of the service configuration when stored in rados + # object. Format: "rados:///[]" + self.rados_config_location = None + + # If the service exposes REST-like API, this attribute should hold + # the URL. + self.service_url = None + class DriveGroupSpec(object): """ diff --git a/src/pybind/mgr/orchestrator_cli/module.py b/src/pybind/mgr/orchestrator_cli/module.py index 756f9326366..4e8d4b26859 100644 --- a/src/pybind/mgr/orchestrator_cli/module.py +++ b/src/pybind/mgr/orchestrator_cli/module.py @@ -171,11 +171,13 @@ class OrchestratorCli(MgrModule): services.sort(key = lambda s: (s.service_type, s.nodename, s.daemon_name)) lines = [] for s in services: - lines.append("{0}.{1} {2} {3}".format( + lines.append("{0}.{1} {2} {3} {4} {5}".format( s.service_type, s.daemon_name, s.nodename, - s.container_id)) + s.container_id, + s.version, + s.config_location)) return HandleCommandResult(odata="\n".join(lines)) -- 2.39.5