python-openstackclient/openstackclient/tests
melanie witt bfc34e11b3 Fix BFV server list handling with --name-lookup-one-by-one
When the --name-lookup-one-by-one option passed to the 'server list'
command, the image and flavor names will be looked up for each
server being listed instead of fetching all image/flavor names.

The current code assumes all servers have an image attribute, but
servers booted from volumes have no image, so the following error is
raised when listing BFV servers with --name-lookup-one-by-one:

  AttributeError: ('unicode'|'str') object has no attribute 'get'

The error occurs when the code attempts server.image.get('id').

This fixes the --name-lookup-one-by-one code not to assume an image
for a server. The unit tests for 'server list' have also been
robustified to feature one BFV server to enhance our test coverage.

Story: #2006063
Task: #34777

Change-Id: I312c971346c7ded93f6fcaa515098554b8580295
2019-06-28 22:06:39 +00:00
..
functional Merge "Use cliff formattable columns in image commands" 2019-06-23 04:30:51 +00:00
unit Fix BFV server list handling with --name-lookup-one-by-one 2019-06-28 22:06:39 +00:00
__init__.py Remove copyright from empty files 2014-01-20 17:28:13 +04:00