Merge "Update volume api microversion doc and tests"
This commit is contained in:
commit
4896811eab
@ -1257,6 +1257,7 @@ group_id_optional:
|
|||||||
in: body
|
in: body
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
min_version: 3.13
|
||||||
group_name:
|
group_name:
|
||||||
description: |
|
description: |
|
||||||
The group name.
|
The group name.
|
||||||
@ -1265,10 +1266,11 @@ group_name:
|
|||||||
type: string
|
type: string
|
||||||
group_replication_status:
|
group_replication_status:
|
||||||
description: |
|
description: |
|
||||||
The group replication status. Introduced with API microversion 3.38.
|
The group replication status.
|
||||||
in: body
|
in: body
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
min_version: 3.38
|
||||||
group_snapshot:
|
group_snapshot:
|
||||||
description: |
|
description: |
|
||||||
The group snapshot.
|
The group snapshot.
|
||||||
@ -2301,6 +2303,15 @@ provider: # required response parameter (get/create)
|
|||||||
in: body
|
in: body
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
provider_id:
|
||||||
|
description: |
|
||||||
|
The provider ID for the volume. The value is either a string set by the
|
||||||
|
driver or ``null`` if the driver doesn't use the field or if it hasn't
|
||||||
|
created it yet. Only returned for administrators.
|
||||||
|
in: body
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
min_version: 3.21
|
||||||
provider_optional: # optional response parameter (update)
|
provider_optional: # optional response parameter (update)
|
||||||
description: |
|
description: |
|
||||||
The class that provides encryption support.
|
The class that provides encryption support.
|
||||||
|
@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
"volume": {
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "2018-11-28T06:21:12.715987",
|
||||||
|
"description": null,
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "2b955850-f177-45f7-9f49-ecb2c256d161",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:33951/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/2b955850-f177-45f7-9f49-ecb2c256d161",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:33951/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/2b955850-f177-45f7-9f49-ecb2c256d161",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": null,
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "c853ca26-e8ea-4797-8a52-ee124a013d0e",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"group_id": null
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
"volume": {
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "2018-11-29T06:50:07.770785",
|
||||||
|
"description": null,
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "f7223234-1afc-4d19-bfa3-d19deb6235ef",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:45839/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/f7223234-1afc-4d19-bfa3-d19deb6235ef",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:45839/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/f7223234-1afc-4d19-bfa3-d19deb6235ef",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": null,
|
||||||
|
"os-vol-host-attr:host": null,
|
||||||
|
"os-vol-mig-status-attr:migstat": null,
|
||||||
|
"os-vol-mig-status-attr:name_id": null,
|
||||||
|
"os-vol-tenant-attr:tenant_id": "89afd400-b646-4bbc-b12b-c0a4d63e5bd3",
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "c853ca26-e8ea-4797-8a52-ee124a013d0e",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"group_id": null
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
"volume": {
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "2018-11-29T06:59:23.679903",
|
||||||
|
"description": "This is yet, another volume.",
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "8b2459d1-0059-4e14-a89f-dfa73a452af6",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:41467/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/8b2459d1-0059-4e14-a89f-dfa73a452af6",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:41467/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/8b2459d1-0059-4e14-a89f-dfa73a452af6",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"name": "metadata0"
|
||||||
|
},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": "vol-003",
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "c853ca26-e8ea-4797-8a52-ee124a013d0e",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"group_id": null
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
"volumes": [
|
||||||
|
{
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "2018-11-28T06:25:15.288987",
|
||||||
|
"description": null,
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "cb49b381-9012-40cb-b8ee-80c19a4801b5",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:43543/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/cb49b381-9012-40cb-b8ee-80c19a4801b5",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:43543/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/cb49b381-9012-40cb-b8ee-80c19a4801b5",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": null,
|
||||||
|
"os-vol-host-attr:host": null,
|
||||||
|
"os-vol-mig-status-attr:migstat": null,
|
||||||
|
"os-vol-mig-status-attr:name_id": null,
|
||||||
|
"os-vol-tenant-attr:tenant_id": "89afd400-b646-4bbc-b12b-c0a4d63e5bd3",
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "c853ca26-e8ea-4797-8a52-ee124a013d0e",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"group_id": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
"volume": {
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "2018-11-28T06:21:12.715987",
|
||||||
|
"description": null,
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "2b955850-f177-45f7-9f49-ecb2c256d161",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:33951/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/2b955850-f177-45f7-9f49-ecb2c256d161",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:33951/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/2b955850-f177-45f7-9f49-ecb2c256d161",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": null,
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "c853ca26-e8ea-4797-8a52-ee124a013d0e",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"group_id": null,
|
||||||
|
"provider_id": null
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"volume": {
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "2018-11-29T06:50:07.770785",
|
||||||
|
"description": null,
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "f7223234-1afc-4d19-bfa3-d19deb6235ef",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:45839/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/f7223234-1afc-4d19-bfa3-d19deb6235ef",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:45839/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/f7223234-1afc-4d19-bfa3-d19deb6235ef",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": null,
|
||||||
|
"os-vol-host-attr:host": null,
|
||||||
|
"os-vol-mig-status-attr:migstat": null,
|
||||||
|
"os-vol-mig-status-attr:name_id": null,
|
||||||
|
"os-vol-tenant-attr:tenant_id": "89afd400-b646-4bbc-b12b-c0a4d63e5bd3",
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "c853ca26-e8ea-4797-8a52-ee124a013d0e",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"group_id": null,
|
||||||
|
"provider_id": null
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"volume": {
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "2018-11-29T06:59:23.679903",
|
||||||
|
"description": "This is yet, another volume.",
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "8b2459d1-0059-4e14-a89f-dfa73a452af6",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:41467/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/8b2459d1-0059-4e14-a89f-dfa73a452af6",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:41467/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/8b2459d1-0059-4e14-a89f-dfa73a452af6",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"name": "metadata0"
|
||||||
|
},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": "vol-003",
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "c853ca26-e8ea-4797-8a52-ee124a013d0e",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"group_id": null,
|
||||||
|
"provider_id": null
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"volumes": [
|
||||||
|
{
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "2018-11-28T06:25:15.288987",
|
||||||
|
"description": null,
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "cb49b381-9012-40cb-b8ee-80c19a4801b5",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:43543/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/cb49b381-9012-40cb-b8ee-80c19a4801b5",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:43543/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/cb49b381-9012-40cb-b8ee-80c19a4801b5",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": null,
|
||||||
|
"os-vol-host-attr:host": null,
|
||||||
|
"os-vol-mig-status-attr:migstat": null,
|
||||||
|
"os-vol-mig-status-attr:name_id": null,
|
||||||
|
"os-vol-tenant-attr:tenant_id": "89afd400-b646-4bbc-b12b-c0a4d63e5bd3",
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "c853ca26-e8ea-4797-8a52-ee124a013d0e",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"group_id": null,
|
||||||
|
"provider_id": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"volume": {
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "2018-11-28T06:21:12.715987",
|
||||||
|
"description": null,
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "2b955850-f177-45f7-9f49-ecb2c256d161",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:33951/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/2b955850-f177-45f7-9f49-ecb2c256d161",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:33951/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/2b955850-f177-45f7-9f49-ecb2c256d161",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": null,
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "c853ca26-e8ea-4797-8a52-ee124a013d0e",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"group_id": null,
|
||||||
|
"provider_id": null,
|
||||||
|
"service_uuid": null,
|
||||||
|
"shared_targets": true
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"volume": {
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "2018-11-29T06:50:07.770785",
|
||||||
|
"description": null,
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "f7223234-1afc-4d19-bfa3-d19deb6235ef",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:45839/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/f7223234-1afc-4d19-bfa3-d19deb6235ef",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:45839/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/f7223234-1afc-4d19-bfa3-d19deb6235ef",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": null,
|
||||||
|
"os-vol-host-attr:host": null,
|
||||||
|
"os-vol-mig-status-attr:migstat": null,
|
||||||
|
"os-vol-mig-status-attr:name_id": null,
|
||||||
|
"os-vol-tenant-attr:tenant_id": "89afd400-b646-4bbc-b12b-c0a4d63e5bd3",
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "c853ca26-e8ea-4797-8a52-ee124a013d0e",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"provider_id": null,
|
||||||
|
"group_id": null,
|
||||||
|
"service_uuid": null,
|
||||||
|
"shared_targets": true
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"volume": {
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "2018-11-29T06:59:23.679903",
|
||||||
|
"description": "This is yet, another volume.",
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "8b2459d1-0059-4e14-a89f-dfa73a452af6",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:41467/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/8b2459d1-0059-4e14-a89f-dfa73a452af6",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:41467/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/8b2459d1-0059-4e14-a89f-dfa73a452af6",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"name": "metadata0"
|
||||||
|
},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": "vol-003",
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "c853ca26-e8ea-4797-8a52-ee124a013d0e",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"group_id": null,
|
||||||
|
"provider_id": null,
|
||||||
|
"service_uuid": null,
|
||||||
|
"shared_targets": true
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
"volumes": [
|
||||||
|
{
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "2018-11-28T06:25:15.288987",
|
||||||
|
"description": null,
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "cb49b381-9012-40cb-b8ee-80c19a4801b5",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:43543/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/cb49b381-9012-40cb-b8ee-80c19a4801b5",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:43543/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/cb49b381-9012-40cb-b8ee-80c19a4801b5",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": null,
|
||||||
|
"os-vol-host-attr:host": null,
|
||||||
|
"os-vol-mig-status-attr:migstat": null,
|
||||||
|
"os-vol-mig-status-attr:name_id": null,
|
||||||
|
"os-vol-tenant-attr:tenant_id": "89afd400-b646-4bbc-b12b-c0a4d63e5bd3",
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "c853ca26-e8ea-4797-8a52-ee124a013d0e",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"provider_id": null,
|
||||||
|
"group_id": null,
|
||||||
|
"service_uuid": null,
|
||||||
|
"shared_targets": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
"volume": {
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "2018-11-28T06:21:12.715987",
|
||||||
|
"description": null,
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "2b955850-f177-45f7-9f49-ecb2c256d161",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:33951/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/2b955850-f177-45f7-9f49-ecb2c256d161",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:33951/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/2b955850-f177-45f7-9f49-ecb2c256d161",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": null,
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "c853ca26-e8ea-4797-8a52-ee124a013d0e",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"group_id": null,
|
||||||
|
"provider_id": null,
|
||||||
|
"service_uuid": null,
|
||||||
|
"shared_targets": true,
|
||||||
|
"cluster_name": null
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
"volume": {
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "2018-11-29T06:50:07.770785",
|
||||||
|
"description": null,
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "f7223234-1afc-4d19-bfa3-d19deb6235ef",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:45839/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/f7223234-1afc-4d19-bfa3-d19deb6235ef",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:45839/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/f7223234-1afc-4d19-bfa3-d19deb6235ef",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": null,
|
||||||
|
"os-vol-host-attr:host": null,
|
||||||
|
"os-vol-mig-status-attr:migstat": null,
|
||||||
|
"os-vol-mig-status-attr:name_id": null,
|
||||||
|
"os-vol-tenant-attr:tenant_id": "89afd400-b646-4bbc-b12b-c0a4d63e5bd3",
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "c853ca26-e8ea-4797-8a52-ee124a013d0e",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"provider_id": null,
|
||||||
|
"group_id": null,
|
||||||
|
"service_uuid": null,
|
||||||
|
"shared_targets": true,
|
||||||
|
"cluster_name": null
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
"volume": {
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "2018-11-29T06:59:23.679903",
|
||||||
|
"description": "This is yet, another volume.",
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "8b2459d1-0059-4e14-a89f-dfa73a452af6",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:41467/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/8b2459d1-0059-4e14-a89f-dfa73a452af6",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:41467/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/8b2459d1-0059-4e14-a89f-dfa73a452af6",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"name": "metadata0"
|
||||||
|
},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": "vol-003",
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "c853ca26-e8ea-4797-8a52-ee124a013d0e",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"group_id": null,
|
||||||
|
"provider_id": null,
|
||||||
|
"service_uuid": null,
|
||||||
|
"shared_targets": true,
|
||||||
|
"cluster_name": null
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
"volumes": [
|
||||||
|
{
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "2018-11-28T06:25:15.288987",
|
||||||
|
"description": null,
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "cb49b381-9012-40cb-b8ee-80c19a4801b5",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:43543/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/cb49b381-9012-40cb-b8ee-80c19a4801b5",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:43543/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/cb49b381-9012-40cb-b8ee-80c19a4801b5",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": null,
|
||||||
|
"os-vol-host-attr:host": null,
|
||||||
|
"os-vol-mig-status-attr:migstat": null,
|
||||||
|
"os-vol-mig-status-attr:name_id": null,
|
||||||
|
"os-vol-tenant-attr:tenant_id": "89afd400-b646-4bbc-b12b-c0a4d63e5bd3",
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "c853ca26-e8ea-4797-8a52-ee124a013d0e",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"provider_id": null,
|
||||||
|
"group_id": null,
|
||||||
|
"service_uuid": null,
|
||||||
|
"shared_targets": true,
|
||||||
|
"cluster_name": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"volume": {
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "2018-11-28T06:21:12.715987",
|
||||||
|
"description": null,
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "2b955850-f177-45f7-9f49-ecb2c256d161",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:33951/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/2b955850-f177-45f7-9f49-ecb2c256d161",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:33951/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/2b955850-f177-45f7-9f49-ecb2c256d161",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": null,
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "c853ca26-e8ea-4797-8a52-ee124a013d0e",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"group_id": null,
|
||||||
|
"provider_id": null,
|
||||||
|
"service_uuid": null,
|
||||||
|
"shared_targets": true,
|
||||||
|
"cluster_name": null,
|
||||||
|
"volume_type_id": "5fed9d7c-401d-46e2-8e80-f30c70cb7e1d"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
"volume": {
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "2018-11-29T06:50:07.770785",
|
||||||
|
"description": null,
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "f7223234-1afc-4d19-bfa3-d19deb6235ef",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:45839/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/f7223234-1afc-4d19-bfa3-d19deb6235ef",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:45839/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/f7223234-1afc-4d19-bfa3-d19deb6235ef",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": null,
|
||||||
|
"os-vol-host-attr:host": null,
|
||||||
|
"os-vol-mig-status-attr:migstat": null,
|
||||||
|
"os-vol-mig-status-attr:name_id": null,
|
||||||
|
"os-vol-tenant-attr:tenant_id": "89afd400-b646-4bbc-b12b-c0a4d63e5bd3",
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "c853ca26-e8ea-4797-8a52-ee124a013d0e",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"provider_id": null,
|
||||||
|
"group_id": null,
|
||||||
|
"service_uuid": null,
|
||||||
|
"shared_targets": true,
|
||||||
|
"cluster_name": null,
|
||||||
|
"volume_type_id": "5fed9d7c-401d-46e2-8e80-f30c70cb7e1d"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"volume": {
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "2018-11-29T06:59:23.679903",
|
||||||
|
"description": "This is yet, another volume.",
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "8b2459d1-0059-4e14-a89f-dfa73a452af6",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:41467/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/8b2459d1-0059-4e14-a89f-dfa73a452af6",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:41467/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/8b2459d1-0059-4e14-a89f-dfa73a452af6",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"name": "metadata0"
|
||||||
|
},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": "vol-003",
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "c853ca26-e8ea-4797-8a52-ee124a013d0e",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"group_id": null,
|
||||||
|
"provider_id": null,
|
||||||
|
"service_uuid": null,
|
||||||
|
"shared_targets": true,
|
||||||
|
"cluster_name": null,
|
||||||
|
"volume_type_id": "5fed9d7c-401d-46e2-8e80-f30c70cb7e1d"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
{
|
||||||
|
"volumes": [
|
||||||
|
{
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "2018-11-28T06:25:15.288987",
|
||||||
|
"description": null,
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "cb49b381-9012-40cb-b8ee-80c19a4801b5",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:43543/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/cb49b381-9012-40cb-b8ee-80c19a4801b5",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:43543/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/cb49b381-9012-40cb-b8ee-80c19a4801b5",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": null,
|
||||||
|
"os-vol-host-attr:host": null,
|
||||||
|
"os-vol-mig-status-attr:migstat": null,
|
||||||
|
"os-vol-mig-status-attr:name_id": null,
|
||||||
|
"os-vol-tenant-attr:tenant_id": "89afd400-b646-4bbc-b12b-c0a4d63e5bd3",
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "c853ca26-e8ea-4797-8a52-ee124a013d0e",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"provider_id": null,
|
||||||
|
"group_id": null,
|
||||||
|
"service_uuid": null,
|
||||||
|
"shared_targets": true,
|
||||||
|
"cluster_name": null,
|
||||||
|
"volume_type_id": "5fed9d7c-401d-46e2-8e80-f30c70cb7e1d"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -34,13 +34,7 @@
|
|||||||
"status": "creating",
|
"status": "creating",
|
||||||
"updated_at": null,
|
"updated_at": null,
|
||||||
"user_id": "c853ca26-e8ea-4797-8a52-ee124a013d0e",
|
"user_id": "c853ca26-e8ea-4797-8a52-ee124a013d0e",
|
||||||
"volume_type": "__DEFAULT__",
|
"volume_type": "__DEFAULT__"
|
||||||
"volume_type_id": "5fed9d7c-401d-46e2-8e80-f30c70cb7e1d",
|
|
||||||
"provider_id": null,
|
|
||||||
"group_id": null,
|
|
||||||
"service_uuid": null,
|
|
||||||
"shared_targets": true,
|
|
||||||
"cluster_name": null
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -134,14 +134,17 @@ Response Parameters
|
|||||||
- volume_type_id: volume_type_id_363
|
- volume_type_id: volume_type_id_363
|
||||||
- group_id: group_id_optional
|
- group_id: group_id_optional
|
||||||
- volumes_links: links_vol_optional
|
- volumes_links: links_vol_optional
|
||||||
|
- provider_id: provider_id
|
||||||
|
- service_uuid: service_uuid
|
||||||
|
- shared_targets: shared_targets
|
||||||
|
- cluster_name: cluster_name
|
||||||
- count: count
|
- count: count
|
||||||
|
|
||||||
|
|
||||||
|
Response Example (v3.63)
|
||||||
|
------------------------
|
||||||
|
|
||||||
Response Example
|
.. literalinclude:: ./samples/volumes/v3.63/volumes-list-detailed-response.json
|
||||||
----------------
|
|
||||||
|
|
||||||
.. literalinclude:: ./samples/volumes/volumes-list-detailed-response.json
|
|
||||||
:language: javascript
|
:language: javascript
|
||||||
|
|
||||||
|
|
||||||
@ -247,12 +250,17 @@ Response Parameters
|
|||||||
- bootable: bootable_response
|
- bootable: bootable_response
|
||||||
- created_at: created_at
|
- created_at: created_at
|
||||||
- volume_type: volume_type_vol
|
- volume_type: volume_type_vol
|
||||||
|
- volume_type_id: volume_type_id_363
|
||||||
- group_id: group_id_optional
|
- group_id: group_id_optional
|
||||||
|
- provider_id: provider_id
|
||||||
|
- service_uuid: service_uuid
|
||||||
|
- shared_targets: shared_targets
|
||||||
|
- cluster_name: cluster_name
|
||||||
|
|
||||||
Response Example
|
Response Example (v3.63)
|
||||||
----------------
|
------------------------
|
||||||
|
|
||||||
.. literalinclude:: ./samples/volumes/volume-create-response.json
|
.. literalinclude:: ./samples/volumes/v3.63/volume-create-response.json
|
||||||
:language: javascript
|
:language: javascript
|
||||||
|
|
||||||
|
|
||||||
@ -382,12 +390,14 @@ Response Parameters
|
|||||||
- service_uuid: service_uuid
|
- service_uuid: service_uuid
|
||||||
- shared_targets: shared_targets
|
- shared_targets: shared_targets
|
||||||
- cluster_name: cluster_name
|
- cluster_name: cluster_name
|
||||||
|
- provider_id: provider_id
|
||||||
|
- group_id: group_id_optional
|
||||||
|
|
||||||
|
|
||||||
Response Example
|
Response Example (v3.63)
|
||||||
----------------
|
------------------------
|
||||||
|
|
||||||
.. literalinclude:: ./samples/volumes/volume-show-response.json
|
.. literalinclude:: ./samples/volumes/v3.63/volume-show-response.json
|
||||||
:language: javascript
|
:language: javascript
|
||||||
|
|
||||||
|
|
||||||
@ -455,12 +465,18 @@ Response Parameters
|
|||||||
- bootable: bootable_response
|
- bootable: bootable_response
|
||||||
- created_at: created_at
|
- created_at: created_at
|
||||||
- volume_type: volume_type_vol
|
- volume_type: volume_type_vol
|
||||||
|
- volume_type_id: volume_type_id_363
|
||||||
|
- group_id: group_id_optional
|
||||||
|
- provider_id: provider_id
|
||||||
|
- service_uuid: service_uuid
|
||||||
|
- shared_targets: shared_targets
|
||||||
|
- cluster_name: cluster_name
|
||||||
|
|
||||||
|
|
||||||
Response Example
|
Response Example (v3.63)
|
||||||
----------------
|
------------------------
|
||||||
|
|
||||||
.. literalinclude:: ./samples/volumes/volume-update-response.json
|
.. literalinclude:: ./samples/volumes/v3.63/volume-update-response.json
|
||||||
:language: javascript
|
:language: javascript
|
||||||
|
|
||||||
|
|
||||||
|
@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
"volume": {
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "%(strtime)s",
|
||||||
|
"description": null,
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "%(uuid)s",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "%(host)s/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "%(host)s/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": null,
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "%(uuid)s",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"group_id": null
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
"volume": {
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "%(strtime)s",
|
||||||
|
"description": null,
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "%(uuid)s",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "%(host)s/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "%(host)s/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": null,
|
||||||
|
"os-vol-host-attr:host": null,
|
||||||
|
"os-vol-mig-status-attr:migstat": null,
|
||||||
|
"os-vol-mig-status-attr:name_id": null,
|
||||||
|
"os-vol-tenant-attr:tenant_id": "%(uuid)s",
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "%(uuid)s",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"group_id": null
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
"volume": {
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "%(strtime)s",
|
||||||
|
"description": "This is yet, another volume.",
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "%(uuid)s",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "%(host)s/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "%(host)s/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"name": "metadata0"
|
||||||
|
},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": "vol-003",
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "%(uuid)s",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"group_id": null
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
"volumes": [
|
||||||
|
{
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "%(strtime)s",
|
||||||
|
"description": null,
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "%(uuid)s",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "%(host)s/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "%(host)s/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": null,
|
||||||
|
"os-vol-host-attr:host": null,
|
||||||
|
"os-vol-mig-status-attr:migstat": null,
|
||||||
|
"os-vol-mig-status-attr:name_id": null,
|
||||||
|
"os-vol-tenant-attr:tenant_id": "%(uuid)s",
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "%(uuid)s",
|
||||||
|
"volume_type": "%(name)s",
|
||||||
|
"group_id": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
"volume": {
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "%(strtime)s",
|
||||||
|
"description": null,
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "%(uuid)s",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "%(host)s/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "%(host)s/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": null,
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "%(uuid)s",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"group_id": null,
|
||||||
|
"provider_id": null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"volume": {
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "%(strtime)s",
|
||||||
|
"description": null,
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "%(uuid)s",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "%(host)s/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "%(host)s/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": null,
|
||||||
|
"os-vol-host-attr:host": null,
|
||||||
|
"os-vol-mig-status-attr:migstat": null,
|
||||||
|
"os-vol-mig-status-attr:name_id": null,
|
||||||
|
"os-vol-tenant-attr:tenant_id": "%(uuid)s",
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "%(uuid)s",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"group_id": null,
|
||||||
|
"provider_id": null
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"volume": {
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "%(strtime)s",
|
||||||
|
"description": "This is yet, another volume.",
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "%(uuid)s",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "%(host)s/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "%(host)s/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"name": "metadata0"
|
||||||
|
},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": "vol-003",
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "%(uuid)s",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"group_id": null,
|
||||||
|
"provider_id": null
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"volumes": [
|
||||||
|
{
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "%(strtime)s",
|
||||||
|
"description": null,
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "%(uuid)s",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "%(host)s/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "%(host)s/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": null,
|
||||||
|
"os-vol-host-attr:host": null,
|
||||||
|
"os-vol-mig-status-attr:migstat": null,
|
||||||
|
"os-vol-mig-status-attr:name_id": null,
|
||||||
|
"os-vol-tenant-attr:tenant_id": "%(uuid)s",
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "%(uuid)s",
|
||||||
|
"volume_type": "%(name)s",
|
||||||
|
"group_id": null,
|
||||||
|
"provider_id": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"volume": {
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "%(strtime)s",
|
||||||
|
"description": null,
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "%(uuid)s",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "%(host)s/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "%(host)s/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": null,
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "%(uuid)s",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"group_id": null,
|
||||||
|
"provider_id": null,
|
||||||
|
"service_uuid": null,
|
||||||
|
"shared_targets": true
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"volume": {
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "%(strtime)s",
|
||||||
|
"description": null,
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "%(uuid)s",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "%(host)s/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "%(host)s/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": null,
|
||||||
|
"os-vol-host-attr:host": null,
|
||||||
|
"os-vol-mig-status-attr:migstat": null,
|
||||||
|
"os-vol-mig-status-attr:name_id": null,
|
||||||
|
"os-vol-tenant-attr:tenant_id": "%(uuid)s",
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "%(uuid)s",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"provider_id": null,
|
||||||
|
"group_id": null,
|
||||||
|
"service_uuid": null,
|
||||||
|
"shared_targets": true
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"volume": {
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "%(strtime)s",
|
||||||
|
"description": "This is yet, another volume.",
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "%(uuid)s",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "%(host)s/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "%(host)s/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"name": "metadata0"
|
||||||
|
},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": "vol-003",
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "%(uuid)s",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"group_id": null,
|
||||||
|
"provider_id": null,
|
||||||
|
"service_uuid": null,
|
||||||
|
"shared_targets": true
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
"volumes": [
|
||||||
|
{
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "%(strtime)s",
|
||||||
|
"description": null,
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "%(uuid)s",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "%(host)s/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "%(host)s/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": null,
|
||||||
|
"os-vol-host-attr:host": null,
|
||||||
|
"os-vol-mig-status-attr:migstat": null,
|
||||||
|
"os-vol-mig-status-attr:name_id": null,
|
||||||
|
"os-vol-tenant-attr:tenant_id": "%(uuid)s",
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "%(uuid)s",
|
||||||
|
"volume_type": "%(name)s",
|
||||||
|
"service_uuid": null,
|
||||||
|
"provider_id": null,
|
||||||
|
"group_id": null,
|
||||||
|
"shared_targets": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
"volume": {
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "%(strtime)s",
|
||||||
|
"description": null,
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "%(uuid)s",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "%(host)s/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "%(host)s/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": null,
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "%(uuid)s",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"group_id": null,
|
||||||
|
"provider_id": null,
|
||||||
|
"service_uuid": null,
|
||||||
|
"shared_targets": true,
|
||||||
|
"cluster_name": null
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
"volume": {
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "%(strtime)s",
|
||||||
|
"description": null,
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "%(uuid)s",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "%(host)s/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "%(host)s/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": null,
|
||||||
|
"os-vol-host-attr:host": null,
|
||||||
|
"os-vol-mig-status-attr:migstat": null,
|
||||||
|
"os-vol-mig-status-attr:name_id": null,
|
||||||
|
"os-vol-tenant-attr:tenant_id": "%(uuid)s",
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "%(uuid)s",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"provider_id": null,
|
||||||
|
"group_id": null,
|
||||||
|
"service_uuid": null,
|
||||||
|
"shared_targets": true,
|
||||||
|
"cluster_name": null
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
"volume": {
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "%(strtime)s",
|
||||||
|
"description": "This is yet, another volume.",
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "%(uuid)s",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "%(host)s/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "%(host)s/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"name": "metadata0"
|
||||||
|
},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": "vol-003",
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "%(uuid)s",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"group_id": null,
|
||||||
|
"provider_id": null,
|
||||||
|
"service_uuid": null,
|
||||||
|
"shared_targets": true,
|
||||||
|
"cluster_name": null
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
"volumes": [
|
||||||
|
{
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "%(strtime)s",
|
||||||
|
"description": null,
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "%(uuid)s",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "%(host)s/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "%(host)s/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": null,
|
||||||
|
"os-vol-host-attr:host": null,
|
||||||
|
"os-vol-mig-status-attr:migstat": null,
|
||||||
|
"os-vol-mig-status-attr:name_id": null,
|
||||||
|
"os-vol-tenant-attr:tenant_id": "%(uuid)s",
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "%(uuid)s",
|
||||||
|
"volume_type": "%(name)s",
|
||||||
|
"service_uuid": null,
|
||||||
|
"provider_id": null,
|
||||||
|
"group_id": null,
|
||||||
|
"shared_targets": true,
|
||||||
|
"cluster_name": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"volume": {
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "%(strtime)s",
|
||||||
|
"description": null,
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "%(uuid)s",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "%(host)s/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "%(host)s/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": null,
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "%(uuid)s",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"group_id": null,
|
||||||
|
"provider_id": null,
|
||||||
|
"service_uuid": null,
|
||||||
|
"shared_targets": true,
|
||||||
|
"cluster_name": null,
|
||||||
|
"volume_type_id": "%(uuid)s"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
"volume": {
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "%(strtime)s",
|
||||||
|
"description": null,
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "%(uuid)s",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "%(host)s/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "%(host)s/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": null,
|
||||||
|
"os-vol-host-attr:host": null,
|
||||||
|
"os-vol-mig-status-attr:migstat": null,
|
||||||
|
"os-vol-mig-status-attr:name_id": null,
|
||||||
|
"os-vol-tenant-attr:tenant_id": "%(uuid)s",
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "%(uuid)s",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"provider_id": null,
|
||||||
|
"group_id": null,
|
||||||
|
"service_uuid": null,
|
||||||
|
"shared_targets": true,
|
||||||
|
"cluster_name": null,
|
||||||
|
"volume_type_id": "%(uuid)s"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"volume": {
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "%(strtime)s",
|
||||||
|
"description": "This is yet, another volume.",
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "%(uuid)s",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "%(host)s/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "%(host)s/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"name": "metadata0"
|
||||||
|
},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": "vol-003",
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "%(uuid)s",
|
||||||
|
"volume_type": "__DEFAULT__",
|
||||||
|
"group_id": null,
|
||||||
|
"provider_id": null,
|
||||||
|
"service_uuid": null,
|
||||||
|
"shared_targets": true,
|
||||||
|
"cluster_name": null,
|
||||||
|
"volume_type_id": "%(uuid)s"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
{
|
||||||
|
"volumes": [
|
||||||
|
{
|
||||||
|
"attachments": [],
|
||||||
|
"availability_zone": "nova",
|
||||||
|
"bootable": "false",
|
||||||
|
"consistencygroup_id": null,
|
||||||
|
"created_at": "%(strtime)s",
|
||||||
|
"description": null,
|
||||||
|
"encrypted": false,
|
||||||
|
"id": "%(uuid)s",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "%(host)s/v3/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "%(host)s/89afd400-b646-4bbc-b12b-c0a4d63e5bd3/volumes/%(uuid)s",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {},
|
||||||
|
"migration_status": null,
|
||||||
|
"multiattach": false,
|
||||||
|
"name": null,
|
||||||
|
"os-vol-host-attr:host": null,
|
||||||
|
"os-vol-mig-status-attr:migstat": null,
|
||||||
|
"os-vol-mig-status-attr:name_id": null,
|
||||||
|
"os-vol-tenant-attr:tenant_id": "%(uuid)s",
|
||||||
|
"replication_status": null,
|
||||||
|
"size": 10,
|
||||||
|
"snapshot_id": null,
|
||||||
|
"source_volid": null,
|
||||||
|
"status": "creating",
|
||||||
|
"updated_at": null,
|
||||||
|
"user_id": "%(uuid)s",
|
||||||
|
"volume_type": "%(name)s",
|
||||||
|
"volume_type_id": "%(uuid)s",
|
||||||
|
"service_uuid": null,
|
||||||
|
"provider_id": null,
|
||||||
|
"group_id": null,
|
||||||
|
"shared_targets": true,
|
||||||
|
"cluster_name": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -34,13 +34,7 @@
|
|||||||
"status": "creating",
|
"status": "creating",
|
||||||
"updated_at": null,
|
"updated_at": null,
|
||||||
"user_id": "%(uuid)s",
|
"user_id": "%(uuid)s",
|
||||||
"volume_type": "%(name)s",
|
"volume_type": "%(name)s"
|
||||||
"volume_type_id": "%(uuid)s",
|
|
||||||
"service_uuid": null,
|
|
||||||
"provider_id": null,
|
|
||||||
"group_id": null,
|
|
||||||
"shared_targets": true,
|
|
||||||
"cluster_name": null
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -10,10 +10,10 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from cinder.tests.functional.api_sample_tests import test_volumes
|
from cinder.tests.functional import api_samples_test_base as test_base
|
||||||
|
|
||||||
|
|
||||||
class LimitsSampleJsonTest(test_volumes.VolumesSampleBase):
|
class LimitsSampleJsonTest(test_base.VolumesSampleBase):
|
||||||
sample_dir = "limits"
|
sample_dir = "limits"
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
@ -12,10 +12,10 @@
|
|||||||
|
|
||||||
from oslo_serialization import jsonutils
|
from oslo_serialization import jsonutils
|
||||||
|
|
||||||
from cinder.tests.functional.api_sample_tests import test_volumes
|
from cinder.tests.functional import api_samples_test_base as test_base
|
||||||
|
|
||||||
|
|
||||||
class QOSSampleJsonTest(test_volumes.VolumesSampleBase):
|
class QOSSampleJsonTest(test_base.VolumesSampleBase):
|
||||||
sample_dir = "qos"
|
sample_dir = "qos"
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
@ -10,10 +10,10 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from cinder.tests.functional.api_sample_tests import test_volumes
|
from cinder.tests.functional import api_samples_test_base as test_base
|
||||||
|
|
||||||
|
|
||||||
class QuotaClassesSampleJsonTest(test_volumes.VolumesSampleBase):
|
class QuotaClassesSampleJsonTest(test_base.VolumesSampleBase):
|
||||||
sample_dir = "quota_classes"
|
sample_dir = "quota_classes"
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
@ -10,10 +10,10 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from cinder.tests.functional.api_sample_tests import test_volumes
|
from cinder.tests.functional import api_samples_test_base as test_base
|
||||||
|
|
||||||
|
|
||||||
class QuotaSetsSampleJsonTest(test_volumes.VolumesSampleBase):
|
class QuotaSetsSampleJsonTest(test_base.VolumesSampleBase):
|
||||||
sample_dir = "quota_sets"
|
sample_dir = "quota_sets"
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
@ -12,10 +12,10 @@
|
|||||||
|
|
||||||
from oslo_serialization import jsonutils
|
from oslo_serialization import jsonutils
|
||||||
|
|
||||||
from cinder.tests.functional.api_sample_tests import test_volumes
|
from cinder.tests.functional import api_samples_test_base as test_base
|
||||||
|
|
||||||
|
|
||||||
class VolumeSnapshotsSampleJsonTest(test_volumes.VolumesSampleBase):
|
class VolumeSnapshotsSampleJsonTest(test_base.VolumesSampleBase):
|
||||||
sample_dir = "snapshots"
|
sample_dir = "snapshots"
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
@ -13,10 +13,10 @@
|
|||||||
from oslo_serialization import jsonutils
|
from oslo_serialization import jsonutils
|
||||||
|
|
||||||
from cinder.tests.functional.api_sample_tests import fakes
|
from cinder.tests.functional.api_sample_tests import fakes
|
||||||
from cinder.tests.functional.api_sample_tests import test_volumes
|
from cinder.tests.functional import api_samples_test_base as test_base
|
||||||
|
|
||||||
|
|
||||||
class VolumeActionsSampleJsonTest(test_volumes.VolumesSampleBase):
|
class VolumeActionsSampleJsonTest(test_base.VolumesSampleBase):
|
||||||
sample_dir = "volume_actions"
|
sample_dir = "volume_actions"
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
@ -12,10 +12,10 @@
|
|||||||
|
|
||||||
from oslo_serialization import jsonutils
|
from oslo_serialization import jsonutils
|
||||||
|
|
||||||
from cinder.tests.functional.api_sample_tests import test_volumes
|
from cinder.tests.functional import api_samples_test_base as test_base
|
||||||
|
|
||||||
|
|
||||||
class VolumeTransferSampleJsonTest(test_volumes.VolumesSampleBase):
|
class VolumeTransferSampleJsonTest(test_base.VolumesSampleBase):
|
||||||
sample_dir = "volume_transfer"
|
sample_dir = "volume_transfer"
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
@ -12,71 +12,76 @@
|
|||||||
|
|
||||||
from oslo_serialization import jsonutils
|
from oslo_serialization import jsonutils
|
||||||
|
|
||||||
from cinder.api.microversions import VOLUME_TYPE_ID_IN_VOLUME_DETAIL
|
from cinder.api import microversions as mv
|
||||||
from cinder.tests.functional import api_samples_test_base
|
from cinder.tests.functional import api_samples_test_base as test_base
|
||||||
|
|
||||||
|
|
||||||
class VolumesSampleBase(api_samples_test_base.ApiSampleTestBase):
|
@test_base.VolumesSampleBase.use_versions(
|
||||||
sample_dir = "volumes"
|
mv.BASE_VERSION, # 3.0
|
||||||
|
mv.GROUP_VOLUME, # 3.13
|
||||||
|
mv.VOLUME_DETAIL_PROVIDER_ID, # 3.21
|
||||||
|
mv.VOLUME_SHARED_TARGETS_AND_SERVICE_FIELDS, # 3.48
|
||||||
|
mv.VOLUME_CLUSTER_NAME, # 3.61
|
||||||
|
mv.VOLUME_TYPE_ID_IN_VOLUME_DETAIL) # 3.63
|
||||||
|
class VolumeDetailTests(test_base.VolumesSampleBase):
|
||||||
|
"""Test volume details returned for operations with different MVs.
|
||||||
|
|
||||||
def _create_volume(self, _use_common_volume_api_samples=True, subs=None):
|
The details of a volume have changed in the different microversions, and we
|
||||||
|
have multiple operations that return them, so we should confirm that each
|
||||||
|
microversion returns the right values for all these different operations.
|
||||||
|
"""
|
||||||
|
def setup(self):
|
||||||
|
"""Create a volume before we run each test.
|
||||||
|
|
||||||
orig_value = self.__class__._use_common_volume_api_samples
|
This method is called by _FunctionalTestBase right before each test is
|
||||||
try:
|
called.
|
||||||
self.__class__._use_common_volume_api_samples = (
|
|
||||||
_use_common_volume_api_samples)
|
|
||||||
response = self._do_post('volumes',
|
|
||||||
'volume-create-request',
|
|
||||||
subs)
|
|
||||||
return response
|
|
||||||
|
|
||||||
finally:
|
We cannot create the volume on the setUp method because at that time
|
||||||
self.__class__._use_common_volume_api_samples = orig_value
|
the API version is still 3.0, so we need it to be created right after
|
||||||
|
the microversion under test has been set.
|
||||||
|
|
||||||
|
This way the create method is called using the right microversion,
|
||||||
class VolumesSampleJsonTest(VolumesSampleBase):
|
which is required for some tests, like test_volume_create.
|
||||||
|
"""
|
||||||
def setUp(self):
|
|
||||||
super(VolumesSampleBase, self).setUp()
|
|
||||||
self.response = self._create_volume()
|
self.response = self._create_volume()
|
||||||
|
|
||||||
def test_volume_list_detail(self):
|
def test_volume_list_detail(self):
|
||||||
original_api_version = self.api.api_version
|
|
||||||
|
|
||||||
try:
|
|
||||||
self.api.api_version = VOLUME_TYPE_ID_IN_VOLUME_DETAIL
|
|
||||||
response = self._do_get('volumes/detail')
|
response = self._do_get('volumes/detail')
|
||||||
self._verify_response('volumes-list-detailed-response',
|
self._verify_response('volumes-list-detailed-response',
|
||||||
{}, response, 200)
|
{}, response, 200)
|
||||||
finally:
|
|
||||||
self.api.api_version = original_api_version
|
|
||||||
|
|
||||||
def test_volume_create(self):
|
|
||||||
|
|
||||||
self._verify_response('volume-create-response',
|
|
||||||
{}, self.response, 202)
|
|
||||||
|
|
||||||
def test_volume_list(self):
|
|
||||||
|
|
||||||
response = self._do_get('volumes')
|
|
||||||
self._verify_response('volumes-list-response',
|
|
||||||
{}, response, 200)
|
|
||||||
|
|
||||||
def test_volume_show_detail(self):
|
def test_volume_show_detail(self):
|
||||||
|
|
||||||
res = jsonutils.loads(self.response.content)['volume']
|
res = jsonutils.loads(self.response.content)['volume']
|
||||||
response = self._do_get('volumes/%s' % res['id'])
|
response = self._do_get('volumes/%s' % res['id'])
|
||||||
self._verify_response('volume-show-response',
|
self._verify_response('volume-show-response',
|
||||||
{}, response, 200)
|
{}, response, 200)
|
||||||
|
|
||||||
def test_volume_update(self):
|
def test_volume_create(self):
|
||||||
|
self._verify_response('volume-create-response',
|
||||||
|
{}, self.response, 202)
|
||||||
|
|
||||||
|
def test_volume_update(self):
|
||||||
res = jsonutils.loads(self.response.content)['volume']
|
res = jsonutils.loads(self.response.content)['volume']
|
||||||
|
# Use the request sample from the common API, since the request didn't
|
||||||
|
# change with the microversion, what changes is the response.
|
||||||
|
with self.common_api_sample():
|
||||||
response = self._do_put('volumes/%s' % res['id'],
|
response = self._do_put('volumes/%s' % res['id'],
|
||||||
'volume-update-request')
|
'volume-update-request')
|
||||||
self._verify_response('volume-update-response',
|
self._verify_response('volume-update-response',
|
||||||
{}, response, 200)
|
{}, response, 200)
|
||||||
|
|
||||||
|
|
||||||
|
class VolumesSampleJsonTest(test_base.VolumesSampleBase):
|
||||||
|
def setUp(self):
|
||||||
|
super(test_base.VolumesSampleBase, self).setUp()
|
||||||
|
self.response = self._create_volume()
|
||||||
|
|
||||||
|
def test_volume_list(self):
|
||||||
|
|
||||||
|
response = self._do_get('volumes')
|
||||||
|
self._verify_response('volumes-list-response',
|
||||||
|
{}, response, 200)
|
||||||
|
|
||||||
def test_volume_metadata_create(self):
|
def test_volume_metadata_create(self):
|
||||||
|
|
||||||
res = jsonutils.loads(self.response.content)['volume']
|
res = jsonutils.loads(self.response.content)['volume']
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
import contextlib
|
||||||
import os
|
import os
|
||||||
import pprint
|
import pprint
|
||||||
import re
|
import re
|
||||||
@ -66,7 +67,7 @@ class ApiSampleTestBase(functional_helpers._FunctionalTestBase):
|
|||||||
all_extensions = True
|
all_extensions = True
|
||||||
sample_dir = None
|
sample_dir = None
|
||||||
_project_id = True
|
_project_id = True
|
||||||
_use_common_volume_api_samples = False
|
_use_common_sample = None
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super(ApiSampleTestBase, self).__init__(*args, **kwargs)
|
super(ApiSampleTestBase, self).__init__(*args, **kwargs)
|
||||||
@ -74,8 +75,6 @@ class ApiSampleTestBase(functional_helpers._FunctionalTestBase):
|
|||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(ApiSampleTestBase, self).setUp()
|
super(ApiSampleTestBase, self).setUp()
|
||||||
self.api_major_version = 'v3'
|
|
||||||
|
|
||||||
# this is used to generate sample docs
|
# this is used to generate sample docs
|
||||||
self.generate_samples = os.getenv('GENERATE_SAMPLES') is not None
|
self.generate_samples = os.getenv('GENERATE_SAMPLES') is not None
|
||||||
|
|
||||||
@ -98,20 +97,21 @@ class ApiSampleTestBase(functional_helpers._FunctionalTestBase):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _get_sample_path(cls, name, dirname, suffix='', api_version=None):
|
def _get_sample_path(cls, name, dirname, suffix='', api_version=None):
|
||||||
parts = [dirname]
|
|
||||||
parts.append('samples')
|
# Note: if _use_common_sample is set then common sample files from
|
||||||
# Note: if _use_common_volume_api_samples is set to True
|
# that location will be used instead of using the location from the
|
||||||
# then common volume sample files present in 'volumes' directory
|
# sample_dir attribute. As of now it is being used for volume POST
|
||||||
# will be used. As of now it is being used for volume POST request
|
# request to avoid duplicate copy of volume req and resp sample files.
|
||||||
# to avoid duplicate copy of volume req and resp sample files.
|
# The best approach is using the context manager provided by the
|
||||||
# Example - VolumesSampleBase's _create_volume method.
|
# common_api_sample method as used in example
|
||||||
if cls._use_common_volume_api_samples:
|
# VolumesSampleBase's _create_volume method.
|
||||||
parts.append('volumes')
|
parts = [dirname, 'samples', cls._use_common_sample or cls.sample_dir]
|
||||||
else:
|
# Base version doesn't live in a specific vX.Y directory
|
||||||
parts.append(cls.sample_dir)
|
if (not cls._use_common_sample
|
||||||
if api_version:
|
and api_version and api_version != cls._osapi_version):
|
||||||
parts.append('v' + api_version)
|
parts.append('v' + api_version)
|
||||||
parts.append(name + ".json" + suffix)
|
parts.append(name + ".json" + suffix)
|
||||||
|
|
||||||
return os.path.join(*parts)
|
return os.path.join(*parts)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@ -130,16 +130,16 @@ class ApiSampleTestBase(functional_helpers._FunctionalTestBase):
|
|||||||
api_version=api_version)
|
api_version=api_version)
|
||||||
|
|
||||||
def _read_template(self, name):
|
def _read_template(self, name):
|
||||||
template = self._get_template(name)
|
template = self._get_template(name, self.osapi_version)
|
||||||
with open(template) as inf:
|
with open(template) as inf:
|
||||||
return inf.read().strip()
|
return inf.read().strip()
|
||||||
|
|
||||||
def _write_template(self, name, data):
|
def _write_template(self, name, data):
|
||||||
with open(self._get_template(name), 'w') as outf:
|
with open(self._get_template(name, self.osapi_version), 'w') as outf:
|
||||||
outf.write(data)
|
outf.write(data)
|
||||||
|
|
||||||
def _write_sample(self, name, data):
|
def _write_sample(self, name, data):
|
||||||
with open(self._get_sample(name), 'w') as outf:
|
with open(self._get_sample(name, self.osapi_version), 'w') as outf:
|
||||||
outf.write(data)
|
outf.write(data)
|
||||||
|
|
||||||
def _compare_dict(self, expected, result, result_str, matched_value):
|
def _compare_dict(self, expected, result, result_str, matched_value):
|
||||||
@ -328,7 +328,7 @@ class ApiSampleTestBase(functional_helpers._FunctionalTestBase):
|
|||||||
"""Process sample data and update version specific links."""
|
"""Process sample data and update version specific links."""
|
||||||
# replace version urls
|
# replace version urls
|
||||||
url_re = self._get_host() + "/v3/" + PROJECT_ID
|
url_re = self._get_host() + "/v3/" + PROJECT_ID
|
||||||
new_url = self._get_host() + "/" + self.api_major_version
|
new_url = self._get_host() + "/v" + self.osapi_version_major
|
||||||
if self._project_id:
|
if self._project_id:
|
||||||
new_url += "/" + PROJECT_ID
|
new_url += "/" + PROJECT_ID
|
||||||
updated_data = re.sub(url_re, new_url, sample_data)
|
updated_data = re.sub(url_re, new_url, sample_data)
|
||||||
@ -356,17 +356,18 @@ class ApiSampleTestBase(functional_helpers._FunctionalTestBase):
|
|||||||
self.assertEqual(exp_code, response.status_code, message)
|
self.assertEqual(exp_code, response.status_code, message)
|
||||||
response_data = response.content
|
response_data = response.content
|
||||||
response_data = pretty_data(response_data)
|
response_data = pretty_data(response_data)
|
||||||
if not os.path.exists(self._get_template(name)):
|
if not os.path.exists(self._get_template(name, self.osapi_version)):
|
||||||
self._write_template(name, response_data)
|
self._write_template(name, response_data)
|
||||||
template_data = response_data
|
template_data = response_data
|
||||||
else:
|
else:
|
||||||
template_data = self._read_template(name)
|
template_data = self._read_template(name)
|
||||||
if (self.generate_samples and
|
if (self.generate_samples and
|
||||||
not os.path.exists(self._get_sample(name))):
|
not os.path.exists(self._get_sample(name,
|
||||||
|
self.osapi_version))):
|
||||||
self._write_sample(name, response_data)
|
self._write_sample(name, response_data)
|
||||||
sample_data = response_data
|
sample_data = response_data
|
||||||
else:
|
else:
|
||||||
with open(self._get_sample(name)) as sample:
|
with open(self._get_sample(name, self.osapi_version)) as sample:
|
||||||
sample_data = sample.read()
|
sample_data = sample.read()
|
||||||
if update_links:
|
if update_links:
|
||||||
sample_data = self._update_links(sample_data)
|
sample_data = self._update_links(sample_data)
|
||||||
@ -442,7 +443,7 @@ class ApiSampleTestBase(functional_helpers._FunctionalTestBase):
|
|||||||
'text': text,
|
'text': text,
|
||||||
'int': '[0-9]+',
|
'int': '[0-9]+',
|
||||||
'user_id': text,
|
'user_id': text,
|
||||||
'api_vers': self.api_major_version,
|
'api_vers': 'v' + self.osapi_version_major,
|
||||||
'volume_endpoint': self._get_volume_endpoint(),
|
'volume_endpoint': self._get_volume_endpoint(),
|
||||||
'versioned_volume_endpoint': self._get_versioned_volume_endpoint(),
|
'versioned_volume_endpoint': self._get_versioned_volume_endpoint(),
|
||||||
'name': text,
|
'name': text,
|
||||||
@ -486,7 +487,7 @@ class ApiSampleTestBase(functional_helpers._FunctionalTestBase):
|
|||||||
body = None
|
body = None
|
||||||
if name:
|
if name:
|
||||||
body = self._read_template(name) % self.subs
|
body = self._read_template(name) % self.subs
|
||||||
sample = self._get_sample(name)
|
sample = self._get_sample(name, self.osapi_version)
|
||||||
if self.generate_samples and not os.path.exists(sample):
|
if self.generate_samples and not os.path.exists(sample):
|
||||||
self._write_sample(name, body)
|
self._write_sample(name, body)
|
||||||
return self._get_response(url, method, body, headers=headers)
|
return self._get_response(url, method, body, headers=headers)
|
||||||
@ -503,3 +504,24 @@ class ApiSampleTestBase(functional_helpers._FunctionalTestBase):
|
|||||||
|
|
||||||
def _do_delete(self, url, headers=None):
|
def _do_delete(self, url, headers=None):
|
||||||
return self._get_response(url, 'DELETE', headers=headers)
|
return self._get_response(url, 'DELETE', headers=headers)
|
||||||
|
|
||||||
|
@contextlib.contextmanager
|
||||||
|
def common_api_sample(self, api=None):
|
||||||
|
orig_value = self.__class__._use_common_sample
|
||||||
|
try:
|
||||||
|
self.__class__._use_common_sample = api or self.sample_dir
|
||||||
|
yield
|
||||||
|
finally:
|
||||||
|
self.__class__._use_common_sample = orig_value
|
||||||
|
|
||||||
|
|
||||||
|
class VolumesSampleBase(ApiSampleTestBase):
|
||||||
|
sample_dir = "volumes"
|
||||||
|
|
||||||
|
def _create_volume(self, subs=None):
|
||||||
|
# Use the samples from the common API for the request
|
||||||
|
with self.common_api_sample('volumes'):
|
||||||
|
response = self._do_post('volumes',
|
||||||
|
'volume-create-request',
|
||||||
|
subs)
|
||||||
|
return response
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
"""Provides common functionality for functional tests."""
|
"""Provides common functionality for functional tests."""
|
||||||
|
import functools
|
||||||
import os.path
|
import os.path
|
||||||
import random
|
import random
|
||||||
import string
|
import string
|
||||||
@ -60,9 +61,59 @@ def generate_new_element(items, prefix, numeric=False):
|
|||||||
|
|
||||||
|
|
||||||
class _FunctionalTestBase(test.TestCase):
|
class _FunctionalTestBase(test.TestCase):
|
||||||
|
# Inheritors can change this attribute to change default tests microversion
|
||||||
|
_osapi_version = '3.0'
|
||||||
|
|
||||||
|
# These attributes are automatically set based on _osapi_version and when
|
||||||
|
# setting osapi_version property.
|
||||||
osapi_version_major = '3'
|
osapi_version_major = '3'
|
||||||
osapi_version_minor = '0'
|
osapi_version_minor = '0'
|
||||||
|
|
||||||
|
@property
|
||||||
|
def osapi_version(self):
|
||||||
|
return self._osapi_version
|
||||||
|
|
||||||
|
@osapi_version.setter
|
||||||
|
def osapi_version(self, value):
|
||||||
|
self._osapi_version = value
|
||||||
|
self.osapi_version_major, self.osapi_version_minor = value.split('.')
|
||||||
|
self.api.api_version = value
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def override_mv(version, pre_call=None):
|
||||||
|
"""Decorator that overrides the microversion for 1 test."""
|
||||||
|
def decorator(func):
|
||||||
|
@functools.wraps(func)
|
||||||
|
def wrapper(self, *args, **kwargs):
|
||||||
|
original_api_version = self.osapi_version
|
||||||
|
self.osapi_version = version
|
||||||
|
try:
|
||||||
|
if pre_call:
|
||||||
|
pre_call(self)
|
||||||
|
return func(self, *args, **kwargs)
|
||||||
|
finally:
|
||||||
|
self.osapi_version = original_api_version
|
||||||
|
return wrapper
|
||||||
|
return decorator
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def use_versions(*versions):
|
||||||
|
"""Class decorator to repeat tests for each provided version."""
|
||||||
|
def generate_methods(cls):
|
||||||
|
setup = getattr(cls, 'setup', None)
|
||||||
|
|
||||||
|
for name, func in list(cls.__dict__.items()):
|
||||||
|
if name.startswith('test_') and callable(func):
|
||||||
|
for version in versions:
|
||||||
|
setattr(cls,
|
||||||
|
f'{name}_{version.replace(".", "_")}',
|
||||||
|
_FunctionalTestBase.override_mv(version,
|
||||||
|
setup)(func))
|
||||||
|
delattr(cls, name)
|
||||||
|
return cls
|
||||||
|
|
||||||
|
return generate_methods
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(_FunctionalTestBase, self).setUp()
|
super(_FunctionalTestBase, self).setUp()
|
||||||
|
|
||||||
@ -82,10 +133,11 @@ class _FunctionalTestBase(test.TestCase):
|
|||||||
self._start_api_service()
|
self._start_api_service()
|
||||||
self.addCleanup(self.osapi.stop)
|
self.addCleanup(self.osapi.stop)
|
||||||
|
|
||||||
api_version = self.osapi_version_major + '.' + self.osapi_version_minor
|
self.osapi_version_major, self.osapi_version_minor = \
|
||||||
|
self._osapi_version.split('.')
|
||||||
self.api = client.TestOpenStackClient(fake.USER_ID,
|
self.api = client.TestOpenStackClient(fake.USER_ID,
|
||||||
fake.PROJECT_ID, self.auth_url,
|
fake.PROJECT_ID, self.auth_url,
|
||||||
api_version)
|
self.osapi_version)
|
||||||
|
|
||||||
def _update_project(self, new_project_id):
|
def _update_project(self, new_project_id):
|
||||||
self.api.update_project(new_project_id)
|
self.api.update_project(new_project_id)
|
||||||
|
@ -23,7 +23,7 @@ from cinder.tests.functional import functional_helpers
|
|||||||
|
|
||||||
class DefaultVolumeTypesTest(functional_helpers._FunctionalTestBase):
|
class DefaultVolumeTypesTest(functional_helpers._FunctionalTestBase):
|
||||||
_vol_type_name = 'functional_test_type'
|
_vol_type_name = 'functional_test_type'
|
||||||
osapi_version_minor = '62'
|
_osapi_version = '3.62'
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(DefaultVolumeTypesTest, self).setUp()
|
super(DefaultVolumeTypesTest, self).setUp()
|
||||||
|
@ -23,8 +23,7 @@ from cinder.volume import configuration
|
|||||||
class GroupReplicationTest(functional_helpers._FunctionalTestBase):
|
class GroupReplicationTest(functional_helpers._FunctionalTestBase):
|
||||||
_vol_type_name = 'functional_test_type'
|
_vol_type_name = 'functional_test_type'
|
||||||
_grp_type_name = 'functional_grp_test_type'
|
_grp_type_name = 'functional_grp_test_type'
|
||||||
osapi_version_major = '3'
|
_osapi_version = '3.38'
|
||||||
osapi_version_minor = '38'
|
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(GroupReplicationTest, self).setUp()
|
super(GroupReplicationTest, self).setUp()
|
||||||
|
@ -23,8 +23,7 @@ from cinder.volume import configuration
|
|||||||
class GroupSnapshotsTest(functional_helpers._FunctionalTestBase):
|
class GroupSnapshotsTest(functional_helpers._FunctionalTestBase):
|
||||||
_vol_type_name = 'functional_test_type'
|
_vol_type_name = 'functional_test_type'
|
||||||
_grp_type_name = 'functional_grp_test_type'
|
_grp_type_name = 'functional_grp_test_type'
|
||||||
osapi_version_major = '3'
|
_osapi_version = '3.19'
|
||||||
osapi_version_minor = '19'
|
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(GroupSnapshotsTest, self).setUp()
|
super(GroupSnapshotsTest, self).setUp()
|
||||||
|
@ -22,8 +22,7 @@ from cinder.volume import configuration
|
|||||||
class GroupsTest(functional_helpers._FunctionalTestBase):
|
class GroupsTest(functional_helpers._FunctionalTestBase):
|
||||||
_vol_type_name = 'functional_test_type'
|
_vol_type_name = 'functional_test_type'
|
||||||
_grp_type_name = 'functional_grp_test_type'
|
_grp_type_name = 'functional_grp_test_type'
|
||||||
osapi_version_major = '3'
|
_osapi_version = '3.20'
|
||||||
osapi_version_minor = '20'
|
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(GroupsTest, self).setUp()
|
super(GroupsTest, self).setUp()
|
||||||
|
@ -299,6 +299,31 @@ necessary to add changes to other places which describe your change:
|
|||||||
``cinder/api-ref/source/v3/samples/versions/versions-response.json``
|
``cinder/api-ref/source/v3/samples/versions/versions-response.json``
|
||||||
to the latest microversion to avoid functional test failure.
|
to the latest microversion to avoid functional test failure.
|
||||||
|
|
||||||
|
* If the API microversion has changed an endpoint accepted parameters or the
|
||||||
|
values it returns, we need to create the appropriate API samples within
|
||||||
|
the ``api-ref/source/v3/samples`` tree creating a new ``vX.Y`` directory
|
||||||
|
with our request and/or response json.
|
||||||
|
|
||||||
|
* Update the functional API tests in the
|
||||||
|
``cinder/tests/functional/api_sample_tests`` tree to make requests and
|
||||||
|
validate responses with the new microversion. There are multiple convenience
|
||||||
|
methods provided for testing, such as ``use_versions`` class decorator that
|
||||||
|
allows us to run the same tests with different microversions (each will use
|
||||||
|
their respective json and templates), the ``override_mv`` method decorator to
|
||||||
|
change the microversion in a single test, and the ``common_api_sample``
|
||||||
|
context manager to use the base sample instead of a microversion specific
|
||||||
|
one.
|
||||||
|
|
||||||
|
* Update the documentation adding any new parameter to
|
||||||
|
``api-ref/source/v3/parameters.yaml`` (remember to add the ``min_version``)
|
||||||
|
and then making appropriate changes to the ``.inc`` file in
|
||||||
|
``api-ref/source/v3/`` to reflect new possible return codes, new accepted
|
||||||
|
parameters and their ``Request Example (vX.Y)`` title and include file, and
|
||||||
|
returned values and their ``Response Example (vX.Y)`` title and include file.
|
||||||
|
|
||||||
|
The Cinder project's policy is that the sample requests and responses should
|
||||||
|
always reflect the *most recent* microversion.
|
||||||
|
|
||||||
Allocating a microversion
|
Allocating a microversion
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user