From 2e48066e0b56add97bafb3cd1abc2a38cdaaf303 Mon Sep 17 00:00:00 2001 From: Predrag Janosevic Date: Wed, 19 Jun 2024 15:17:43 +0000 Subject: [PATCH] Fix instance/ipool key naming in json output (#612) Renames keys that did not match actual data: - `template_id` -> `template`; - `zoneid` -> `zone`. These were present in both `c instance show` and `c instance-pool show` commands. --- CHANGELOG.md | 1 + cmd/instance_pool_show.go | 4 ++-- cmd/instance_show.go | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad4a0ff1..0d6aad51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ ### Bug Fixes - dbaas opensearch: remove top-level max-index-count flag #611 +- Fix instance/ipool key naming in json output #612 ## 1.78.2 diff --git a/cmd/instance_pool_show.go b/cmd/instance_pool_show.go index cdf4f2e5..66a6cc66 100644 --- a/cmd/instance_pool_show.go +++ b/cmd/instance_pool_show.go @@ -21,8 +21,8 @@ type instancePoolShowOutput struct { Name string `json:"name"` Description string `json:"description"` InstanceType string `json:"instance_type"` - Template string `json:"template_id"` - Zone string `json:"zoneid"` + Template string `json:"template"` + Zone string `json:"zone"` AntiAffinityGroups []string `json:"anti_affinity_groups" outputLabel:"Anti-Affinity Groups"` SecurityGroups []string `json:"security_groups"` PrivateNetworks []string `json:"private_networks"` diff --git a/cmd/instance_show.go b/cmd/instance_show.go index bde35c3b..cadcc3eb 100644 --- a/cmd/instance_show.go +++ b/cmd/instance_show.go @@ -21,8 +21,8 @@ type instanceShowOutput struct { Name string `json:"name"` CreationDate string `json:"creation_date"` InstanceType string `json:"instance_type"` - Template string `json:"template_id"` - Zone string `json:"zoneid"` + Template string `json:"template"` + Zone string `json:"zone"` AntiAffinityGroups []string `json:"anti_affinity_groups" outputLabel:"Anti-Affinity Groups"` DeployTarget string `json:"deploy_target"` SecurityGroups []string `json:"security_groups"`