File: volume-type-access.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 (116 lines) | stat: -rw-r--r-- 2,265 bytes parent folder | download | duplicates (4)
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
.. -*- rst -*-

Volume type access (volumes)
============================

Private volume type access to project.

By default, volumes types are public. To create a private volume
type, set the ``is_public`` boolean field to ``false`` at volume
type creation time. To control access to a private volume type,
user needs to add a project to or remove a project from the volume
type. Private volume types without projects are only accessible by
users with the administrative role and context.


Add private volume type access
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. rest_method::  POST /v2/{project_id}/types/{volume_type}/action

Adds private volume type access to a project.

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

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

   - 202


Request
-------

.. rest_parameters:: parameters.yaml

   - project: project
   - project_id: project_id_path
   - volume_type: volume_type_access

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

.. literalinclude:: ./samples/volume-type-access-add-request.json
   :language: javascript


Remove private volume type access
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. rest_method::  POST /v2/{project_id}/types/{volume_type}/action

Removes private volume type access from a project.

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

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

   - 202


Request
-------

.. rest_parameters:: parameters.yaml

   - project: project
   - project_id: project_id_path
   - volume_type: volume_type_access

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

.. literalinclude:: ./samples/volume-type-access-delete-request.json
   :language: javascript


List private volume type access details
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. rest_method::
   GET /v2/{project_id}/types/{volume_type}/os-volume-type-access

Lists project IDs that have access to private volume type.

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

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

   - 200


Request
-------

.. rest_parameters:: parameters.yaml

   - project_id: project_id_path
   - volume_type: volume_type_access


Response Parameters
-------------------

.. rest_parameters:: parameters.yaml

   - project_id: project_id



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

.. literalinclude:: ./samples/volume-type-access-list-response.json
   :language: javascript