From e11e67ed80a1339378fd2d94a2ea7d8e99c397dd Mon Sep 17 00:00:00 2001 From: zhengya Date: Thu, 16 Jan 2025 14:27:57 +0800 Subject: [PATCH] fix: agent group config command output is inaccurate --- cli/ctl/agent_group_config.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cli/ctl/agent_group_config.go b/cli/ctl/agent_group_config.go index c1c922f764e..983627cb9be 100644 --- a/cli/ctl/agent_group_config.go +++ b/cli/ctl/agent_group_config.go @@ -50,7 +50,7 @@ func RegisterAgentGroupConfigCommand() *cobra.Command { create := &cobra.Command{ Use: "create -f ", Short: "create config", - Example: "deepflow-ctl agent-group-config create -f deepflow-config.yaml", + Example: "deepflow-ctl agent-group-config create g-xxxxxx -f deepflow-config.yaml", Run: func(cmd *cobra.Command, args []string) { createAgentGroupConfig(cmd, args, createFilename) }, @@ -62,7 +62,7 @@ func RegisterAgentGroupConfigCommand() *cobra.Command { update := &cobra.Command{ Use: "update -f ", Short: "update agent-group config", - Example: "deepflow-ctl agent-group-config update -f deepflow-config.yaml", + Example: "deepflow-ctl agent-group-config update g-xxxxxx -f deepflow-config.yaml", Run: func(cmd *cobra.Command, args []string) { updateAgentGroupConfig(cmd, args, updateFilename) }, @@ -188,6 +188,9 @@ func listAgentGroupConfig(cmd *cobra.Command, args []string, output string) { for i := range response.Get("DATA").MustArray() { agentGroupLcuuid := response.Get("DATA").GetIndex(i).Get("AGENT_GROUP_LCUUID") if info, ok := vtapLcuuidToInfo[agentGroupLcuuid.MustString()]; ok { + if agentGroupShortUUID != "" && agentGroupShortUUID != info.shortUUID { + continue + } tableItems = append(tableItems, []string{ info.name, info.shortUUID,