Do not refresh data on filtering stuff by cluster
Listing nodes of node groups downloads all data from Nailgun so there is no need to refresh it during the following filtering by cluster id. Closes-bug: #1378963 Change-Id: Ib9f45225f6e3c91809ea0dbc47e79b3529b54d3b
This commit is contained in:
@@ -152,7 +152,5 @@ class NodeCollection(object):
|
||||
return cls(Node.get_all())
|
||||
|
||||
def filter_by_env_id(self, env_id):
|
||||
self.collection = filter(
|
||||
lambda node: node.env_id == env_id,
|
||||
self.collection
|
||||
)
|
||||
predicate = lambda node: node.data['cluster'] == env_id
|
||||
self.collection = filter(predicate, self.collection)
|
||||
|
||||
@@ -81,7 +81,5 @@ class NodeGroupCollection(object):
|
||||
return cls(NodeGroup.get_all())
|
||||
|
||||
def filter_by_env_id(self, env_id):
|
||||
self.collection = filter(
|
||||
lambda group: group.env_id == env_id,
|
||||
self.collection
|
||||
)
|
||||
predicate = lambda group: group.data['cluster'] == env_id
|
||||
self.collection = filter(predicate, self.collection)
|
||||
|
||||
Reference in New Issue
Block a user