From b05903568c5202637309998af4da26e2e7f675dd Mon Sep 17 00:00:00 2001 From: Nikita Konovalov Date: Thu, 12 Mar 2015 16:31:45 +0300 Subject: [PATCH] Node Groups now have id field The id of a Node Group in a cluster is required when you try to get the Node Group name by id. Change-Id: I405c402550264c30285e4e4635188ededcda3ed4 --- sahara/conductor/resource.py | 2 +- sahara/tests/unit/conductor/test_resource.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sahara/conductor/resource.py b/sahara/conductor/resource.py index 644cae43..152ad6ae 100644 --- a/sahara/conductor/resource.py +++ b/sahara/conductor/resource.py @@ -194,7 +194,7 @@ class NodeGroupResource(Resource, objects.NodeGroup): 'node_group_template': (NodeGroupTemplateResource, None) } - _filter_fields = ['id', 'tenant_id', 'cluster_id', 'cluster_template_id', + _filter_fields = ['tenant_id', 'cluster_id', 'cluster_template_id', 'image_username', 'open_ports'] diff --git a/sahara/tests/unit/conductor/test_resource.py b/sahara/tests/unit/conductor/test_resource.py index 0d3b694e..9ed8c5c6 100644 --- a/sahara/tests/unit/conductor/test_resource.py +++ b/sahara/tests/unit/conductor/test_resource.py @@ -42,8 +42,10 @@ SAMPLE_CLUSTER_DICT = { 'node_groups': [ { 'name': 'master', + 'id': 'some_id' }, { + 'id': 'some_id', 'name': 'worker', 'node_processes': ['tasktracker', 'datanode'], 'node_configs': {},