Curl examples from the Image API v2 document should go in User Guide
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openstack-manuals |
Fix Released
|
Medium
|
Sharat Sharma |
Bug Description
Appendix A: cURL Examples
=======
This section is intended to provide a series of commands a typical
client of the API might use to create and modify an image.
These commands assume the implementation of the v2 Images API is using
the OpenStack Identity Service for authentication and authorization. The
X-Auth-Token header is used to communicate the authentication token
provided by that separate identity service.
The strings ``$OS_IMAGE_URL`` and ``$OS_AUTH_TOKEN`` represent variables
defined in the client's environment. ``$OS_IMAGE_URL`` is the full path
to your image service endpoint, for example, ``http://
``$OS_AUTH_TOKEN`` represents an auth token generated by the OpenStack
Identity Service, for example, ``6583fb17c27b4
Create an Image
---------------
::
% curl -i -X POST -H "X-Auth-Token: $OS_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Ubuntu 12.10", "tags": ["ubuntu", "12.10", "quantal"]}' \
::
HTTP/1.1 201 Created
Content-Length: 451
Content-Type: application/json; charset=UTF-8
Location: http://
Date: Tue, 14 Aug 2012 00:46:48 GMT
{
"id": "7b97f37c-
"name": "Ubuntu 12.10",
"status": "queued",
"tags": ["ubuntu", "12.10", "quantal"],
"file": "/v2/images/
"self": "/v2/images/
"schema": "/v2/schemas/image"
}
Update the Image
----------------
::
% curl -i -X PATCH -H "X-Auth-Token: $OS_AUTH_TOKEN" \
-H "Content-Type: application/
-d '[{"op": "add", "path": "/login-user", "value": "root"}]' \
::
HTTP/1.1 200 OK
Content-Length: 477
Content-Type: application/json; charset=UTF-8
Date: Fri, 15 Nov 2013 00:46:50 GMT
{
"id": "7b97f37c-
"name": "Ubuntu 12.10",
"status": "queued",
"tags": ["ubuntu", "12.10", "quantal"],
"file": "/v2/images/
"self": "/v2/images/
"schema": "/v2/schemas/image"
}
Upload Binary Image Data
-------
::
% curl -i -X PUT -H "X-Auth-Token: $OS_AUTH_TOKEN" \
-H "Content-Type: application/
-d @/home/
::
HTTP/1.1 100 Continue
HTTP/1.1 201 Created
Content-Length: 0
Date: Tue, 14 Aug 2012 00:46:59 GMT
Download Binary Image Data
-------
::
% curl -i -X GET -H "X-Auth-Token: $OS_AUTH_TOKEN" \
::
HTTP/1.1 200 OK
Content-Type: application/
Content-Md5: 912ec803b2ce49e
Transfer-
Date: Thu, 14 Aug 2012 00:47:10 GMT
Delete Image
------------
::
% curl -i -X DELETE -H "X-Auth-Token: $OS_AUTH_TOKEN" \
::
HTTP/1.1 204 No Content
Content-Length: 0
Date: Tue, 14 Aug 2012 00:47:12 GMT
Changed in openstack-manuals: | |
milestone: | none → kilo |
status: | New → Triaged |
importance: | Undecided → Medium |
tags: | added: user-guide |
Changed in openstack-manuals: | |
milestone: | kilo → liberty |
Changed in openstack-manuals: | |
assignee: | nobody → jelly (coding1314) |
Changed in openstack-manuals: | |
assignee: | jelly (coding1314) → inwinSTACK (inwinstack) |
Changed in openstack-manuals: | |
assignee: | inwinSTACK (inwinstack) → nobody |
Changed in openstack-manuals: | |
assignee: | nobody → Sai Kiran (saikiran) |
Changed in openstack-manuals: | |
milestone: | liberty → mitaka |
Changed in openstack-manuals: | |
assignee: | Sai Kiran (saikiran) → Sharat Sharma (sharat-sharma) |
Changed in openstack-manuals: | |
status: | Triaged → Confirmed |
status: | Confirmed → In Progress |
Hi Tom and Anne.. Is the bug description supposed to be copy pasted as in to the user-guide..?