Make test_volume_pools A/A compatible
VolumePoolsAdminV2TestsJSON is not compatible with Cinder deployed in
A/A mode. The problem is that tests assume that volume's host will be
present as one of the pools name. This is false assumption in A/A mode,
as in such case pools names are derived from cluster_name, not host.
Note that V2 API that is being tested here, doesn't have a notion of
cluster_name anywhere, because cluster_name was added in various places
in multiple V3 API's microversions. That means we cannot tweak the tests
to look for pools by cluster_name.
This commit addresses the issue by releasing the false assumption and
replacing it with an assert that vendor_name in at least one of the
pools details is equal to the one in volume configuration. This is being
checked only in case of calls with details, without them we're simply
checking if output contains 'name' key in the response.
Also a new test is added to make sure os-vol-host-attr:host attribute of
volume is still getting checked for correctness.
Closes-Bug: 1661234
Change-Id: I818f0cd436d93278552c7fe4f055ccd7b9111bc1
2 files changed