From 9e97bfbd77d031dc1537323ae34fdfd020e25566 Mon Sep 17 00:00:00 2001 From: Artem Osadchyi Date: Mon, 21 Sep 2015 14:02:28 +0300 Subject: [PATCH] Fix missed service message in MapR plugin Now, in the case of presence of required service with wrong version, dependency version is added to the message. Change-Id: Id77c4da715de4d0090228ad62ca1dfde7f7d45fa Closes-Bug: #1497956 --- sahara/plugins/mapr/util/validation_utils.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sahara/plugins/mapr/util/validation_utils.py b/sahara/plugins/mapr/util/validation_utils.py index e6b88b46..f11ba65d 100644 --- a/sahara/plugins/mapr/util/validation_utils.py +++ b/sahara/plugins/mapr/util/validation_utils.py @@ -164,11 +164,15 @@ def on_same_node(component, dependency): return ft.partial(validate, component=component, dependency=dependency) -def depends_on(service, required_by=None): +def depends_on(service, required_by): def validate(cluster_context, service, required_by): if not cluster_context.is_present(service): + service_name = service.ui_name + if service.version: + service_name += " %s" % service.version + raise e.RequiredServiceMissingException( - service.ui_name, required_by.ui_name) + service_name, required_by.ui_name) return ft.partial(validate, service=service, required_by=required_by)