File: snapshot-manage.inc

package info (click to toggle)
cinder 2%3A17.0.1-1%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 36,796 kB
  • sloc: python: 395,277; pascal: 2,085; sh: 585; makefile: 111; xml: 26; sql: 5
file content (179 lines) | stat: -rw-r--r-- 3,640 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
.. -*- rst -*-

Snapshot manage extension (manageable_snapshots)
================================================

Creates or lists snapshots by using existing storage instead of allocating new
storage.


Manage an existing snapshot
~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. rest_method::  POST /v3/{project_id}/manageable_snapshots

Creates a snapshot by using existing storage rather than allocating new
storage.

The caller must specify a reference to an existing storage volume
in the ref parameter in the request. Although each storage driver
might interpret this reference differently, the driver should
accept a reference structure that contains either a source-id
or source-name element, if possible.

The API chooses the size of the snapshot by rounding up the size of
the existing snapshot to the next gibibyte (GiB).


Response codes
--------------

.. rest_status_code:: success ../status.yaml

   - 202


Request
-------

.. rest_parameters:: parameters.yaml

   - project_id: project_id_path
   - snapshot: snapshot_obj
   - description: description_snap
   - metadata: metadata_snap
   - name: name_snap
   - ref: ref
   - volume_id: volume_id

Request Example
---------------

.. literalinclude:: ./samples/snapshot_manage_extensions/snapshot-manage-request.json
   :language: javascript


Response
--------

.. rest_parameters:: parameters.yaml

  - snapshot: snapshot_obj
  - status: status_snap
  - size: size
  - metadata: metadata_snap
  - name: name_snap
  - volume_id: volume_id
  - created_at: created_at
  - description: description_snap_req
  - id: id
  - updated_at: updated_at

Response Example
----------------

.. literalinclude:: ./samples/snapshot_manage_extensions/snapshot-manage-response.json
   :language: javascript


List summary of snapshots available to manage
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. rest_method::  GET /v3/{project_id}/manageable_snapshots

Search a volume backend and list summary of snapshots which are available to
manage.

Response codes
--------------

.. rest_status_code:: success ../status.yaml

   - 200


Request
-------

.. rest_parameters:: parameters.yaml

   - project_id: project_id_path
   - sort: sort
   - offset: offset
   - limit: limit
   - marker: marker
   - host: host_query


Response
--------

.. rest_parameters:: parameters.yaml

   - manageable-snapshots: manageable-snapshots
   - source_reference: source_reference
   - safe_to_manage: safe_to_manage
   - reference: reference
   - source-name: source-name
   - size: size


Response Example
----------------

.. literalinclude:: ./samples/snapshot-manage-list-response.json
   :language: javascript



List detail of snapshots available to manage
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. rest_method::  GET /v3/{project_id}/manageable_snapshots/detail

Search a volume backend and list detail of snapshots which are available to
manage.


Response codes
--------------

.. rest_status_code:: success ../status.yaml

   - 200


Request
-------

.. rest_parameters:: parameters.yaml

   - project_id: project_id_path
   - sort: sort
   - offset: offset
   - limit: limit
   - marker: marker
   - host: host_query


Response
--------

.. rest_parameters:: parameters.yaml

   - manageable-snapshots: manageable-snapshots
   - cinder_id: cinder_id
   - source_reference: source_reference
   - safe_to_manage: safe_to_manage
   - reason_not_safe: reason_not_safe
   - reference: reference
   - source-name: source-name
   - size: size
   - extra_info: extra_info


Response Example
----------------

.. literalinclude:: ./samples/snapshot-manage-list-detail-response.json
   :language: javascript