summaryrefslogtreecommitdiff
path: root/novaclient
diff options
context:
space:
mode:
authorStephen Finucane <sfinucan@redhat.com>2020-02-20 11:01:40 +0000
committerStephen Finucane <sfinucan@redhat.com>2020-02-26 13:48:11 +0000
commit03dca4bc823c82054869dfaf6925d5e1e068ac51 (patch)
treef6350d6724373ce35715a866f6c4cf24558820c0 /novaclient
parentb9a7e03074cbaacc3f270b2b8228a5b85350a2de (diff)
downloadpython-novaclient-03dca4bc823c82054869dfaf6925d5e1e068ac51.tar.gz
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
Diffstat (limited to 'novaclient')
-rw-r--r--novaclient/tests/functional/v2/test_extended_attributes.py3
-rw-r--r--novaclient/v2/shell.py1
2 files changed, 2 insertions, 2 deletions
diff --git a/novaclient/tests/functional/v2/test_extended_attributes.py b/novaclient/tests/functional/v2/test_extended_attributes.py
index b585a34b..bf06875c 100644
--- a/novaclient/tests/functional/v2/test_extended_attributes.py
+++ b/novaclient/tests/functional/v2/test_extended_attributes.py
@@ -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
diff --git a/novaclient/v2/shell.py b/novaclient/v2/shell.py
index 773e6ce0..e86add10 100644
--- a/novaclient/v2/shell.py
+++ b/novaclient/v2/shell.py
@@ -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)