summaryrefslogtreecommitdiff
path: root/openstackclient/api
diff options
context:
space:
mode:
authormelanie witt <melwittt@gmail.com>2019-06-28 18:17:10 +0000
committermelanie witt <melwittt@gmail.com>2019-06-28 22:06:39 +0000
commitbfc34e11b3437506508b3e120accc0e212268ac6 (patch)
treef7766cdb1b7fc58831851379c243379a0d340dec /openstackclient/api
parenteada2db332caa3dc042650437a1536e589505c2b (diff)
downloadpython-openstackclient-bfc34e11b3437506508b3e120accc0e212268ac6.tar.gz
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
Diffstat (limited to 'openstackclient/api')
0 files changed, 0 insertions, 0 deletions