From 90eb0ca4bb2570ec3812cbf15f5c9dc4f1b784a8 Mon Sep 17 00:00:00 2001 From: "Dr. Jens Harbott" Date: Thu, 16 Dec 2021 16:38:41 +0100 Subject: Hide location columns for network objects Network objects returned from the SDK include a location column which has a reference to the cloud to which the object belongs. We don't want to include them in CLI output where they are useless. The solution implemented in [0] was dropped as a sideeffect in [1]. [0] https://review.opendev.org/c/openstack/python-openstackclient/+/679445 [1] https://review.opendev.org/c/openstack/python-openstackclient/+/815032 Signed-off-by: Dr. Jens Harbott Change-Id: I9a408d9721c9c57d752afaab520cd6ee379a5184 --- openstackclient/network/v2/security_group.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'openstackclient/network/v2/security_group.py') diff --git a/openstackclient/network/v2/security_group.py b/openstackclient/network/v2/security_group.py index 37d2dc5b..df627088 100644 --- a/openstackclient/network/v2/security_group.py +++ b/openstackclient/network/v2/security_group.py @@ -89,7 +89,12 @@ def _get_columns(item): 'security_group_rules': 'rules', 'tenant_id': 'project_id', } - return utils.get_osc_show_columns_for_sdk_resource(item, column_map) + hidden_columns = ['location'] + return utils.get_osc_show_columns_for_sdk_resource( + item, + column_map, + hidden_columns + ) # TODO(abhiraut): Use the SDK resource mapped attribute names once the -- cgit v1.2.1