Don't print user_data for 'nova show'

User data is a blob of data that the user can specify when they launch
an instance. It's generally binary data, which means it's not something
we should show by default on the CLI. Stop doing that.

Change-Id: If8f6cc040d0077a7902a5fd425e67d74d7925a46
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Closes-Bug: #1669140
This commit is contained in:
Stephen Finucane 2020-02-20 11:01:40 +00:00
parent b9a7e03074
commit 03dca4bc82
3 changed files with 7 additions and 2 deletions

View File

@ -32,8 +32,7 @@ class TestExtAttrNovaClientV23(test_extended_attributes.TestExtAttrNovaClient):
'OS-EXT-SRV-ATTR:ramdisk_id',
'OS-EXT-SRV-ATTR:kernel_id',
'OS-EXT-SRV-ATTR:hostname',
'OS-EXT-SRV-ATTR:root_device_name',
'OS-EXT-SRV-ATTR:user_data']:
'OS-EXT-SRV-ATTR:root_device_name']:
self._get_value_from_the_table(table, attr)
# Check that attribute given below also exists in 'nova show' table
# as a key (first column) of table dict

View File

@ -2502,6 +2502,7 @@ def _print_server(cs, args, server=None, wrap=0):
info.pop('links', None)
info.pop('addresses', None)
info.pop('OS-EXT-SRV-ATTR:user_data', None)
utils.print_dict(info, wrap=wrap)

View File

@ -0,0 +1,5 @@
---
issues:
- |
The ``nova show`` command will no longer output the ``user_data`` column.
This is traditionally binary data of limited value from a CLI perspective.