mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
[skip ci]Implement get nodes by node type in getMetrics (#8892)
Signed-off-by: yanliang567 <yanliang.qiao@zilliz.com>
This commit is contained in:
parent
a356a7a9a9
commit
09eb1ca21b
@ -73,6 +73,11 @@ class MilvusSys:
|
||||
"""get all the nodes in Milvus deployment"""
|
||||
return json.loads(self.sys_info.response).get('nodes_info')
|
||||
|
||||
@property
|
||||
def get_nodes_by_type(self, node_type=None):
|
||||
return NotImplementedError
|
||||
target_nodes = []
|
||||
if node_type is not None:
|
||||
for node in self.nodes:
|
||||
if str(node_type).lower() == str(node.get('infos').get('type')).lower():
|
||||
target_nodes.append(node)
|
||||
return target_nodes
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user