From 1b48f5b56a6703a64e3c40c84fba5248db0b9c52 Mon Sep 17 00:00:00 2001 From: Andrew Lazarev Date: Fri, 14 Feb 2014 13:16:58 -0800 Subject: [PATCH] Made processes names case sensitive Current approach "store name in any case, but search in lowercase" was done to work with HDP uppercase processes. Since process manipulation logic was moved to plugins, replaced approach to case sensitive use. Closes-Bug: #1282806 Change-Id: I4a8d65b750135a8521f26c6e6c2d9311f3281b14 --- sahara/plugins/general/utils.py | 2 +- sahara/plugins/hdp/ambariplugin.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sahara/plugins/general/utils.py b/sahara/plugins/general/utils.py index 61cdb9890c..ab002f993e 100644 --- a/sahara/plugins/general/utils.py +++ b/sahara/plugins/general/utils.py @@ -22,7 +22,7 @@ from sahara.plugins.general import exceptions as ex def get_node_groups(cluster, node_process=None): return [ng for ng in cluster.node_groups if (node_process is None or - node_process in [n.lower() for n in ng.node_processes])] + node_process in ng.node_processes)] def get_instances_count(cluster, node_process=None): diff --git a/sahara/plugins/hdp/ambariplugin.py b/sahara/plugins/hdp/ambariplugin.py index 0ef93fc3d2..9bc1dcbe63 100644 --- a/sahara/plugins/hdp/ambariplugin.py +++ b/sahara/plugins/hdp/ambariplugin.py @@ -140,10 +140,10 @@ class AmbariPlugin(p.ProvisioningPluginBase): "cluster_configs": cluster_configs}) def get_oozie_server(self, cluster): - return u.get_instance(cluster, "oozie_server") + return u.get_instance(cluster, "OOZIE_SERVER") def validate_edp(self, cluster): - oo_count = u.get_instances_count(cluster, 'oozie_server') + oo_count = u.get_instances_count(cluster, 'OOZIE_SERVER') if oo_count != 1: raise ex.InvalidComponentCountException('oozie', '1', oo_count)