summaryrefslogtreecommitdiff
path: root/api-ref
diff options
context:
space:
mode:
authorAbhishek Kekane <akekane@redhat.com>2022-08-22 07:54:28 +0000
committerAbhishek Kekane <akekane@redhat.com>2022-08-26 05:46:12 +0000
commitf09c338035a34889c07ef6817b0befb071e5285f (patch)
treed477bf15a58f3026d90a29ad09f110d37cc62a8d /api-ref
parent157a67798980be2bbbb58974096cb28168696141 (diff)
downloadglance-f09c338035a34889c07ef6817b0befb071e5285f.tar.gz
Add documentation for glance-download plugin
This patch adds documentation and API reference support for glance download plugin. Related blueprint glance-download-import Co-Authored-By: Victor Coutellier <victor.coutellier@gmail.com> Change-Id: Ie36232f3474d398a913025c8d408f08f879874d8
Diffstat (limited to 'api-ref')
-rw-r--r--api-ref/source/v2/images-import.inc39
-rw-r--r--api-ref/source/v2/samples/image-import-gd-request.json8
2 files changed, 44 insertions, 3 deletions
diff --git a/api-ref/source/v2/images-import.inc b/api-ref/source/v2/images-import.inc
index ec351d073..4e4af8775 100644
--- a/api-ref/source/v2/images-import.inc
+++ b/api-ref/source/v2/images-import.inc
@@ -18,11 +18,12 @@ the import methods available in the cloud in which you want to import
an image. Each of these methods is well defined (which is what makes
this process interoperable among different OpenStack clouds).
-Three import methods are defined:
+Four import methods are defined:
* ``glance-direct``
* ``web-download``
* ``copy-image``
+* ``glance-download``
.. note::
@@ -92,6 +93,17 @@ The ``copy-image`` workflow has **two** parts:
the import process. You will specify that you are using the
``copy-image`` import method in the body of the import call.
+The glance-download import method
+---------------------------------
+
+The ``glance-download`` workflow has **two** parts:
+
+1. Create an image record as described above.
+
+2. Issue the :ref:`Image Import <image-import-call>` call to complete
+ the import process. You will specify that you are using the
+ ``glance-download`` import method in the body of the import call.
+
.. _image-stage-call:
Stage binary image data
@@ -183,6 +195,10 @@ service by being posted to an accessible location with a URL that you know.
In the ``copy-image`` workflow, the data is made available to the Image
service by copying existing image data to the staging area.
+In the ``glance-download`` workflow, the data is made available to the Image
+service by fetching an image accessible from another glance service specified
+by a region name and an image id that you know.
+
Beginning with API version 2.8, an optional ``stores`` parameter may be added
to the body request. When present, it contains the list of backing store
identifiers to import the image binary data to. If at least one store
@@ -289,11 +305,22 @@ If you are using the ``copy-image`` import method:
permission to copy unowned images. Consult your cloud's local
documentation for details.
+If you are using the ``glance-download`` import method:
+
+- The image status must be ``queued``. (This indicates that no image data
+ has yet been associated with the image.)
+
+- The body of your request must indicate that you are using the
+ ``glance-download`` import method, and it must contain the region name of the
+ remote openstack region and the image id to fetch.
+ You might optionaly set the service interface name (public by default) to
+ request.
+
**Synchronous Postconditions**
- With correct permissions, you can see the image status as
- ``importing`` (only for glance-direct and web-download import methods)
- through API calls. (Be aware, however, that if the import
+ ``importing`` (only for glance-direct, web-download and glance-download
+ import methods) through API calls. (Be aware, however, that if the import
process completes before you make the API call, the image may already
show as ``active``.)
@@ -335,3 +362,9 @@ Request Example - copy-image import method
.. literalinclude:: samples/image-import-c-i-request.json
:language: json
+
+Request Example - glance-download import method
+-----------------------------------------------
+
+.. literalinclude:: samples/image-import-gd-request.json
+ :language: json
diff --git a/api-ref/source/v2/samples/image-import-gd-request.json b/api-ref/source/v2/samples/image-import-gd-request.json
new file mode 100644
index 000000000..c0d77d2a6
--- /dev/null
+++ b/api-ref/source/v2/samples/image-import-gd-request.json
@@ -0,0 +1,8 @@
+{
+ "method": {
+ "name": "glance-download",
+ "glance_image_id": "c4705b36-b281-40f6-a01d-bf98883ead8e",
+ "glance_region": "REGION2",
+ "glance_service_interface": "public"
+ }
+}