File: discovery.inc

package info (click to toggle)
glance 2%3A30.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 10,416 kB
  • sloc: python: 74,906; sh: 175; makefile: 111
file content (159 lines) | stat: -rw-r--r-- 3,045 bytes parent folder | download | duplicates (3)
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
.. -*- rst -*-

Image Service Info (Discovery)
******************************

General information
~~~~~~~~~~~~~~~~~~~

These calls allow you to discover useful information about what
services you may consume from a particular deployment of the
OpenStack Image Service.


.. _import-discovery-call:

Import methods and values discovery
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. rest_method::  GET /v2/info/import

Returns information concerning the constraints around image import in
the cloud in which the call is made, for example, supported container
formats, supported disk formats, maximum image size, etc.  This call
contains a ``import-methods`` field consisting of an array of string
identifiers indicating what import methods are supported in the cloud
in which the call is made.
*(Since Image API v2.6)*

.. note::
   In the Image API v2.6-2.8, this discovery call contains
   **only** the ``import-methods`` field.

Normal response codes: 200

Error response codes: 400, 401, 403


Request
-------

There are no request parameters.

This call does not allow a request body.


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

.. rest_parameters:: images-parameters.yaml

   - import-methods: import-methods


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

.. literalinclude:: samples/image-info-import-response.json
   :language: json


.. _store-discovery-call:

List stores
~~~~~~~~~~~

.. rest_method::  GET /v2/info/stores

A multiple store backend support is introduced in the Rocky release
as a part of the EXPERIMENTAL Image API v2.8.

In version 2.7 of the API, this call will return a 404 (Not Found).
Use the :ref:`API versions call <versions-call>` to determine
what API versions are available in your cloud.

Normal response codes: 200

Error response codes: 404


Request
-------

There are no request parameters.

This call does not allow a request body.


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

.. rest_parameters:: discovery-parameters.yaml

   - stores: stores


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

.. literalinclude:: samples/stores-list-response.json
   :language: json

Quota usage
~~~~~~~~~~~

.. rest_method:: GET /v2/info/usage

The user's quota and current usage are displayed, if enabled by
server-side configuration.

Normal response codes: 200

Request
-------

There are no request parameters.

This call does not allow a request body.

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

.. literalinclude:: samples/usage-response.json
   :language: json

List stores detail
~~~~~~~~~~~~~~~~~~

.. rest_method::  GET /v2/info/stores/detail

Lists all the backend stores, with detail, accessible to admins,
for non-admin user API will return bad request.

Normal response codes: 200

Error response codes: 403, 404


Request
-------

There are no request parameters.

This call does not allow a request body.


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

.. rest_parameters:: discovery-parameters.yaml

   - stores: stores-detail


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

.. literalinclude:: samples/stores-list-detail-response.json
   :language: json