[Api-ref] Add metatdata parameters to backup create/update

Support metadata for backup resource was introduced in cinder [1]
but it's not documented in the API docs anywhere, This change is
to add them in the api docs.
[1] https://review.openstack.org/#/c/471541/

Change-Id: I0b444b9c48f156786433b7f622bae5dd6f274c59
Closes-bug: #1709254
This commit is contained in:
junboli 2017-08-08 15:12:03 +08:00
parent 51979c59a0
commit e19efd4a09
6 changed files with 38 additions and 23 deletions

View File

@ -239,6 +239,7 @@ Request
- name: name_optional
- snapshot_id: snapshot_id_2
- project_id: project_id_path
- metadata: metadata_9
Request Example
---------------
@ -277,7 +278,7 @@ Request
- backup: backup
- description: description
- name: name_optional
- metadata: metadata_9
Request Example
---------------

View File

@ -1343,6 +1343,13 @@ metadata_8:
in: body
required: true
type: object
metadata_9:
description: |
The backup metadata key value pairs.
in: body
required: false
type: object
min_version: 3.43
migration_policy:
description: |
Specify if the volume should be migrated when it is re-typed.

View File

@ -4,6 +4,7 @@
"description": null,
"name": "backup001",
"volume_id": "64f5d2fb-d836-4063-b7e2-544d5c1ff607",
"incremental": true
"incremental": true,
"metadata": null
}
}

View File

@ -11,6 +11,7 @@
"rel": "bookmark"
}
],
"name": "backup001"
"name": "backup001",
"metadata": {}
}
}

View File

@ -1,6 +1,9 @@
{
"backup":{
"name":"test",
"description": "this is a backup"
}
}
"backup":{
"name":"test",
"metadata": {
"key": "value"
},
"description": "this is a backup"
}
}

View File

@ -1,16 +1,18 @@
{
"backup": {
"id": "fad41a83-203d-4998-9d3b-444fd5da5aba",
"links": [
{
"href": "http://10.3.150.25:8776/v3/a7090a26bc554d93aa845a4d41808251/backups/fad41a83-203d-4998-9d3b-444fd5da5aba",
"rel": "self"
},
{
"href": "http://10.3.150.25:8776/a7090a26bc554d93aa845a4d41808251/backups/fad41a83-203d-4998-9d3b-444fd5da5aba",
"rel": "bookmark"
}
],
"name": "test"
}
}
"backup": {
"id": "fad41a83-203d-4998-9d3b-444fd5da5aba",
"links": [
{
"href": "http://10.3.150.25:8776/v3/a7090a26bc554d93aa845a4d41808251/backups/fad41a83-203d-4998-9d3b-444fd5da5aba",
"rel": "self"
}, {
"href": "http://10.3.150.25:8776/a7090a26bc554d93aa845a4d41808251/backups/fad41a83-203d-4998-9d3b-444fd5da5aba",
"rel": "bookmark"
}
],
"name": "test",
"metadata": {
"key": "value"
}
}
}