Both v1 and v2 of the glance client return python generators in some
cases (rather than fully fleshed out lists) which thwarts our retry
mechanism. Convert generator results to a list, so that any potential
exceptions get raised earlier rather than later, allowing for retries.
Conflicts:
/nova/tests/unit/image/test_glance.py
Conflict notes: I couldn't add the following assert from master because
client.api_servers didn't exist then. It was added in commit
590b2c30073843f736680cdea4d6a6f8c673d725. Instead, I added one that
follows the pattern at that time.
Reviewed: https:/ /review. openstack. org/295324 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=cab3d64cd92 b0f2b2165e68ef3 70518a463b7a80
Committed: https:/
Submitter: Jenkins
Branch: stable/liberty
commit cab3d64cd92b0f2 b2165e68ef37051 8a463b7a80
Author: Diana Clarke <email address hidden>
Date: Tue Mar 15 16:17:28 2016 -0400
Fix retry mechanism for generator results
Both v1 and v2 of the glance client return python generators in some
cases (rather than fully fleshed out lists) which thwarts our retry
mechanism. Convert generator results to a list, so that any potential
exceptions get raised earlier rather than later, allowing for retries.
Conflicts:
Conflict notes: I couldn't add the following assert from master because api_servers didn't exist then. It was added in commit 843f736680cdea4 d6a6f8c673d725. Instead, I added one that
client.
590b2c30073
follows the pattern at that time.
self. assertEqual( str(client. api_server) , "https:/ /host2: 9293")
Change-Id: Ibc84f1596d4eaa bdef0a48f6cf4da 2d1323843a8 d9f97c982fdbbcc dc6fb8b9c9)
Closes-Bug: #1557584
(cherry picked from commit ae6d868e2f13f90