openstack-python-openstackc.../openstackclient/volume
Johannes Kulik 60a0e379a4 volume: Support same_host, different_host hint as list
When creating a volume, the scheduler hints can be supplied as strings.
The "same_host" and "different_host" hints can also be supplied as a
list if affinity/anti-affinity to multiple volumes is requested [0]

The previously-used `KeyValueAction` only supplies strings as values - the
last one if multiple --hint contain the same key. An alternative already
used in `CreateServer` would be `KeyValueAppendAction`, but only a subset of
the scheduler hints accept lists, so we cannot use that in general.

Therefore, we create `KeyValueHintAction`. It contains both a
`KeyValueAction` and a `KeyValueAppendAction` object and calls the
appropriate action based on the beginning of the given values as defined
in `APPEND_KEYS`.

[0] d96b705774/cinder/api/schemas/scheduler_hints.py (L31-L65)

Change-Id: Ida7f4662dc9fea24510758541fd4f2622b73bf31
2023-10-31 09:22:25 +01:00
..
v1 tests: Use consistent shortcut to fake image client 2023-08-28 13:52:23 +01:00
v2 volume: Support same_host, different_host hint as list 2023-10-31 09:22:25 +01:00
v3 volume: Deprecate '--detailed' options 2023-09-11 11:02:55 +01:00
__init__.py Remove copyright from empty files 2014-01-20 17:28:13 +04:00
client.py Blacken openstackclient.volume 2023-05-10 10:51:30 +01:00