tempest/tempest/lib/api_schema/response/volume
Rajat Dhasmana 81c91f0ec2 Fix: Schema validation of volume list detail
When doing the attachment of volume with glance host, the
"server_id" field of volume attachment response is null which is
not handled in the schema validation of list volume with detail.
This caused a failure in one of the tempest volume test
"test_unmanage_manage_volume" where we do a list volume with
detail request and one volume (probably from other test running
in parallel) existed with an active attachment to the glance host[2].
We can see that the "server_id" field of the attached volume is null[3].
The "server_id" field is only present when doing the attachment
with nova.
This patch allows the "server_id" to be "string" as well as "null" type
to handle both nova and glance usecase.

[1] https://86aa517b6cb393144dd6-d78b0c94e26e635eac828273888f290f.ssl.cf5.rackcdn.com/822731/1/check/glance-multistore-cinder-import/e52281e/testr_results.html

[2] Body: b'{"volumes": [{"id": "e11beb8b-e170-4c5c-945b-e854c01f85ab",
"status": "in-use",...
, "attachments":
[{"id": "e11beb8b-e170-4c5c-945b-e854c01f85ab",
"attachment_id": "5132d152-54c3-4aa6-90e8-f13d2d1d0028",
"volume_id": "e11beb8b-e170-4c5c-945b-e854c01f85ab",
"server_id": null,
"host_name": "ubuntu-focal-inmotion-iad3-0027876140",
"device": "glance_store",...

[3] "server_id": null

Closes-Bug: #1956340
Change-Id: I92d4d49bf5fe52f3417555260e0771397f18334d
2022-01-04 05:53:03 -05:00
..
v3_7 Add volume services schema for microversion 3.7 2020-09-08 14:08:45 +08:00
__init__.py Add "list Cinder API versions" 2017-03-22 10:14:59 -07:00
backups.py Volume backup response schemas are incorrect 2020-09-08 09:25:04 -04:00
capabilities.py Add response schema validation for volume capabilities 2018-09-29 10:26:29 +08:00
encryption_types.py Add response schema validation for encryption types 2020-05-19 07:32:04 +00:00
extensions.py Add response schema validation for volume extensions 2018-10-08 07:51:42 +00:00
group_snapshots.py Add response schema validation for volume group snapshots 2020-05-27 10:09:34 +08:00
group_types.py Add response schema validation for show_default_group_type 2020-05-27 15:04:45 +08:00
groups.py Add missing replication_status in group schema 2020-09-09 11:25:26 +08:00
hosts.py Fix volume host schema: host name may not contain '@' 2019-09-04 09:18:37 +08:00
limits.py Add response schema validation for volume limits 2018-10-12 12:04:04 +08:00
manage_snapshot.py Add response schema validation for snapshot manage 2019-08-21 16:48:08 +08:00
manage_volume.py Add response schema validation for volume manage 2020-09-03 16:47:36 +08:00
messages.py Add response schema validation for volume messages 2018-11-05 14:20:27 +08:00
qos.py Add response schema validation for volume qos-specs 2018-09-26 09:03:29 +08:00
quota_classes.py Add response schema validation for volume quota classes 2018-10-10 16:19:28 +08:00
quotas.py Add response schema validation for volume quota_set 2019-08-27 15:22:50 +08:00
scheduler_stats.py Add response schema validation for volume pools 2020-05-21 06:04:39 +00:00
services.py Add volume services schema for microversion 3.7 2020-09-08 14:08:45 +08:00
snapshots.py Allow snapshot name with null 2020-05-29 16:00:37 +08:00
transfers.py Add response schema validation for volume transfer 2019-09-06 18:11:51 +00:00
versions.py Add response schema validation for snapshot manage 2019-08-21 16:48:08 +08:00
volume_types.py Add response schema validation for volume types 2019-08-22 10:07:35 +08:00
volumes.py Fix: Schema validation of volume list detail 2022-01-04 05:53:03 -05:00