From 1f2b39bc8fa7b7b6f240a0a85580f66b34a99c92 Mon Sep 17 00:00:00 2001 From: tsivakum Date: Mon, 25 Sep 2023 16:11:56 +0100 Subject: [PATCH] fix duplicate machine pool information printed for the same cluster --- cmd/ocm/list/machinepool/cmd.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/cmd/ocm/list/machinepool/cmd.go b/cmd/ocm/list/machinepool/cmd.go index 9d85c534..760f14c7 100644 --- a/cmd/ocm/list/machinepool/cmd.go +++ b/cmd/ocm/list/machinepool/cmd.go @@ -99,15 +99,7 @@ func run(cmd *cobra.Command, argv []string) error { writer := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0) fmt.Fprintf(writer, "ID\tAUTOSCALING\tREPLICAS\tINSTANCE TYPE\tLABELS\t\tTAINTS\t\tAVAILABILITY ZONES\n") - fmt.Fprintf(writer, "%s\t%s\t%s\t%s\t%s\t\t%s\t\t%s\n", - "default", - printAutoscaling(cluster.Nodes().AutoscaleCompute()), - printReplicas(cluster.Nodes().AutoscaleCompute(), cluster.Nodes().Compute()), - cluster.Nodes().ComputeMachineType().ID(), - printLabels(cluster.Nodes().ComputeLabels()), - "", - printAZ(cluster.Nodes().AvailabilityZones()), - ) + for _, machinePool := range machinePools { fmt.Fprintf(writer, "%s\t%s\t%s\t%s\t%s\t\t%s\t\t%s\n", machinePool.ID(),