From f8ddadba8d6d964bca851540efefa434eb7cd814 Mon Sep 17 00:00:00 2001 From: Goutham Pacha Ravi Date: Thu, 21 Mar 2019 17:33:18 -0700 Subject: [PATCH] [doc][api-ref] snapshot user_id and project_id fields Patch addresses a documentation gap. Change-Id: Ia07218201322fa222474e39e3b44d9dcd68c60aa Closes-Bug: #1594372 --- api-ref/source/parameters.yaml | 24 +++++++++++---- .../samples/snapshot-create-response.json | 2 ++ .../samples/snapshot-manage-response.json | 2 ++ .../samples/snapshot-show-response.json | 2 ++ .../samples/snapshot-update-response.json | 2 ++ .../snapshots-list-detailed-response.json | 4 +++ api-ref/source/snapshots.inc | 10 +++++++ .../shared-file-systems-share-replication.rst | 4 +++ .../admin/shared-file-systems-snapshots.rst | 16 ++++++---- doc/source/user/create-and-manage-shares.rst | 29 ++++++++++--------- 10 files changed, 70 insertions(+), 25 deletions(-) diff --git a/api-ref/source/parameters.yaml b/api-ref/source/parameters.yaml index 65a23d72eb..adca6ce16f 100644 --- a/api-ref/source/parameters.yaml +++ b/api-ref/source/parameters.yaml @@ -123,7 +123,7 @@ snapshot_instance_id_path: type: string tenant_id: description: | - The UUID for the tenant for which you want to + The ID for the tenant for which you want to show, update, or delete quotas. This ID is different from the first tenant ID that you specify in the URI: That ID is for the administrative tenant. @@ -300,20 +300,20 @@ offset: type: integer project_id_6: description: | - The UUID of the project in which the share was + The ID of the project in which the share was created. Useful with ``all_tenants`` parameter. in: query required: false type: string project_id_messages: description: | - The UUID of the project for which the message was created. + The ID of the project for which the message was created. in: query required: false type: string request_id: description: | - The UUID of the request during which the message was created. + The ID of the request during which the message was created. in: query required: false type: string @@ -489,7 +489,7 @@ status_6: type: string user_id_query: description: | - The UUID of the user. If you specify this query parameter, + The ID of the user. If you specify this query parameter, you update the quotas for this user in the tenant. If you omit this parameter, you update the quotas for the project. in: query @@ -3345,6 +3345,13 @@ snapshot_name_request: in: body required: false type: string +snapshot_project_id: + description: | + ID of the project that the snapshot belongs to. + in: body + required: true + type: string + min_version: 2.17 snapshot_provider_location: description: | Provider location of the snapshot on the backend. @@ -3451,6 +3458,13 @@ snapshot_unmanage: in: body required: true type: string +snapshot_user_id: + description: | + ID of the user that the snapshot was created by. + in: body + required: true + type: string + min_version: 2.17 source_share_group_snapshot_id: description: | The source share group snapshot ID to create the diff --git a/api-ref/source/samples/snapshot-create-response.json b/api-ref/source/samples/snapshot-create-response.json index 1723e3e233..b22e4008e9 100644 --- a/api-ref/source/samples/snapshot-create-response.json +++ b/api-ref/source/samples/snapshot-create-response.json @@ -2,6 +2,7 @@ "snapshot": { "status": "creating", "share_id": "406ea93b-32e9-4907-a117-148b3945749f", + "user_id": "5c7bdb6eb0504d54a619acf8375c08ce", "name": "snapshot_share1", "links": [ { @@ -18,6 +19,7 @@ "share_proto": "NFS", "share_size": 1, "id": "6d221c1d-0200-461e-8d20-24b4776b9ddb", + "project_id": "cadd7139bc3148b8973df097c0911016", "size": 1 } } diff --git a/api-ref/source/samples/snapshot-manage-response.json b/api-ref/source/samples/snapshot-manage-response.json index 9978b10f82..5146e1c78e 100644 --- a/api-ref/source/samples/snapshot-manage-response.json +++ b/api-ref/source/samples/snapshot-manage-response.json @@ -9,6 +9,8 @@ "description": "description_of_managed_snapshot", "size": 1, "share_proto": "NFS", + "user_id": "5c7bdb6eb0504d54a619acf8375c08ce", + "project_id": "cadd7139bc3148b8973df097c0911016", "links": [ { "href": "http://127.0.0.1:8786/v2/907004508ef4447397ce6741a8f037c1/snapshots/22de7000-3a32-4fe1-bd0c-38d03f93dec3", diff --git a/api-ref/source/samples/snapshot-show-response.json b/api-ref/source/samples/snapshot-show-response.json index d5d9f92a15..87331d17dc 100644 --- a/api-ref/source/samples/snapshot-show-response.json +++ b/api-ref/source/samples/snapshot-show-response.json @@ -2,6 +2,7 @@ "snapshot": { "status": "available", "share_id": "406ea93b-32e9-4907-a117-148b3945749f", + "user_id": "5c7bdb6eb0504d54a619acf8375c08ce", "name": "snapshot_share1", "links": [ { @@ -18,6 +19,7 @@ "share_proto": "NFS", "share_size": 1, "id": "6d221c1d-0200-461e-8d20-24b4776b9ddb", + "project_id": "cadd7139bc3148b8973df097c0911016", "size": 1 } } diff --git a/api-ref/source/samples/snapshot-update-response.json b/api-ref/source/samples/snapshot-update-response.json index a888c9ccca..fb8bc0838b 100644 --- a/api-ref/source/samples/snapshot-update-response.json +++ b/api-ref/source/samples/snapshot-update-response.json @@ -3,6 +3,8 @@ "status": "available", "share_id": "406ea93b-32e9-4907-a117-148b3945749f", "name": "snapshot_Share1", + "user_id": "5c7bdb6eb0504d54a619acf8375c08ce", + "project_id": "cadd7139bc3148b8973df097c0911016", "links": [ { "href": "http://172.18.198.54:8786/v1/16e1ab15c35a457e9c2b2aa189f544e1/snapshots/6d221c1d-0200-461e-8d20-24b4776b9ddb", diff --git a/api-ref/source/samples/snapshots-list-detailed-response.json b/api-ref/source/samples/snapshots-list-detailed-response.json index b1360c0f57..1559d30cf8 100644 --- a/api-ref/source/samples/snapshots-list-detailed-response.json +++ b/api-ref/source/samples/snapshots-list-detailed-response.json @@ -3,6 +3,7 @@ { "status": "creating", "share_id": "d94a8548-2079-4be0-b21c-0a887acd31ca", + "user_id": "5c7bdb6eb0504d54a619acf8375c08ce", "name": "snapshot_My_share", "links": [ { @@ -19,11 +20,13 @@ "share_proto": "NFS", "share_size": 1, "id": "086a1aa6-c425-4ecd-9612-391a3b1b9375", + "project_id": "cadd7139bc3148b8973df097c0911016", "size": 1 }, { "status": "available", "share_id": "406ea93b-32e9-4907-a117-148b3945749f", + "user_id": "5c7bdb6eb0504d54a619acf8375c08ce", "name": "snapshot_share1", "links": [ { @@ -40,6 +43,7 @@ "share_proto": "NFS", "share_size": 1, "id": "6d221c1d-0200-461e-8d20-24b4776b9ddb", + "project_id": "cadd7139bc3148b8973df097c0911016", "size": 1 } ] diff --git a/api-ref/source/snapshots.inc b/api-ref/source/snapshots.inc index be34cd8f2a..5921fd89bd 100644 --- a/api-ref/source/snapshots.inc +++ b/api-ref/source/snapshots.inc @@ -126,6 +126,8 @@ Response parameters - share_proto: snapshot_share_protocol - share_size: snapshot_share_size - size: snapshot_size + - project_id: snapshot_project_id + - user_id: snapshot_user_id Response example ---------------- @@ -176,6 +178,8 @@ Response parameters - share_proto: snapshot_share_protocol - share_size: snapshot_share_size - size: snapshot_size + - project_id: snapshot_project_id + - user_id: snapshot_user_id Response example ---------------- @@ -241,6 +245,8 @@ Response parameters - share_size: snapshot_share_size - provider_location: snapshot_provider_location - size: snapshot_size + - project_id: snapshot_project_id + - user_id: snapshot_user_id Response example ---------------- @@ -306,6 +312,8 @@ Response parameters - share_size: snapshot_share_size - provider_location: snapshot_provider_location - size: snapshot_size + - project_id: snapshot_project_id + - user_id: snapshot_user_id Response example ---------------- @@ -499,6 +507,8 @@ Response parameters - share_proto: snapshot_share_protocol - share_size: snapshot_share_size - size: snapshot_size + - project_id: snapshot_project_id + - user_id: snapshot_user_id Response example ---------------- diff --git a/doc/source/admin/shared-file-systems-share-replication.rst b/doc/source/admin/shared-file-systems-share-replication.rst index 22647715be..1376fcfc23 100644 --- a/doc/source/admin/shared-file-systems-share-replication.rst +++ b/doc/source/admin/shared-file-systems-share-replication.rst @@ -453,11 +453,13 @@ of the share. Specify the share ID or name as a parameter. +-------------------+--------------------------------------+ | status | creating | | share_id | e496ed61-8f2e-436b-b299-32c3e90991cc | + | user_id | 5c7bdb6eb0504d54a619acf8375c08ce | | description | None | | created_at | 2016-03-29T21:14:03.000000 | | share_proto | NFS | | provider_location | None | | id | 06cdccaf-93a0-4e57-9a39-79fb1929c649 | + | project_id | cadd7139bc3148b8973df097c0911016 | | size | 1 | | share_size | 1 | | name | my_snapshot | @@ -477,11 +479,13 @@ Specify the snapshot ID or name as a parameter. +-------------------+--------------------------------------+ | status | available | | share_id | e496ed61-8f2e-436b-b299-32c3e90991cc | + | user_id | 5c7bdb6eb0504d54a619acf8375c08ce | | description | None | | created_at | 2016-03-29T21:14:03.000000 | | share_proto | NFS | | provider_location | None | | id | 06cdccaf-93a0-4e57-9a39-79fb1929c649 | + | project_id | cadd7139bc3148b8973df097c0911016 | | size | 1 | | share_size | 1 | | name | my_snapshot | diff --git a/doc/source/admin/shared-file-systems-snapshots.rst b/doc/source/admin/shared-file-systems-snapshots.rst index 4587c3a4a5..f64e88e690 100644 --- a/doc/source/admin/shared-file-systems-snapshots.rst +++ b/doc/source/admin/shared-file-systems-snapshots.rst @@ -28,13 +28,15 @@ Create a snapshot from the share: +-------------+--------------------------------------+ | status | creating | | share_id | aca648eb-8c03-4394-a5cc-755066b7eb66 | - | name | Snapshot1 | - | created_at | 2015-09-25T05:27:38.862040 | + | user_id | 5c7bdb6eb0504d54a619acf8375c08ce | + | description | Snapshot of Share1 | + | created_at | 2015-09-25T05:27:38.000000 | + | size | 1 | | share_proto | NFS | | id | 962e8126-35c3-47bb-8c00-f0ee37f42ddd | - | size | 1 | + | project_id | cadd7139bc3148b8973df097c0911016 | | share_size | 1 | - | description | Snapshot of Share1 | + | name | Snapshot1 | +-------------+--------------------------------------+ Update snapshot name or description if needed: @@ -53,17 +55,19 @@ Check that status of a snapshot is ``available``: +-------------+--------------------------------------+ | status | available | | share_id | aca648eb-8c03-4394-a5cc-755066b7eb66 | + | user_id | 5c7bdb6eb0504d54a619acf8375c08ce | | name | Snapshot1 | | created_at | 2015-09-25T05:27:38.000000 | | share_proto | NFS | | id | 962e8126-35c3-47bb-8c00-f0ee37f42ddd | + | project_id | cadd7139bc3148b8973df097c0911016 | | size | 1 | | share_size | 1 | | description | Snapshot of Share1 | +-------------+--------------------------------------+ -To restore your data from a snapshot, use :command:`manila create` with -key ``--snapshot-id``. This creates a new share from an +To create a copy of your data from a snapshot, use :command:`manila create` +with key ``--snapshot-id``. This creates a new share from an existing snapshot. Create a share from a snapshot and check whether it is available: diff --git a/doc/source/user/create-and-manage-shares.rst b/doc/source/user/create-and-manage-shares.rst index 0f1c6ff819..1cfb99bc1f 100644 --- a/doc/source/user/create-and-manage-shares.rst +++ b/doc/source/user/create-and-manage-shares.rst @@ -249,20 +249,21 @@ Create snapshot .. code-block:: console $ manila snapshot-create --name mysnapshot --description "My Manila snapshot" myshare - +-------------------+--------------------------------------+ - | Property | Value | - +-------------------+--------------------------------------+ - | status | creating | - | share_id | 8d8b854b-ec32-43f1-acc0-1b2efa7c3400 | - | description | My Manila snapshot | - | created_at | 2016-03-24T14:39:58.232844 | - | share_proto | NFS | - | provider_location | None | - | id | e744ca47-0931-4e81-9d9f-2ead7d7c1640 | - | size | 1 | - | share_size | 1 | - | name | mysnapshot | - +-------------------+--------------------------------------+ + +-------------+--------------------------------------+ + | Property | Value | + +-------------+--------------------------------------+ + | status | creating | + | share_id | 8d8b854b-ec32-43f1-acc0-1b2efa7c3400 | + | user_id | 5c7bdb6eb0504d54a619acf8375c08ce | + | description | My Manila snapshot | + | created_at | 2016-03-24T14:40:30.000000 | + | size | 1 | + | share_proto | NFS | + | id | e744ca47-0931-4e81-9d9f-2ead7d7c1640 | + | project_id | 907004508ef4447397ce6741a8f037c1 | + | share_size | 1 | + | name | mysnapshot | + +-------------+--------------------------------------+ #. List snapshots.