Merge "Use multiple attachments in test_list_volume_attachments"
This commit is contained in:
commit
0c8ca68818
@ -1,9 +1,15 @@
|
||||
{
|
||||
"volumeAttachments": [
|
||||
{
|
||||
"device": "/dev/sdc",
|
||||
"id": "227cc671-f30b-4488-96fd-7d0bf13648d8",
|
||||
"serverId": "4b293d31-ebd5-4a7f-be03-874b90021e54",
|
||||
"volumeId": "227cc671-f30b-4488-96fd-7d0bf13648d8"
|
||||
},
|
||||
{
|
||||
"device": "/dev/sdb",
|
||||
"id": "a07f71dc-8151-4e7d-a0cc-cd24a3f11113",
|
||||
"serverId": "fd5bb1c4-de31-4071-8472-9410bc9155ec",
|
||||
"serverId": "4b293d31-ebd5-4a7f-be03-874b90021e54",
|
||||
"volumeId": "a07f71dc-8151-4e7d-a0cc-cd24a3f11113"
|
||||
}
|
||||
]
|
||||
|
@ -1,9 +1,15 @@
|
||||
{
|
||||
"volumeAttachments": [
|
||||
{
|
||||
"device": "/dev/sdc",
|
||||
"id": "227cc671-f30b-4488-96fd-7d0bf13648d8",
|
||||
"serverId": "1453a6a8-10ec-4797-9b9e-da3c703579d5",
|
||||
"volumeId": "227cc671-f30b-4488-96fd-7d0bf13648d8"
|
||||
},
|
||||
{
|
||||
"device": "/dev/sdb",
|
||||
"id": "a07f71dc-8151-4e7d-a0cc-cd24a3f11113",
|
||||
"serverId": "1b92ff87-0116-40f5-9087-f4b907aeeaf1",
|
||||
"serverId": "1453a6a8-10ec-4797-9b9e-da3c703579d5",
|
||||
"volumeId": "a07f71dc-8151-4e7d-a0cc-cd24a3f11113"
|
||||
}
|
||||
]
|
||||
|
@ -1,9 +1,16 @@
|
||||
{
|
||||
"volumeAttachments": [
|
||||
{
|
||||
"device": "/dev/sdc",
|
||||
"id": "227cc671-f30b-4488-96fd-7d0bf13648d8",
|
||||
"serverId": "68426b0f-511b-4cb3-8169-bba2e7a8bc89",
|
||||
"tag": null,
|
||||
"volumeId": "227cc671-f30b-4488-96fd-7d0bf13648d8"
|
||||
},
|
||||
{
|
||||
"device": "/dev/sdb",
|
||||
"id": "a07f71dc-8151-4e7d-a0cc-cd24a3f11113",
|
||||
"serverId": "297155de-f7f2-4e87-82d0-ccc7d225d491",
|
||||
"serverId": "68426b0f-511b-4cb3-8169-bba2e7a8bc89",
|
||||
"tag": "foo",
|
||||
"volumeId": "a07f71dc-8151-4e7d-a0cc-cd24a3f11113"
|
||||
}
|
||||
|
@ -1,10 +1,18 @@
|
||||
{
|
||||
"volumeAttachments": [
|
||||
{
|
||||
"delete_on_termination": false,
|
||||
"device": "/dev/sdc",
|
||||
"id": "227cc671-f30b-4488-96fd-7d0bf13648d8",
|
||||
"serverId": "d5e4ae35-ac0e-4311-a8c5-0ee863e951d9",
|
||||
"tag": null,
|
||||
"volumeId": "227cc671-f30b-4488-96fd-7d0bf13648d8"
|
||||
},
|
||||
{
|
||||
"delete_on_termination": true,
|
||||
"device": "/dev/sdb",
|
||||
"id": "a07f71dc-8151-4e7d-a0cc-cd24a3f11113",
|
||||
"serverId": "09b3b9d1-b8c5-48e1-841d-62c3ef967a88",
|
||||
"serverId": "d5e4ae35-ac0e-4311-a8c5-0ee863e951d9",
|
||||
"tag": "foo",
|
||||
"volumeId": "a07f71dc-8151-4e7d-a0cc-cd24a3f11113"
|
||||
}
|
||||
|
@ -5,6 +5,12 @@
|
||||
"id": "%(volume_id)s",
|
||||
"serverId": "%(uuid)s",
|
||||
"volumeId": "%(volume_id)s"
|
||||
},
|
||||
{
|
||||
"device": "%(text)s",
|
||||
"id": "%(volume_id2)s",
|
||||
"serverId": "%(uuid)s",
|
||||
"volumeId": "%(volume_id2)s"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -5,6 +5,12 @@
|
||||
"id": "%(volume_id)s",
|
||||
"serverId": "%(uuid)s",
|
||||
"volumeId": "%(volume_id)s"
|
||||
},
|
||||
{
|
||||
"device": "%(text)s",
|
||||
"id": "%(volume_id2)s",
|
||||
"serverId": "%(uuid)s",
|
||||
"volumeId": "%(volume_id2)s"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -6,6 +6,13 @@
|
||||
"serverId": "%(uuid)s",
|
||||
"tag": "%(tag)s",
|
||||
"volumeId": "%(volume_id)s"
|
||||
},
|
||||
{
|
||||
"device": "%(text)s",
|
||||
"id": "%(volume_id2)s",
|
||||
"serverId": "%(uuid)s",
|
||||
"tag": null,
|
||||
"volumeId": "%(volume_id2)s"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -7,6 +7,14 @@
|
||||
"tag": "%(tag)s",
|
||||
"volumeId": "%(volume_id)s",
|
||||
"delete_on_termination": true
|
||||
},
|
||||
{
|
||||
"device": "%(text)s",
|
||||
"id": "%(volume_id2)s",
|
||||
"serverId": "%(uuid)s",
|
||||
"tag": null,
|
||||
"volumeId": "%(volume_id2)s",
|
||||
"delete_on_termination": false
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -219,8 +219,17 @@ class VolumeAttachmentsSample(test_servers.ServersSampleBase):
|
||||
|
||||
def test_list_volume_attachments(self):
|
||||
subs = self.test_attach_volume_to_server()
|
||||
# Attach another volume to the server so the response has multiple
|
||||
# which is more interesting since it's a list of dicts.
|
||||
body = {
|
||||
'volumeAttachment': {
|
||||
'volumeId': self.NEW_VOLUME_ID
|
||||
}
|
||||
}
|
||||
self.api.post_server_volume(self.server_id, body)
|
||||
response = self._do_get('servers/%s/os-volume_attachments'
|
||||
% self.server_id)
|
||||
subs['volume_id2'] = self.NEW_VOLUME_ID
|
||||
self._verify_response('list-volume-attachments-resp', subs,
|
||||
response, 200)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user