Skip to content

Commit

Permalink
Update snapshot api microversion docs and tests
Browse files Browse the repository at this point in the history
Our docs and tests are not up to date with the changes introduced to the
snapshot details introduced by the different microversion.

This patch updates the docs, samples, and tests.

Change-Id: I46fa6e1f7a5d6ad0147f17c2bafbf4fb8fa89eb8
  • Loading branch information
Akrog committed Aug 25, 2021
1 parent a2f0f57 commit d29f121
Show file tree
Hide file tree
Showing 19 changed files with 351 additions and 33 deletions.
7 changes: 7 additions & 0 deletions api-ref/source/v3/parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1283,6 +1283,13 @@ group_snapshot_id:
in: body
required: false
type: string
group_snapshot_id_3_14:
description: |
The ID of the group snapshot.
in: body
required: true
type: string
min_version: 3.14
group_snapshot_id_req:
description: |
The ID of the group snapshot.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"snapshot": {
"created_at": "2019-03-11T16:24:34.469003",
"description": "Daily backup",
"id": "b36476e5-d18b-47f9-ac69-4818cb43ee21",
"metadata": {
"key": "v3"
},
"name": "snap-001",
"size": 10,
"status": "creating",
"updated_at": null,
"volume_id": "d291b81c-6e40-4525-8231-90aa1588121e",
"group_snapshot_id": null
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"snapshot": {
"created_at": "2019-03-12T04:42:00.809352",
"description": "Daily backup",
"id": "4a584cae-e4ce-429b-9154-d4c9eb8fda4c",
"metadata": {
"key": "v3"
},
"name": "snap-001",
"os-extended-snapshot-attributes:progress": "0%",
"os-extended-snapshot-attributes:project_id": "89afd400-b646-4bbc-b12b-c0a4d63e5bd3",
"size": 10,
"status": "creating",
"updated_at": null,
"volume_id": "b72c48f1-64b7-4cd8-9745-b12e0be82d37",
"group_snapshot_id": null
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"snapshot": {
"created_at": "2019-03-12T04:53:53.426591",
"description": "This is yet, another snapshot.",
"id": "43666194-8e72-451a-b7bb-54fef763b2b8",
"metadata": {
"key": "v3"
},
"name": "snap-002",
"size": 10,
"status": "creating",
"updated_at": null,
"volume_id": "070c942d-9909-42e9-a467-7a781f150c58",
"group_snapshot_id": null
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"snapshots": [
{
"created_at": "2019-03-11T16:24:36.464445",
"description": "Daily backup",
"id": "d0083dc5-8795-4c1a-bc9c-74f70006c205",
"metadata": {
"key": "v3"
},
"name": "snap-001",
"os-extended-snapshot-attributes:progress": "0%",
"os-extended-snapshot-attributes:project_id": "89afd400-b646-4bbc-b12b-c0a4d63e5bd3",
"size": 10,
"status": "creating",
"updated_at": null,
"volume_id": "7acd675e-4e06-4653-af9f-2ecd546342d6",
"group_snapshot_id": null
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"snapshot": {
"created_at": "2019-03-11T16:24:34.469003",
"description": "Daily backup",
"id": "b36476e5-d18b-47f9-ac69-4818cb43ee21",
"metadata": {
"key": "v3"
},
"name": "snap-001",
"size": 10,
"status": "creating",
"updated_at": null,
"volume_id": "d291b81c-6e40-4525-8231-90aa1588121e",
"group_snapshot_id": null,
"user_id": "c853ca26-e8ea-4797-8a52-ee124a013d0e"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"snapshot": {
"created_at": "2019-03-12T04:42:00.809352",
"description": "Daily backup",
"id": "4a584cae-e4ce-429b-9154-d4c9eb8fda4c",
"metadata": {
"key": "v3"
},
"name": "snap-001",
"os-extended-snapshot-attributes:progress": "0%",
"os-extended-snapshot-attributes:project_id": "89afd400-b646-4bbc-b12b-c0a4d63e5bd3",
"size": 10,
"status": "creating",
"updated_at": null,
"volume_id": "b72c48f1-64b7-4cd8-9745-b12e0be82d37",
"group_snapshot_id": null,
"user_id": "c853ca26-e8ea-4797-8a52-ee124a013d0e"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"snapshot": {
"created_at": "2019-03-12T04:53:53.426591",
"description": "This is yet, another snapshot.",
"id": "43666194-8e72-451a-b7bb-54fef763b2b8",
"metadata": {
"key": "v3"
},
"name": "snap-002",
"size": 10,
"status": "creating",
"updated_at": null,
"volume_id": "070c942d-9909-42e9-a467-7a781f150c58",
"group_snapshot_id": null,
"user_id": "c853ca26-e8ea-4797-8a52-ee124a013d0e"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"snapshots": [
{
"created_at": "2019-03-11T16:24:36.464445",
"description": "Daily backup",
"id": "d0083dc5-8795-4c1a-bc9c-74f70006c205",
"metadata": {
"key": "v3"
},
"name": "snap-001",
"os-extended-snapshot-attributes:progress": "0%",
"os-extended-snapshot-attributes:project_id": "89afd400-b646-4bbc-b12b-c0a4d63e5bd3",
"size": 10,
"status": "creating",
"updated_at": null,
"volume_id": "7acd675e-4e06-4653-af9f-2ecd546342d6",
"group_snapshot_id": null,
"user_id": "c853ca26-e8ea-4797-8a52-ee124a013d0e"
}
]
}
28 changes: 16 additions & 12 deletions api-ref/source/v3/volumes-v3-snapshots.inc
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,12 @@ Response Parameters
- count: count
- updated_at: updated_at
- snapshots_links: links_snap
- group_snapshot_id: group_snapshot_id_3_14

Response Example
----------------
Response Example (v3.41)
------------------------

.. literalinclude:: ./samples/snapshots/snapshots-list-detailed-response.json
.. literalinclude:: ./samples/snapshots/v3.41/snapshots-list-detailed-response.json
:language: javascript


Expand Down Expand Up @@ -147,11 +148,12 @@ Response Parameters
- id: id_snap
- size: size
- updated_at: updated_at
- group_snapshot_id: group_snapshot_id_3_14

Response Example
----------------
Response Example (v3.41)
------------------------

.. literalinclude:: ./samples/snapshots/snapshot-create-response.json
.. literalinclude:: ./samples/snapshots/v3.41/snapshot-create-response.json
:language: javascript


Expand Down Expand Up @@ -385,11 +387,12 @@ Response Parameters
- id: id_snap
- metadata: metadata
- updated_at: updated_at
- group_snapshot_id: group_snapshot_id_3_14

Response Example
----------------
Response Example (v3.41)
------------------------

.. literalinclude:: ./samples/snapshots/snapshot-show-response.json
.. literalinclude:: ./samples/snapshots/v3.41/snapshot-show-response.json
:language: javascript


Expand Down Expand Up @@ -442,11 +445,12 @@ Response Parameters
- volume_id: volume_id_snap
- user_id: user_id_min
- metadata: metadata
- group_snapshot_id: group_snapshot_id_3_14

Response Example
----------------
Response Example (v3.41)
------------------------

.. literalinclude:: ./samples/snapshots/snapshot-update-response.json
.. literalinclude:: ./samples/snapshots/v3.41/snapshot-update-response.json
:language: javascript


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"snapshot": {
"created_at": "%(strtime)s",
"description": "Daily backup",
"id": "%(uuid)s",
"metadata": {
"key": "v3"
},
"name": "snap-001",
"size": 10,
"status": "creating",
"updated_at": null,
"volume_id": "%(uuid)s",
"group_snapshot_id": null
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"snapshot": {
"created_at": "%(strtime)s",
"description": "Daily backup",
"id": "%(uuid)s",
"metadata": {
"key": "v3"
},
"name": "snap-001",
"os-extended-snapshot-attributes:progress": "0%",
"os-extended-snapshot-attributes:project_id": "%(uuid)s",
"size": 10,
"status": "creating",
"updated_at": null,
"volume_id": "%(uuid)s",
"group_snapshot_id": null
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"snapshot": {
"created_at": "%(strtime)s",
"description": "This is yet, another snapshot.",
"id": "%(uuid)s",
"metadata": {
"key": "v3"
},
"name": "snap-002",
"size": 10,
"status": "creating",
"updated_at": null,
"volume_id": "%(uuid)s",
"group_snapshot_id": null
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"snapshots": [
{
"created_at": "%(strtime)s",
"description": "Daily backup",
"id": "%(uuid)s",
"metadata": {
"key": "v3"
},
"name": "snap-001",
"os-extended-snapshot-attributes:progress": "0%",
"os-extended-snapshot-attributes:project_id": "%(uuid)s",
"size": 10,
"status": "creating",
"updated_at": null,
"volume_id": "%(uuid)s",
"group_snapshot_id": null
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"snapshot": {
"created_at": "%(strtime)s",
"description": "Daily backup",
"id": "%(uuid)s",
"metadata": {
"key": "v3"
},
"name": "snap-001",
"size": 10,
"status": "creating",
"updated_at": null,
"volume_id": "%(uuid)s",
"group_snapshot_id": null,
"user_id": "%(uuid)s"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"snapshot": {
"created_at": "%(strtime)s",
"description": "Daily backup",
"id": "%(uuid)s",
"metadata": {
"key": "v3"
},
"name": "snap-001",
"os-extended-snapshot-attributes:progress": "0%",
"os-extended-snapshot-attributes:project_id": "%(uuid)s",
"size": 10,
"status": "creating",
"updated_at": null,
"volume_id": "%(uuid)s",
"group_snapshot_id": null,
"user_id": "%(uuid)s"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"snapshot": {
"created_at": "%(strtime)s",
"description": "This is yet, another snapshot.",
"id": "%(uuid)s",
"metadata": {
"key": "v3"
},
"name": "snap-002",
"size": 10,
"status": "creating",
"updated_at": null,
"volume_id": "%(uuid)s",
"group_snapshot_id": null,
"user_id": "%(uuid)s"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"snapshots": [
{
"created_at": "%(strtime)s",
"description": "Daily backup",
"id": "%(uuid)s",
"metadata": {
"key": "v3"
},
"name": "snap-001",
"os-extended-snapshot-attributes:progress": "0%",
"os-extended-snapshot-attributes:project_id": "%(uuid)s",
"size": 10,
"status": "creating",
"updated_at": null,
"volume_id": "%(uuid)s",
"group_snapshot_id": null,
"user_id": "%(uuid)s"
}
]
}
Loading

0 comments on commit d29f121

Please sign in to comment.