root / docs / compute-api-guide.rst @ c4dccd8a
History | View | Annotate | Download (94.3 kB)
1 | 20394434 | Constantinos Venetsanopoulos | .. _compute-api-guide: |
---|---|---|---|
2 | 1837aa54 | Giorgos Verigakis | |
3 | c3945370 | Vangelis Koukis | API Guide |
4 | c3945370 | Vangelis Koukis | ********* |
5 | c3945370 | Vangelis Koukis | |
6 | 3458183d | Constantinos Venetsanopoulos | `Cyclades <cyclades.html>`_ is the Compute Service of `Synnefo |
7 | a3d2b515 | Stavros Sachtouris | <http://www.synnefo.org>`_. The Cyclades/Compute API complies with |
8 | a3d2b515 | Stavros Sachtouris | `OpenStack Compute <http://docs.openstack.org/api/openstack-compute/2/content>`_ |
9 | a3d2b515 | Stavros Sachtouris | with custom extensions when needed. |
10 | c3945370 | Vangelis Koukis | |
11 | 3b1963eb | Stavros Sachtouris | This document's goals are: |
12 | c3945370 | Vangelis Koukis | |
13 | 3458183d | Constantinos Venetsanopoulos | * Define the Cyclades/Compute REST API |
14 | 3458183d | Constantinos Venetsanopoulos | * Clarify the differences between Cyclades and OpenStack/Compute |
15 | 3b1963eb | Stavros Sachtouris | |
16 | 3458183d | Constantinos Venetsanopoulos | Users and developers who wish to access Cyclades through its REST API are |
17 | a3d2b515 | Stavros Sachtouris | advised to use the |
18 | a3d2b515 | Stavros Sachtouris | `kamaki <http://www.synnefo.org/docs/kamaki/latest/index.html>`_ command-line |
19 | 3458183d | Constantinos Venetsanopoulos | client and associated python library, instead of making direct calls. |
20 | 2cd1c00a | Giorgos Verigakis | |
21 | 2cd1c00a | Giorgos Verigakis | Overview |
22 | 2cd1c00a | Giorgos Verigakis | ======== |
23 | 2cd1c00a | Giorgos Verigakis | |
24 | 3458183d | Constantinos Venetsanopoulos | * OpenStack does not define if requests for invalid URLs should return 404 or a |
25 | 3458183d | Constantinos Venetsanopoulos | * Fault. We return a BadRequest Fault. |
26 | 3458183d | Constantinos Venetsanopoulos | * OpenStack does not define if requests with a wrong HTTP method should return |
27 | 3458183d | Constantinos Venetsanopoulos | * 405 or a Fault. We return a BadRequest Fault. |
28 | 2cd1c00a | Giorgos Verigakis | |
29 | 2cd1c00a | Giorgos Verigakis | General API Information |
30 | 2cd1c00a | Giorgos Verigakis | ======================= |
31 | 2cd1c00a | Giorgos Verigakis | |
32 | 2cd1c00a | Giorgos Verigakis | Authentication |
33 | 2cd1c00a | Giorgos Verigakis | -------------- |
34 | 2cd1c00a | Giorgos Verigakis | |
35 | e31f6f23 | Stavros Sachtouris | All requests use the same authentication method: an ``X-Auth-Token`` header is |
36 | e31f6f23 | Stavros Sachtouris | passed to the servive, which is used to authenticate the user and retrieve user |
37 | e31f6f23 | Stavros Sachtouris | related information. No other user details are passed through HTTP. |
38 | 2cd1c00a | Giorgos Verigakis | |
39 | 2cd1c00a | Giorgos Verigakis | Efficient Polling with the Changes-Since Parameter |
40 | 2cd1c00a | Giorgos Verigakis | -------------------------------------------------- |
41 | 2cd1c00a | Giorgos Verigakis | |
42 | a5ec880a | Stavros Sachtouris | * Effectively limit support of the changes-since parameter in **List Servers** |
43 | e31f6f23 | Stavros Sachtouris | and **List Images**. |
44 | e31f6f23 | Stavros Sachtouris | |
45 | cfdbd784 | Stavros Sachtouris | * Assume that garbage collection of deleted servers will only affect servers |
46 | e31f6f23 | Stavros Sachtouris | deleted ``POLL_TIME`` seconds (default: 3600) in the past or earlier. Else |
47 | e31f6f23 | Stavros Sachtouris | loose the information of a server getting deleted. |
48 | e31f6f23 | Stavros Sachtouris | |
49 | cfdbd784 | Stavros Sachtouris | * Images do not support a deleted state, so deletions cannot be tracked. |
50 | 2cd1c00a | Giorgos Verigakis | |
51 | e31f6f23 | Stavros Sachtouris | Limitations |
52 | e31f6f23 | Stavros Sachtouris | ----------- |
53 | 2cd1c00a | Giorgos Verigakis | |
54 | e31f6f23 | Stavros Sachtouris | * Version MIME type and vesionless requests are not currently supported. |
55 | 2cd1c00a | Giorgos Verigakis | |
56 | e31f6f23 | Stavros Sachtouris | * Cyclades only supports JSON Requests and JSON/XML Responses. XML Requests are |
57 | e31f6f23 | Stavros Sachtouris | currently not supported. |
58 | 2cd1c00a | Giorgos Verigakis | |
59 | e31f6f23 | Stavros Sachtouris | * Optional content compression support is currently not supported. |
60 | 2cd1c00a | Giorgos Verigakis | |
61 | e31f6f23 | Stavros Sachtouris | * To prevent abuse, HTTP sessions have a timeout of 20 seconds before being |
62 | e31f6f23 | Stavros Sachtouris | closed. |
63 | 2cd1c00a | Giorgos Verigakis | |
64 | e31f6f23 | Stavros Sachtouris | * Full URI references and ``self`` and ``bookmark`` links are not supported. |
65 | 2cd1c00a | Giorgos Verigakis | |
66 | e31f6f23 | Stavros Sachtouris | * Pagination is currently not supported. |
67 | 2cd1c00a | Giorgos Verigakis | |
68 | e31f6f23 | Stavros Sachtouris | * Cached responses are currently not supported. |
69 | e31f6f23 | Stavros Sachtouris | |
70 | e31f6f23 | Stavros Sachtouris | * Limits are currently not supported. |
71 | e31f6f23 | Stavros Sachtouris | |
72 | e31f6f23 | Stavros Sachtouris | * Extensions are currently not supported. |
73 | 2cd1c00a | Giorgos Verigakis | |
74 | 2cd1c00a | Giorgos Verigakis | |
75 | 2cd1c00a | Giorgos Verigakis | API Operations |
76 | 2cd1c00a | Giorgos Verigakis | ============== |
77 | 2cd1c00a | Giorgos Verigakis | |
78 | a3d2b515 | Stavros Sachtouris | .. rubric:: Servers |
79 | a3d2b515 | Stavros Sachtouris | |
80 | a3d2b515 | Stavros Sachtouris | ================================================== ========================================= ====== ======== ========== |
81 | a3d2b515 | Stavros Sachtouris | Description URI Method Cyclades OS/Compute |
82 | a3d2b515 | Stavros Sachtouris | ================================================== ========================================= ====== ======== ========== |
83 | a3d2b515 | Stavros Sachtouris | `List <#list-servers>`_ ``/servers`` GET ✔ ✔ |
84 | a3d2b515 | Stavros Sachtouris | \ ``/servers/detail`` GET ✔ ✔ |
85 | a3d2b515 | Stavros Sachtouris | `Create <#create-server>`_ ``/servers`` POST ✔ ✔ |
86 | a3d2b515 | Stavros Sachtouris | `Get Stats <#get-server-stats>`_ ``/servers/<server-id>/stats`` GET ✔ **✘** |
87 | a3d2b515 | Stavros Sachtouris | `Get Diagnostics <#get-server-diagnostics>`_ ``/servers/<server-id>/diagnostics`` GET ✔ **✘** |
88 | a3d2b515 | Stavros Sachtouris | `Get Details <#get-server-details>`_ ``/servers/<server id>`` GET ✔ ✔ |
89 | a3d2b515 | Stavros Sachtouris | `Rename <#rename-server>`_ ``/servers/<server id>`` PUT ✔ ✔ |
90 | a3d2b515 | Stavros Sachtouris | `Delete <#delete-server>`_ ``/servers/<server id>`` DELETE ✔ ✔ |
91 | a3d2b515 | Stavros Sachtouris | `List Addresses <#list-server-addresses>`_ ``/servers/<server id>/ips`` GET ✔ ✔ |
92 | a3d2b515 | Stavros Sachtouris | `Get NICs by Net <#get-server-nics-by-network>`_ ``/servers/<server id>/ips/<network id>`` GET ✔ ✔ |
93 | a3d2b515 | Stavros Sachtouris | `List Metadata <#list-server-metadata>`_ ``/servers/<server-id>/metadata`` GET ✔ ✔ |
94 | a3d2b515 | Stavros Sachtouris | `Update Metadata <#set-update-server-metadata>`_ ``/servers/<server-id>/metadata`` PUT **✘** ✔ |
95 | a3d2b515 | Stavros Sachtouris | \ ``/servers/<server-id>/metadata`` POST ✔ ✔ |
96 | a3d2b515 | Stavros Sachtouris | `Get Meta Item <#get-server-metadata-item>`_ ``/servers/<server-id>/metadata/<key>`` GET ✔ ✔ |
97 | a3d2b515 | Stavros Sachtouris | `Update Meta Item <#update-server-metadata-item>`_ ``/servers/<server-id>/metadata/<key>`` PUT ✔ ✔ |
98 | a3d2b515 | Stavros Sachtouris | `Delete Meta Item <#delete-server-metadata>`_ ``/servers/<server-id>/metadata/<key>`` DELETE ✔ ✔ |
99 | a3d2b515 | Stavros Sachtouris | `Actions <#server-actions>`_ ``servers/<server id>/action`` POST ✔ ✔ |
100 | a3d2b515 | Stavros Sachtouris | ================================================== ========================================= ====== ======== ========== |
101 | a3d2b515 | Stavros Sachtouris | |
102 | a3d2b515 | Stavros Sachtouris | .. rubric:: Flavors |
103 | a3d2b515 | Stavros Sachtouris | |
104 | a3d2b515 | Stavros Sachtouris | ==================================== ======================== ====== ======== ========== |
105 | a3d2b515 | Stavros Sachtouris | Description URI Method Cyclades OS/Compute |
106 | a3d2b515 | Stavros Sachtouris | ==================================== ======================== ====== ======== ========== |
107 | a3d2b515 | Stavros Sachtouris | `List <#list-flavors>`_ ``/flavors`` GET ✔ ✔ |
108 | a3d2b515 | Stavros Sachtouris | \ ``/flavors/detail`` GET ✔ **✘** |
109 | a3d2b515 | Stavros Sachtouris | `Get details <#get-flavor-details>`_ ``/flavors/<flavor-id>`` GET ✔ ✔ |
110 | a3d2b515 | Stavros Sachtouris | ==================================== ======================== ====== ======== ========== |
111 | a3d2b515 | Stavros Sachtouris | |
112 | a3d2b515 | Stavros Sachtouris | .. rubric:: Images |
113 | a3d2b515 | Stavros Sachtouris | |
114 | a3d2b515 | Stavros Sachtouris | =========================================== ===================================== ====== ======== ========== |
115 | a3d2b515 | Stavros Sachtouris | Description URI Method Cyclades OS/Compute |
116 | a3d2b515 | Stavros Sachtouris | =========================================== ===================================== ====== ======== ========== |
117 | a3d2b515 | Stavros Sachtouris | `List <#list-images>`_ ``/images`` GET ✔ ✔ |
118 | a3d2b515 | Stavros Sachtouris | \ ``/images/detail`` GET ✔ ✔ |
119 | a3d2b515 | Stavros Sachtouris | `Get details <#get-image-details>`_ ``/images/<image-id>`` GET ✔ ✔ |
120 | a3d2b515 | Stavros Sachtouris | `Delete <#delete-image>`_ ``/images/<image id>`` DELETE ✔ ✔ |
121 | a3d2b515 | Stavros Sachtouris | `List Metadata <#list-image-metadata>`_ ``/images/<image-id>/metadata`` GET ✔ ✔ |
122 | a3d2b515 | Stavros Sachtouris | `Update Metadata <#update-image-metadata>`_ ``/images/<image-id>/metadata`` POST ✔ ✔ |
123 | a3d2b515 | Stavros Sachtouris | \ ``/images/<image-id>/metadata`` PUT **✘** ✔ |
124 | a3d2b515 | Stavros Sachtouris | `Get Meta Item <#get-image-metadata>`_ ``/image/<image-id>/metadata/<key>`` GET ✔ ✔ |
125 | a3d2b515 | Stavros Sachtouris | `Update Metadata <#update-image-metadata>`_ ``/images/<image-id>/metadata/<key>`` PUT ✔ ✔ |
126 | a3d2b515 | Stavros Sachtouris | `Delete Metadata <#delete-image-metadata>`_ ``/images/<image-id>/metadata/<key>`` DELETE ✔ ✔ |
127 | a3d2b515 | Stavros Sachtouris | =========================================== ===================================== ====== ======== ========== |
128 | 8a86499c | Stavros Sachtouris | |
129 | 2cd1c00a | Giorgos Verigakis | List Servers |
130 | a3d2b515 | Stavros Sachtouris | ------------ |
131 | 2cd1c00a | Giorgos Verigakis | |
132 | 02242022 | Stavros Sachtouris | List all virtual servers owned by the user. |
133 | 02242022 | Stavros Sachtouris | |
134 | 02242022 | Stavros Sachtouris | .. rubric:: Request |
135 | 02242022 | Stavros Sachtouris | |
136 | 3b1963eb | Stavros Sachtouris | =================== ====== ======== ========== |
137 | 68386e00 | Stavros Sachtouris | URI Method Cyclades OS/Compute |
138 | 3b1963eb | Stavros Sachtouris | =================== ====== ======== ========== |
139 | 3b1963eb | Stavros Sachtouris | ``/servers`` GET ✔ ✔ |
140 | e74edfbb | Stavros Sachtouris | ``/servers/detail`` GET ✔ ✔ |
141 | 3b1963eb | Stavros Sachtouris | =================== ====== ======== ========== |
142 | 3b1963eb | Stavros Sachtouris | |
143 | 1d346984 | Stavros Sachtouris | * Both requests return a list of servers. The first returns just ``id``, |
144 | 1d346984 | Stavros Sachtouris | ``name`` and ``links``, while the second returns the full collections of |
145 | 1d346984 | Stavros Sachtouris | server attributes. |
146 | 3b1963eb | Stavros Sachtouris | |
147 | 02242022 | Stavros Sachtouris | | |
148 | 02242022 | Stavros Sachtouris | ============== ========================= ======== ========== |
149 | 68386e00 | Stavros Sachtouris | Request Header Value Cyclades OS/Compute |
150 | 02242022 | Stavros Sachtouris | ============== ========================= ======== ========== |
151 | 02242022 | Stavros Sachtouris | X-Auth-Token User authentication token required required |
152 | 02242022 | Stavros Sachtouris | ============== ========================= ======== ========== |
153 | 02242022 | Stavros Sachtouris | |
154 | 02242022 | Stavros Sachtouris | | |
155 | 3b1963eb | Stavros Sachtouris | ================= =================================== ======== ========== |
156 | 68386e00 | Stavros Sachtouris | Request Parameter Value Cyclades OS/Compute |
157 | 3b1963eb | Stavros Sachtouris | ================= =================================== ======== ========== |
158 | ea24170f | Stavros Sachtouris | json Respond in json default **✘** |
159 | ea24170f | Stavros Sachtouris | xml Respond in xml ✔ **✘** |
160 | 3b1963eb | Stavros Sachtouris | changes-since Servers delete since that timestamp ✔ ✔ |
161 | 3b1963eb | Stavros Sachtouris | image Image reference **✘** ✔ |
162 | 3b1963eb | Stavros Sachtouris | flavor VM flavor reference **✘** ✔ |
163 | 3b1963eb | Stavros Sachtouris | server Server flavor reference **✘** ✔ |
164 | 3b1963eb | Stavros Sachtouris | status Server status **✘** ✔ |
165 | 3b1963eb | Stavros Sachtouris | marker Last list last ID **✘** ✔ |
166 | 3b1963eb | Stavros Sachtouris | limit Page size **✘** ✔ |
167 | 3b1963eb | Stavros Sachtouris | ================= =================================== ======== ========== |
168 | 3b1963eb | Stavros Sachtouris | |
169 | a5ec880a | Stavros Sachtouris | * **json** and **xml** parameters are mutually exclusive. If none supported, |
170 | a5ec880a | Stavros Sachtouris | the response will be formated in json. |
171 | ea24170f | Stavros Sachtouris | |
172 | 4935e468 | Stavros Sachtouris | * **status** refers to the `server status <#status-ref>`_ |
173 | 4935e468 | Stavros Sachtouris | |
174 | ea24170f | Stavros Sachtouris | * **changes-since** must be an ISO8601 date string |
175 | ea24170f | Stavros Sachtouris | |
176 | 02242022 | Stavros Sachtouris | .. rubric:: Response |
177 | 3b1963eb | Stavros Sachtouris | |
178 | 3b1963eb | Stavros Sachtouris | =========================== ===================== |
179 | 3b1963eb | Stavros Sachtouris | Return Code Description |
180 | 3b1963eb | Stavros Sachtouris | =========================== ===================== |
181 | 3b1963eb | Stavros Sachtouris | 200 (OK) Request succeeded |
182 | 3b1963eb | Stavros Sachtouris | 304 (No servers since date) Can be returned if ``changes-since`` is given |
183 | 3b1963eb | Stavros Sachtouris | 400 (Bad Request) Invalid or malformed ``changes-since`` parameter |
184 | 3b1963eb | Stavros Sachtouris | 401 (Unauthorized) Missing or expired user token |
185 | ea24170f | Stavros Sachtouris | 403 (Forbidden) User is not allowed to perform this operation |
186 | a5ec880a | Stavros Sachtouris | 500 (Internal Server Error) The request cannot be completed because of an |
187 | e7f266c3 | Stavros Sachtouris | \ internal error |
188 | 3b1963eb | Stavros Sachtouris | 503 (Service Unavailable) The server is not currently available |
189 | 3b1963eb | Stavros Sachtouris | =========================== ===================== |
190 | 3b1963eb | Stavros Sachtouris | |
191 | 02242022 | Stavros Sachtouris | | |
192 | 02242022 | Stavros Sachtouris | |
193 | 02242022 | Stavros Sachtouris | Response body contents:: |
194 | 3b1963eb | Stavros Sachtouris | |
195 | 02242022 | Stavros Sachtouris | servers: [ |
196 | 02242022 | Stavros Sachtouris | { |
197 | 02242022 | Stavros Sachtouris | <server attribute>: <value>, |
198 | 02242022 | Stavros Sachtouris | ... |
199 | 02242022 | Stavros Sachtouris | }, ... |
200 | 02242022 | Stavros Sachtouris | ] |
201 | 0e214bbe | Stavros Sachtouris | |
202 | a3d2b515 | Stavros Sachtouris | The server attributes are listed `here <#server-ref>`_ |
203 | 1d346984 | Stavros Sachtouris | |
204 | 1d346984 | Stavros Sachtouris | *Example List Servers: JSON (regular)* |
205 | c3945370 | Vangelis Koukis | |
206 | c3945370 | Vangelis Koukis | .. code-block:: javascript |
207 | 2cd1c00a | Giorgos Verigakis | |
208 | a3d2b515 | Stavros Sachtouris | GET https://example.org/compute/v2.0/servers |
209 | a3d2b515 | Stavros Sachtouris | |
210 | a3d2b515 | Stavros Sachtouris | { |
211 | a3d2b515 | Stavros Sachtouris | "servers": [ |
212 | 1d346984 | Stavros Sachtouris | { |
213 | 1d346984 | Stavros Sachtouris | "links": [ |
214 | a3d2b515 | Stavros Sachtouris | { |
215 | a3d2b515 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/servers/42", |
216 | a3d2b515 | Stavros Sachtouris | "rel": "self" |
217 | a3d2b515 | Stavros Sachtouris | }, { |
218 | a3d2b515 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/servers/42", |
219 | a3d2b515 | Stavros Sachtouris | "rel": "bookmark" |
220 | a3d2b515 | Stavros Sachtouris | } |
221 | 1d346984 | Stavros Sachtouris | ], |
222 | 1d346984 | Stavros Sachtouris | "id": "42", |
223 | 1d346984 | Stavros Sachtouris | "name": "My Server", |
224 | 1d346984 | Stavros Sachtouris | }, { |
225 | 1d346984 | Stavros Sachtouris | "links": [ |
226 | a3d2b515 | Stavros Sachtouris | { |
227 | a3d2b515 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/servers/43", |
228 | a3d2b515 | Stavros Sachtouris | "rel": "self" |
229 | a3d2b515 | Stavros Sachtouris | }, { |
230 | a3d2b515 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/servers/43", |
231 | a3d2b515 | Stavros Sachtouris | "rel": "bookmark" |
232 | a3d2b515 | Stavros Sachtouris | } |
233 | 1d346984 | Stavros Sachtouris | ], |
234 | a3d2b515 | Stavros Sachtouris | "id": "84", |
235 | 1d346984 | Stavros Sachtouris | "name": "My Server", |
236 | 1d346984 | Stavros Sachtouris | } |
237 | 1d346984 | Stavros Sachtouris | ] |
238 | a3d2b515 | Stavros Sachtouris | } |
239 | 1d346984 | Stavros Sachtouris | |
240 | 1d346984 | Stavros Sachtouris | *Example List Servers: JSON (detail)* |
241 | 1d346984 | Stavros Sachtouris | |
242 | 1d346984 | Stavros Sachtouris | .. code-block:: javascript |
243 | 1d346984 | Stavros Sachtouris | |
244 | a3d2b515 | Stavros Sachtouris | { |
245 | a3d2b515 | Stavros Sachtouris | "servers": [ |
246 | 45e274fc | Stavros Sachtouris | { |
247 | a3d2b515 | Stavros Sachtouris | "addresses": [ |
248 | a3d2b515 | Stavros Sachtouris | "2718": [ |
249 | a3d2b515 | Stavros Sachtouris | { |
250 | a3d2b515 | Stavros Sachtouris | "version": 6, |
251 | a3d2b515 | Stavros Sachtouris | "addr": "2001:443:2dfc:1232:a810:3cf:fe9b:21ab", |
252 | a3d2b515 | Stavros Sachtouris | "OS-EXT-IPS:type": "fixed" |
253 | a3d2b515 | Stavros Sachtouris | } |
254 | a3d2b515 | Stavros Sachtouris | ], |
255 | a3d2b515 | Stavros Sachtouris | "2719": [ |
256 | a3d2b515 | Stavros Sachtouris | { |
257 | a3d2b515 | Stavros Sachtouris | "version": 4, |
258 | a3d2b515 | Stavros Sachtouris | "addr": "192.168.1.2", |
259 | a3d2b515 | Stavros Sachtouris | "OS-EXT-IPS:type": "floating" |
260 | a3d2b515 | Stavros Sachtouris | } |
261 | a3d2b515 | Stavros Sachtouris | ] |
262 | a3d2b515 | Stavros Sachtouris | ], |
263 | 45e274fc | Stavros Sachtouris | "attachments": [ |
264 | 45e274fc | Stavros Sachtouris | { |
265 | a3d2b515 | Stavros Sachtouris | "id": "18", |
266 | a3d2b515 | Stavros Sachtouris | "network_id": "2718", |
267 | a3d2b515 | Stavros Sachtouris | "mac_address": "aa:01:02:6c:34:ab", |
268 | 45e274fc | Stavros Sachtouris | "firewallProfile": "DISABLED", |
269 | a3d2b515 | Stavros Sachtouris | "ipv4": "", |
270 | a3d2b515 | Stavros Sachtouris | "ipv6": "2001:443:2dfc:1232:a810:3cf:fe9b:21ab" |
271 | a3d2b515 | Stavros Sachtouris | "OS-EXT-IPS:type": "fixed" |
272 | a3d2b515 | Stavros Sachtouris | }, { |
273 | a3d2b515 | Stavros Sachtouris | "id": "19", |
274 | a3d2b515 | Stavros Sachtouris | "network_id": "2719", |
275 | a3d2b515 | Stavros Sachtouris | "mac_address": "aa:00:0c:6d:34:bb", |
276 | a3d2b515 | Stavros Sachtouris | "firewallProfile": "PROTECTED", |
277 | a3d2b515 | Stavros Sachtouris | "ipv4": "192.168.1.2", |
278 | a3d2b515 | Stavros Sachtouris | "ipv6": "" |
279 | a3d2b515 | Stavros Sachtouris | "OS-EXT-IPS:type": "floating" |
280 | 45e274fc | Stavros Sachtouris | } |
281 | 45e274fc | Stavros Sachtouris | ], |
282 | 1d346984 | Stavros Sachtouris | "links": [ |
283 | a3d2b515 | Stavros Sachtouris | { |
284 | a3d2b515 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/servers/42", |
285 | a3d2b515 | Stavros Sachtouris | "rel": "self" |
286 | a3d2b515 | Stavros Sachtouris | }, { |
287 | a3d2b515 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/servers/42", |
288 | a3d2b515 | Stavros Sachtouris | "rel": "bookmark" |
289 | a3d2b515 | Stavros Sachtouris | } |
290 | a3d2b515 | Stavros Sachtouris | ], |
291 | a3d2b515 | Stavros Sachtouris | "image": { |
292 | a3d2b515 | Stavros Sachtouris | "id": "im4g3-1d", |
293 | a3d2b515 | Stavros Sachtouris | "links": [ |
294 | 1d346984 | Stavros Sachtouris | { |
295 | a3d2b515 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/images/im4g3-1d", |
296 | a3d2b515 | Stavros Sachtouris | "rel": "self" |
297 | a3d2b515 | Stavros Sachtouris | }, { |
298 | a3d2b515 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/images/im4g3-1d", |
299 | a3d2b515 | Stavros Sachtouris | "rel": "bookmark" |
300 | a3d2b515 | Stavros Sachtouris | }, { |
301 | a3d2b515 | Stavros Sachtouris | "href": "https://example.org/image/v1.0/images/im4g3-1d", |
302 | a3d2b515 | Stavros Sachtouris | "rel": "alternate" |
303 | 1d346984 | Stavros Sachtouris | } |
304 | a3d2b515 | Stavros Sachtouris | ] |
305 | a3d2b515 | Stavros Sachtouris | }, |
306 | a3d2b515 | Stavros Sachtouris | "suspended": false, |
307 | 45e274fc | Stavros Sachtouris | "created': '2011-04-19T10:18:52.085737+00:00', |
308 | 1d346984 | Stavros Sachtouris | "flavor": { |
309 | a3d2b515 | Stavros Sachtouris | "id": 1", |
310 | a3d2b515 | Stavros Sachtouris | "links": [ |
311 | a3d2b515 | Stavros Sachtouris | { |
312 | a3d2b515 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/flavors/1", |
313 | a3d2b515 | Stavros Sachtouris | "rel": "self" |
314 | a3d2b515 | Stavros Sachtouris | }, { |
315 | a3d2b515 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/flavors/1", |
316 | a3d2b515 | Stavros Sachtouris | "rel": "bookmark" |
317 | a3d2b515 | Stavros Sachtouris | } |
318 | a3d2b515 | Stavros Sachtouris | ] |
319 | 1d346984 | Stavros Sachtouris | }, |
320 | 45e274fc | Stavros Sachtouris | "id": "42", |
321 | a3d2b515 | Stavros Sachtouris | "security_groups": [{"name": "default"}], |
322 | a3d2b515 | Stavros Sachtouris | "user_id": "s0m5-u5e7-1d", |
323 | a3d2b515 | Stavros Sachtouris | "accessIPv4": "", |
324 | a3d2b515 | Stavros Sachtouris | "accessIPv6": "", |
325 | a3d2b515 | Stavros Sachtouris | "progress": 100, |
326 | a3d2b515 | Stavros Sachtouris | "config_drive": "", |
327 | 45e274fc | Stavros Sachtouris | "status": "ACTIVE", |
328 | a3d2b515 | Stavros Sachtouris | "updated": "2011-05-29T14:07:07.037602+00:00", |
329 | a3d2b515 | Stavros Sachtouris | "hostId": "", |
330 | a3d2b515 | Stavros Sachtouris | "SNF:fqdn": "snf-42.vm.example.org", |
331 | a3d2b515 | Stavros Sachtouris | "key_name": null, |
332 | a3d2b515 | Stavros Sachtouris | "name": "My Server", |
333 | a3d2b515 | Stavros Sachtouris | "created": "2014-02-12T08:31:37.834542+00:00", |
334 | a3d2b515 | Stavros Sachtouris | "tenant_id": "s0m5-u5e7-1d", |
335 | a3d2b515 | Stavros Sachtouris | "SNF:port_forwarding": {}, |
336 | a3d2b515 | Stavros Sachtouris | "SNF:task_state": "", |
337 | a3d2b515 | Stavros Sachtouris | "diagnostics": [ |
338 | a3d2b515 | Stavros Sachtouris | { |
339 | a3d2b515 | Stavros Sachtouris | "level": "DEBUG", |
340 | a3d2b515 | Stavros Sachtouris | "created": "2014-02-12T08:31:37.834542+00:00", |
341 | a3d2b515 | Stavros Sachtouris | "source": "image-info", |
342 | a3d2b515 | Stavros Sachtouris | "source_date": "2014-02-12T08:32:35.929507+00:00", |
343 | a3d2b515 | Stavros Sachtouris | "message": "Image customization finished successfully.", |
344 | a3d2b515 | Stavros Sachtouris | "details": null |
345 | a3d2b515 | Stavros Sachtouris | } |
346 | a3d2b515 | Stavros Sachtouris | ], |
347 | a3d2b515 | Stavros Sachtouris | "metadata": { |
348 | a3d2b515 | Stavros Sachtouris | "os": "debian", |
349 | a3d2b515 | Stavros Sachtouris | "users": "root" |
350 | a3d2b515 | Stavros Sachtouris | } |
351 | 45e274fc | Stavros Sachtouris | }, { |
352 | a3d2b515 | Stavros Sachtouris | { |
353 | a3d2b515 | Stavros Sachtouris | "addresses": [ |
354 | a3d2b515 | Stavros Sachtouris | "2718": [ |
355 | a3d2b515 | Stavros Sachtouris | { |
356 | a3d2b515 | Stavros Sachtouris | "version": 6, |
357 | a3d2b515 | Stavros Sachtouris | "addr": "2001:443:2dfc:1232:a810:3cf:fe9b:21cd", |
358 | a3d2b515 | Stavros Sachtouris | "OS-EXT-IPS:type": "fixed" |
359 | a3d2b515 | Stavros Sachtouris | } |
360 | a3d2b515 | Stavros Sachtouris | ], |
361 | a3d2b515 | Stavros Sachtouris | "4178": [ |
362 | a3d2b515 | Stavros Sachtouris | { |
363 | a3d2b515 | Stavros Sachtouris | "version": 4, |
364 | a3d2b515 | Stavros Sachtouris | "addr": "192.168.1.3", |
365 | a3d2b515 | Stavros Sachtouris | "OS-EXT-IPS:type": "floating" |
366 | a3d2b515 | Stavros Sachtouris | } |
367 | a3d2b515 | Stavros Sachtouris | ] |
368 | a3d2b515 | Stavros Sachtouris | ], |
369 | 45e274fc | Stavros Sachtouris | "attachments": [ |
370 | 45e274fc | Stavros Sachtouris | { |
371 | a3d2b515 | Stavros Sachtouris | "id": "36", |
372 | a3d2b515 | Stavros Sachtouris | "network_id": "2718", |
373 | a3d2b515 | Stavros Sachtouris | "mac_address": "aa:01:02:6c:34:cd", |
374 | 45e274fc | Stavros Sachtouris | "firewallProfile": "DISABLED", |
375 | a3d2b515 | Stavros Sachtouris | "ipv4": "", |
376 | a3d2b515 | Stavros Sachtouris | "ipv6": "2001:443:2dfc:1232:a810:3cf:fe9b:21cd" |
377 | a3d2b515 | Stavros Sachtouris | "OS-EXT-IPS:type": "fixed" |
378 | 45e274fc | Stavros Sachtouris | }, { |
379 | a3d2b515 | Stavros Sachtouris | "id": "38", |
380 | a3d2b515 | Stavros Sachtouris | "network_id": "4178", |
381 | a3d2b515 | Stavros Sachtouris | "mac_address": "aa:00:0c:6d:34:cc", |
382 | a3d2b515 | Stavros Sachtouris | "firewallProfile": "PROTECTED", |
383 | a3d2b515 | Stavros Sachtouris | "ipv4": "192.168.1.3", |
384 | a3d2b515 | Stavros Sachtouris | "ipv6": "" |
385 | a3d2b515 | Stavros Sachtouris | "OS-EXT-IPS:type": "floating" |
386 | 45e274fc | Stavros Sachtouris | } |
387 | 45e274fc | Stavros Sachtouris | ], |
388 | 1d346984 | Stavros Sachtouris | "links": [ |
389 | a3d2b515 | Stavros Sachtouris | { |
390 | a3d2b515 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/servers/84", |
391 | a3d2b515 | Stavros Sachtouris | "rel": "self" |
392 | a3d2b515 | Stavros Sachtouris | }, { |
393 | a3d2b515 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/servers/84", |
394 | a3d2b515 | Stavros Sachtouris | "rel": "bookmark" |
395 | a3d2b515 | Stavros Sachtouris | } |
396 | a3d2b515 | Stavros Sachtouris | ], |
397 | a3d2b515 | Stavros Sachtouris | "image": { |
398 | a3d2b515 | Stavros Sachtouris | "id": "im4g3-1d", |
399 | a3d2b515 | Stavros Sachtouris | "links": [ |
400 | 1d346984 | Stavros Sachtouris | { |
401 | a3d2b515 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/images/im4g3-1d", |
402 | a3d2b515 | Stavros Sachtouris | "rel": "self" |
403 | a3d2b515 | Stavros Sachtouris | }, { |
404 | a3d2b515 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/images/im4g3-1d", |
405 | a3d2b515 | Stavros Sachtouris | "rel": "bookmark" |
406 | a3d2b515 | Stavros Sachtouris | }, { |
407 | a3d2b515 | Stavros Sachtouris | "href": "https://example.org/image/v1.0/images/im4g3-1d", |
408 | a3d2b515 | Stavros Sachtouris | "rel": "alternate" |
409 | 1d346984 | Stavros Sachtouris | } |
410 | a3d2b515 | Stavros Sachtouris | ] |
411 | 1d346984 | Stavros Sachtouris | }, |
412 | a3d2b515 | Stavros Sachtouris | "suspended": false, |
413 | a3d2b515 | Stavros Sachtouris | "created': '2011-04-21T10:18:52.085737+00:00', |
414 | a3d2b515 | Stavros Sachtouris | "flavor": { |
415 | a3d2b515 | Stavros Sachtouris | "id": 3", |
416 | a3d2b515 | Stavros Sachtouris | "links": [ |
417 | a3d2b515 | Stavros Sachtouris | { |
418 | a3d2b515 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/flavors/3", |
419 | a3d2b515 | Stavros Sachtouris | "rel": "self" |
420 | a3d2b515 | Stavros Sachtouris | }, { |
421 | a3d2b515 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/flavors/3", |
422 | a3d2b515 | Stavros Sachtouris | "rel": "bookmark" |
423 | a3d2b515 | Stavros Sachtouris | } |
424 | a3d2b515 | Stavros Sachtouris | ] |
425 | 1d346984 | Stavros Sachtouris | }, |
426 | a3d2b515 | Stavros Sachtouris | "id": "84", |
427 | a3d2b515 | Stavros Sachtouris | "security_groups": [{"name": "default"}], |
428 | a3d2b515 | Stavros Sachtouris | "user_id": "s0m5-u5e7-1d", |
429 | a3d2b515 | Stavros Sachtouris | "accessIPv4": "", |
430 | a3d2b515 | Stavros Sachtouris | "accessIPv6": "", |
431 | a3d2b515 | Stavros Sachtouris | "progress": 100, |
432 | a3d2b515 | Stavros Sachtouris | "config_drive": "", |
433 | 45e274fc | Stavros Sachtouris | "status": "ACTIVE", |
434 | a3d2b515 | Stavros Sachtouris | "updated": "2011-05-30T14:07:07.037602+00:00", |
435 | a3d2b515 | Stavros Sachtouris | "hostId": "", |
436 | a3d2b515 | Stavros Sachtouris | "SNF:fqdn": "snf-84.vm.example.org", |
437 | a3d2b515 | Stavros Sachtouris | "key_name": null, |
438 | a3d2b515 | Stavros Sachtouris | "name": "My Other Server", |
439 | a3d2b515 | Stavros Sachtouris | "created": "2014-02-21T08:31:37.834542+00:00", |
440 | a3d2b515 | Stavros Sachtouris | "tenant_id": "s0m5-u5e7-1d", |
441 | a3d2b515 | Stavros Sachtouris | "SNF:port_forwarding": {}, |
442 | a3d2b515 | Stavros Sachtouris | "SNF:task_state": "", |
443 | a3d2b515 | Stavros Sachtouris | "diagnostics": [ |
444 | a3d2b515 | Stavros Sachtouris | { |
445 | a3d2b515 | Stavros Sachtouris | "level": "DEBUG", |
446 | a3d2b515 | Stavros Sachtouris | "created": "2014-02-21T08:31:37.834542+00:00", |
447 | a3d2b515 | Stavros Sachtouris | "source": "image-info", |
448 | a3d2b515 | Stavros Sachtouris | "source_date": "2014-02-21T08:32:35.929507+00:00", |
449 | a3d2b515 | Stavros Sachtouris | "message": "Image customization finished successfully.", |
450 | a3d2b515 | Stavros Sachtouris | "details": null |
451 | a3d2b515 | Stavros Sachtouris | } |
452 | a3d2b515 | Stavros Sachtouris | ], |
453 | a3d2b515 | Stavros Sachtouris | "metadata": { |
454 | a3d2b515 | Stavros Sachtouris | "os": "debian", |
455 | a3d2b515 | Stavros Sachtouris | "users": "root" |
456 | a3d2b515 | Stavros Sachtouris | } |
457 | 45e274fc | Stavros Sachtouris | } |
458 | 45e274fc | Stavros Sachtouris | ] |
459 | a3d2b515 | Stavros Sachtouris | } |
460 | 2cd1c00a | Giorgos Verigakis | |
461 | 2cd1c00a | Giorgos Verigakis | |
462 | 0e214bbe | Stavros Sachtouris | Create Server |
463 | a3d2b515 | Stavros Sachtouris | ------------- |
464 | 0e214bbe | Stavros Sachtouris | |
465 | 68386e00 | Stavros Sachtouris | Create a new virtual server |
466 | 68386e00 | Stavros Sachtouris | |
467 | 68386e00 | Stavros Sachtouris | .. rubric:: Request |
468 | 68386e00 | Stavros Sachtouris | |
469 | e31f6f23 | Stavros Sachtouris | ============ ====== ======== ========== |
470 | 68386e00 | Stavros Sachtouris | URI Method Cyclades OS/Compute |
471 | e31f6f23 | Stavros Sachtouris | ============ ====== ======== ========== |
472 | e31f6f23 | Stavros Sachtouris | ``/servers`` POST ✔ ✔ |
473 | e31f6f23 | Stavros Sachtouris | ============ ====== ======== ========== |
474 | 0e214bbe | Stavros Sachtouris | |
475 | 0e214bbe | Stavros Sachtouris | | |
476 | 0e214bbe | Stavros Sachtouris | |
477 | 68386e00 | Stavros Sachtouris | ============== ========================= ======== ========== |
478 | 68386e00 | Stavros Sachtouris | Request Header Value Cyclades OS/Compute |
479 | 68386e00 | Stavros Sachtouris | ============== ========================= ======== ========== |
480 | 68386e00 | Stavros Sachtouris | X-Auth-Token User authentication token required required |
481 | 634ef3a8 | Stavros Sachtouris | Content-Type Type or request body required required |
482 | 634ef3a8 | Stavros Sachtouris | Content-Length Length of request body required required |
483 | 68386e00 | Stavros Sachtouris | ============== ========================= ======== ========== |
484 | 68386e00 | Stavros Sachtouris | |
485 | 634ef3a8 | Stavros Sachtouris | *Example Request Headers*:: |
486 | 634ef3a8 | Stavros Sachtouris | |
487 | 634ef3a8 | Stavros Sachtouris | X-Auth-Token: z31uRXUn1LZy45p1r7V== |
488 | 634ef3a8 | Stavros Sachtouris | Content-Type: application/json |
489 | 634ef3a8 | Stavros Sachtouris | Content-Length: 735 |
490 | 634ef3a8 | Stavros Sachtouris | |
491 | 68386e00 | Stavros Sachtouris | | |
492 | 68386e00 | Stavros Sachtouris | |
493 | 0e214bbe | Stavros Sachtouris | ================= =============== |
494 | 3458183d | Constantinos Venetsanopoulos | Request Parameter Value |
495 | 0e214bbe | Stavros Sachtouris | ================= =============== |
496 | 0e214bbe | Stavros Sachtouris | json Respond in json |
497 | 3458183d | Constantinos Venetsanopoulos | xml Respond in xml |
498 | 0e214bbe | Stavros Sachtouris | ================= =============== |
499 | 0e214bbe | Stavros Sachtouris | |
500 | 68386e00 | Stavros Sachtouris | Request body contents:: |
501 | 0e214bbe | Stavros Sachtouris | |
502 | 68386e00 | Stavros Sachtouris | server: { |
503 | 68386e00 | Stavros Sachtouris | <server attribute>: <value>, |
504 | 68386e00 | Stavros Sachtouris | ... |
505 | 68386e00 | Stavros Sachtouris | personality: [ |
506 | 68386e00 | Stavros Sachtouris | { |
507 | 68386e00 | Stavros Sachtouris | <personality attribute>: <value>, |
508 | 68386e00 | Stavros Sachtouris | ... |
509 | 68386e00 | Stavros Sachtouris | }, |
510 | 68386e00 | Stavros Sachtouris | ... |
511 | 68386e00 | Stavros Sachtouris | ], |
512 | 68386e00 | Stavros Sachtouris | ... |
513 | 68386e00 | Stavros Sachtouris | } |
514 | 0e214bbe | Stavros Sachtouris | |
515 | 0e214bbe | Stavros Sachtouris | =========== ==================== ======== ========== |
516 | 68386e00 | Stavros Sachtouris | Attributes Description Cyclades OS/Compute |
517 | 0e214bbe | Stavros Sachtouris | =========== ==================== ======== ========== |
518 | 0e214bbe | Stavros Sachtouris | name The server name ✔ ✔ |
519 | 0e214bbe | Stavros Sachtouris | imageRef Image id ✔ ✔ |
520 | 0e214bbe | Stavros Sachtouris | flavorRef Resources flavor ✔ ✔ |
521 | 0e214bbe | Stavros Sachtouris | personality Personality contents ✔ ✔ |
522 | 0e214bbe | Stavros Sachtouris | metadata Custom metadata ✔ ✔ |
523 | 0e214bbe | Stavros Sachtouris | =========== ==================== ======== ========== |
524 | 0e214bbe | Stavros Sachtouris | |
525 | 0e214bbe | Stavros Sachtouris | * **name** can be any string |
526 | 0e214bbe | Stavros Sachtouris | |
527 | a5ec880a | Stavros Sachtouris | * **imageRed** and **flavorRed** should refer to existing images and hardware |
528 | e31f6f23 | Stavros Sachtouris | flavors accessible by the user |
529 | 0e214bbe | Stavros Sachtouris | |
530 | e31f6f23 | Stavros Sachtouris | * **metadata** are ``key``:``value`` pairs of custom server-specific metadata. |
531 | e31f6f23 | Stavros Sachtouris | There are no semantic limitations. |
532 | 0e214bbe | Stavros Sachtouris | |
533 | e31f6f23 | Stavros Sachtouris | * **personality** (optional) is a list of personality injections. A personality |
534 | 4e551789 | Stavros Sachtouris | injection is a way to add a file into a virtual server while creating it. |
535 | 4e551789 | Stavros Sachtouris | Each change modifies/creates a file on the virtual server. The injected data |
536 | 4e551789 | Stavros Sachtouris | (``contents``) should not exceed 10240 *bytes* in size and must be base64 |
537 | 4e551789 | Stavros Sachtouris | encoded. The file mode should be a number, not a string. A personality |
538 | 4e551789 | Stavros Sachtouris | injection contains the following attributes: |
539 | 0e214bbe | Stavros Sachtouris | |
540 | 68386e00 | Stavros Sachtouris | ====================== =================== ======== ========== |
541 | 68386e00 | Stavros Sachtouris | Personality Attributes Description Cyclades OS/Compute |
542 | 68386e00 | Stavros Sachtouris | ====================== =================== ======== ========== |
543 | 68386e00 | Stavros Sachtouris | path File path on server ✔ ✔ |
544 | 68386e00 | Stavros Sachtouris | contents Data to inject ✔ ✔ |
545 | 68386e00 | Stavros Sachtouris | group User group ✔ **✘** |
546 | 68386e00 | Stavros Sachtouris | mode File access mode ✔ **✘** |
547 | 68386e00 | Stavros Sachtouris | owner File owner ✔ **✘** |
548 | 68386e00 | Stavros Sachtouris | ====================== =================== ======== ========== |
549 | 0e214bbe | Stavros Sachtouris | |
550 | 634ef3a8 | Stavros Sachtouris | *Example Create Server Request: JSON* |
551 | 634ef3a8 | Stavros Sachtouris | |
552 | 634ef3a8 | Stavros Sachtouris | .. code-block:: javascript |
553 | 634ef3a8 | Stavros Sachtouris | |
554 | 634ef3a8 | Stavros Sachtouris | { |
555 | 634ef3a8 | Stavros Sachtouris | "server": { |
556 | 634ef3a8 | Stavros Sachtouris | "name": "My Server Name: Example Name", |
557 | 634ef3a8 | Stavros Sachtouris | "imageRef": "da7a211f-...-f901ce81a3e6", |
558 | 634ef3a8 | Stavros Sachtouris | "flavorRef": 289, |
559 | 634ef3a8 | Stavros Sachtouris | "personality": [ |
560 | 634ef3a8 | Stavros Sachtouris | { |
561 | 634ef3a8 | Stavros Sachtouris | "path": "/Users/myusername/personlities/example1.file", |
562 | 634ef3a8 | Stavros Sachtouris | "contents": "some data to inject", |
563 | 634ef3a8 | Stavros Sachtouris | "group": "remotely-set user group", |
564 | 4e551789 | Stavros Sachtouris | "mode": 0600, |
565 | 634ef3a8 | Stavros Sachtouris | "owner": "ausername" |
566 | 634ef3a8 | Stavros Sachtouris | }, { |
567 | 634ef3a8 | Stavros Sachtouris | "path": "/Users/myusername/personlities/example2.file", |
568 | 634ef3a8 | Stavros Sachtouris | "contents": "some more data to inject", |
569 | 634ef3a8 | Stavros Sachtouris | "group": "", |
570 | 4e551789 | Stavros Sachtouris | "mode": 0777, |
571 | 634ef3a8 | Stavros Sachtouris | "owner": "anotherusername" |
572 | 634ef3a8 | Stavros Sachtouris | } |
573 | 634ef3a8 | Stavros Sachtouris | ], |
574 | 634ef3a8 | Stavros Sachtouris | "metadata": { |
575 | 45e274fc | Stavros Sachtouris | "EloquentDescription": "Example server with personality", |
576 | 45e274fc | Stavros Sachtouris | "ShortDescription": "Trying VMs" |
577 | 634ef3a8 | Stavros Sachtouris | } |
578 | 634ef3a8 | Stavros Sachtouris | } |
579 | 634ef3a8 | Stavros Sachtouris | } |
580 | 0e214bbe | Stavros Sachtouris | |
581 | 68386e00 | Stavros Sachtouris | .. rubric:: Response |
582 | 68386e00 | Stavros Sachtouris | |
583 | 0e214bbe | Stavros Sachtouris | =========================== ===================== |
584 | 0e214bbe | Stavros Sachtouris | Return Code Description |
585 | 0e214bbe | Stavros Sachtouris | =========================== ===================== |
586 | 0e214bbe | Stavros Sachtouris | 200 (OK) Request succeeded |
587 | 0e214bbe | Stavros Sachtouris | 400 (Bad Request) Malformed request data |
588 | 0e214bbe | Stavros Sachtouris | 401 (Unauthorized) Missing or expired user token |
589 | 0e214bbe | Stavros Sachtouris | 403 (Forbidden) User is not allowed to perform this operation |
590 | 0e214bbe | Stavros Sachtouris | 404 (Not Found) Image or Flavor not found |
591 | a5ec880a | Stavros Sachtouris | 413 (Over Limit) Exceeded some resource limit (#VMs, personality |
592 | 3458183d | Constantinos Venetsanopoulos | size, etc.) |
593 | 0e214bbe | Stavros Sachtouris | 415 (Bad Media Type) |
594 | a5ec880a | Stavros Sachtouris | 500 (Internal Server Error) The request cannot be completed because of an |
595 | e7f266c3 | Stavros Sachtouris | \ internal error |
596 | a5ec880a | Stavros Sachtouris | 503 (Service Unavailable) No available backends or service currently |
597 | e7f266c3 | Stavros Sachtouris | \ unavailable |
598 | 0e214bbe | Stavros Sachtouris | =========================== ===================== |
599 | 0e214bbe | Stavros Sachtouris | |
600 | 0e214bbe | Stavros Sachtouris | | |
601 | 0e214bbe | Stavros Sachtouris | |
602 | 68386e00 | Stavros Sachtouris | Response body contents:: |
603 | 68386e00 | Stavros Sachtouris | |
604 | 68386e00 | Stavros Sachtouris | server: { |
605 | 68386e00 | Stavros Sachtouris | <server attribute>: <value>, |
606 | 68386e00 | Stavros Sachtouris | ... |
607 | 68386e00 | Stavros Sachtouris | } |
608 | 68386e00 | Stavros Sachtouris | |
609 | 68386e00 | Stavros Sachtouris | Server attributes are `listed here <#server-ref>`_. |
610 | 0e214bbe | Stavros Sachtouris | |
611 | 634ef3a8 | Stavros Sachtouris | *Example Create Server Response: JSON* |
612 | 68386e00 | Stavros Sachtouris | |
613 | 68386e00 | Stavros Sachtouris | .. code-block:: javascript |
614 | 0e214bbe | Stavros Sachtouris | |
615 | e31f6f23 | Stavros Sachtouris | { |
616 | e31f6f23 | Stavros Sachtouris | "server": { |
617 | 1d346984 | Stavros Sachtouris | "addresses": |
618 | 1d346984 | Stavros Sachtouris | "id": 28130, |
619 | 1d346984 | Stavros Sachtouris | "links": [ |
620 | 1d346984 | Stavros Sachtouris | { |
621 | 1d346984 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/servers/42", |
622 | 1d346984 | Stavros Sachtouris | "rel": "self" |
623 | 1d346984 | Stavros Sachtouris | }, |
624 | 1d346984 | Stavros Sachtouris | { |
625 | 1d346984 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/servers/42", |
626 | 1d346984 | Stavros Sachtouris | "rel": "bookmark" |
627 | 1d346984 | Stavros Sachtouris | } |
628 | 1d346984 | Stavros Sachtouris | ], |
629 | 1d346984 | Stavros Sachtouris | |
630 | 1d346984 | Stavros Sachtouris | "image": { |
631 | 1d346984 | Stavros Sachtouris | "id": im4g3-1d |
632 | 1d346984 | Stavros Sachtouris | "links": [ |
633 | 1d346984 | Stavros Sachtouris | { |
634 | 1d346984 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/images/im4g3-1d" |
635 | 1d346984 | Stavros Sachtouris | "rel": "self" |
636 | 1d346984 | Stavros Sachtouris | }, { |
637 | 1d346984 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/images/im4g3-1d" |
638 | 1d346984 | Stavros Sachtouris | "rel": "bookmark" |
639 | 1d346984 | Stavros Sachtouris | }, { |
640 | 1d346984 | Stavros Sachtouris | "href": "https://example.org/image/v1.0/images/im4g3-1d" |
641 | 1d346984 | Stavros Sachtouris | "rel": "alternate" |
642 | 1d346984 | Stavros Sachtouris | } |
643 | 1d346984 | Stavros Sachtouris | ] |
644 | 1d346984 | Stavros Sachtouris | }, |
645 | 1d346984 | Stavros Sachtouris | "flavor": { |
646 | 1d346984 | Stavros Sachtouris | "id": 289 |
647 | 1d346984 | Stavros Sachtouris | "links": [ |
648 | 1d346984 | Stavros Sachtouris | { |
649 | 1d346984 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/flavors/289" |
650 | 1d346984 | Stavros Sachtouris | "rel": "self" |
651 | 1d346984 | Stavros Sachtouris | }, { |
652 | 1d346984 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/flavors/289" |
653 | 1d346984 | Stavros Sachtouris | "rel": "bookmark" |
654 | 1d346984 | Stavros Sachtouris | } |
655 | 1d346984 | Stavros Sachtouris | ] |
656 | 1d346984 | Stavros Sachtouris | }, |
657 | e31f6f23 | Stavros Sachtouris | "status": "BUILD", |
658 | e31f6f23 | Stavros Sachtouris | "updated": "2013-04-10T13:52:18.140686+00:00", |
659 | e31f6f23 | Stavros Sachtouris | "hostId": "", |
660 | e31f6f23 | Stavros Sachtouris | "name": "My Server Name: Example Name", |
661 | e31f6f23 | Stavros Sachtouris | "created": "2013-04-10T13:52:17.085402+00:00", |
662 | e31f6f23 | Stavros Sachtouris | "adminPass": "fKCqlZe2at", |
663 | e31f6f23 | Stavros Sachtouris | "suspended": false, |
664 | 68386e00 | Stavros Sachtouris | "progress": 0 |
665 | 634ef3a8 | Stavros Sachtouris | "metadata": { |
666 | 45e274fc | Stavros Sachtouris | "EloquentDescription": "Example server with personality", |
667 | 45e274fc | Stavros Sachtouris | "ShortDescription": "Trying VMs" |
668 | 634ef3a8 | Stavros Sachtouris | } |
669 | e31f6f23 | Stavros Sachtouris | } |
670 | e31f6f23 | Stavros Sachtouris | } |
671 | 0e214bbe | Stavros Sachtouris | |
672 | 634ef3a8 | Stavros Sachtouris | *Example Create Server Response: XML* |
673 | 68386e00 | Stavros Sachtouris | |
674 | 68386e00 | Stavros Sachtouris | .. code-block:: xml |
675 | 68386e00 | Stavros Sachtouris | |
676 | 68386e00 | Stavros Sachtouris | <?xml version="1.0" encoding="UTF-8"?> |
677 | 68386e00 | Stavros Sachtouris | <server xmlns="http://docs.openstack.org/compute/api/v1.1"\ |
678 | 68386e00 | Stavros Sachtouris | xmlns:atom="http://www.w3.org/2005/Atom" |
679 | 68386e00 | Stavros Sachtouris | id="1" |
680 | 68386e00 | Stavros Sachtouris | status="BUILD" |
681 | 68386e00 | Stavros Sachtouris | hostId="", |
682 | 68386e00 | Stavros Sachtouris | name="My Server Name: Example Name" |
683 | 68386e00 | Stavros Sachtouris | created="2013-04-10T13:52:17.085402+00:00" |
684 | 68386e00 | Stavros Sachtouris | adminPass="fKCqlZe2at" |
685 | 68386e00 | Stavros Sachtouris | suspended="false" |
686 | 68386e00 | Stavros Sachtouris | progress="0" |
687 | 1d346984 | Stavros Sachtouris | ... |
688 | 68386e00 | Stavros Sachtouris | /> |
689 | 68386e00 | Stavros Sachtouris | |
690 | 2cd1c00a | Giorgos Verigakis | Get Server Stats |
691 | a3d2b515 | Stavros Sachtouris | ---------------- |
692 | 2cd1c00a | Giorgos Verigakis | |
693 | 68386e00 | Stavros Sachtouris | .. note:: This operation is not part of OS/Compute v2. |
694 | 68386e00 | Stavros Sachtouris | |
695 | 68386e00 | Stavros Sachtouris | This operation returns URLs of graphs showing CPU and Network statistics. |
696 | 671d6f05 | Stavros Sachtouris | |
697 | 68386e00 | Stavros Sachtouris | .. rubric:: Request |
698 | 2cd1c00a | Giorgos Verigakis | |
699 | ea24170f | Stavros Sachtouris | ============================== ====== ======== ========== |
700 | 68386e00 | Stavros Sachtouris | URI Method Cyclades OS/Compute |
701 | ea24170f | Stavros Sachtouris | ============================== ====== ======== ========== |
702 | ea24170f | Stavros Sachtouris | ``/servers/<server-id>/stats`` GET ✔ **✘** |
703 | ea24170f | Stavros Sachtouris | ============================== ====== ======== ========== |
704 | 2cd1c00a | Giorgos Verigakis | |
705 | ea24170f | Stavros Sachtouris | * **server-id** is the identifier of the virtual server |
706 | 2cd1c00a | Giorgos Verigakis | |
707 | ea24170f | Stavros Sachtouris | | |
708 | ea24170f | Stavros Sachtouris | |
709 | e31f6f23 | Stavros Sachtouris | ============== ========================= ======== ========== |
710 | 68386e00 | Stavros Sachtouris | Request Header Value Cyclades OS/Compute |
711 | e31f6f23 | Stavros Sachtouris | ============== ========================= ======== ========== |
712 | e31f6f23 | Stavros Sachtouris | X-Auth-Token User authentication token required required |
713 | e31f6f23 | Stavros Sachtouris | ============== ========================= ======== ========== |
714 | ea24170f | Stavros Sachtouris | |
715 | ea24170f | Stavros Sachtouris | | |
716 | ea24170f | Stavros Sachtouris | |
717 | ea24170f | Stavros Sachtouris | ================= =============== |
718 | ea24170f | Stavros Sachtouris | Request Parameter Value |
719 | ea24170f | Stavros Sachtouris | ================= =============== |
720 | ea24170f | Stavros Sachtouris | json Respond in json |
721 | ea24170f | Stavros Sachtouris | xml Respond in xml |
722 | ea24170f | Stavros Sachtouris | ================= =============== |
723 | ea24170f | Stavros Sachtouris | |
724 | a5ec880a | Stavros Sachtouris | * **json** and **xml** parameters are mutually exclusive. If none supported, |
725 | a5ec880a | Stavros Sachtouris | the response will be formated in json. |
726 | ea24170f | Stavros Sachtouris | |
727 | 68386e00 | Stavros Sachtouris | .. note:: Request body should be empty |
728 | 68386e00 | Stavros Sachtouris | |
729 | 68386e00 | Stavros Sachtouris | .. rubric:: Response |
730 | ea24170f | Stavros Sachtouris | |
731 | ea24170f | Stavros Sachtouris | =========================== ===================== |
732 | ea24170f | Stavros Sachtouris | Return Code Description |
733 | ea24170f | Stavros Sachtouris | =========================== ===================== |
734 | ea24170f | Stavros Sachtouris | 200 (OK) Request succeeded |
735 | ea24170f | Stavros Sachtouris | 400 (Bad Request) Invalid server ID or Server deleted |
736 | ea24170f | Stavros Sachtouris | 401 (Unauthorized) Missing or expired user token |
737 | ea24170f | Stavros Sachtouris | 403 (Forbidden) Administratively suspended server |
738 | ea24170f | Stavros Sachtouris | 404 (Not Found) Server not found |
739 | a5ec880a | Stavros Sachtouris | 500 (Internal Server Error) The request cannot be completed because of an |
740 | e7f266c3 | Stavros Sachtouris | \ internal error |
741 | ea24170f | Stavros Sachtouris | 503 (Service Unavailable) The server is not currently available |
742 | ea24170f | Stavros Sachtouris | =========================== ===================== |
743 | ea24170f | Stavros Sachtouris | |
744 | ea24170f | Stavros Sachtouris | | |
745 | 2cd1c00a | Giorgos Verigakis | |
746 | 68386e00 | Stavros Sachtouris | Response body contents:: |
747 | 68386e00 | Stavros Sachtouris | |
748 | 68386e00 | Stavros Sachtouris | stats: {<parameter>: <value> } |
749 | 68386e00 | Stavros Sachtouris | |
750 | 68386e00 | Stavros Sachtouris | ============= ====================== |
751 | 3458183d | Constantinos Venetsanopoulos | Parameter Description |
752 | 68386e00 | Stavros Sachtouris | ============= ====================== |
753 | 68386e00 | Stavros Sachtouris | serverRef Server ID |
754 | 68386e00 | Stavros Sachtouris | refresh Refresh frequency |
755 | 68386e00 | Stavros Sachtouris | cpuBar Latest CPU load graph URL |
756 | 68386e00 | Stavros Sachtouris | cpuTimeSeries CPU load / time graph URL |
757 | 68386e00 | Stavros Sachtouris | netBar Latest Network load graph URL |
758 | 68386e00 | Stavros Sachtouris | netTimeSeries Network load / time graph URL |
759 | 68386e00 | Stavros Sachtouris | ============= ====================== |
760 | 68386e00 | Stavros Sachtouris | |
761 | 68386e00 | Stavros Sachtouris | * **refresh** is the recommended sampling rate |
762 | 2cd1c00a | Giorgos Verigakis | |
763 | 634ef3a8 | Stavros Sachtouris | *Example Get Server Stats Response: JSON* |
764 | c3945370 | Vangelis Koukis | |
765 | c3945370 | Vangelis Koukis | .. code-block:: javascript |
766 | 2cd1c00a | Giorgos Verigakis | |
767 | 2cd1c00a | Giorgos Verigakis | { |
768 | e31f6f23 | Stavros Sachtouris | "stats": { |
769 | e31f6f23 | Stavros Sachtouris | "serverRef": 1, |
770 | e31f6f23 | Stavros Sachtouris | "refresh": 60, |
771 | e31f6f23 | Stavros Sachtouris | "cpuBar": "http://stats.okeanos.grnet.gr/b9a...048c/cpu-bar.png", |
772 | e31f6f23 | Stavros Sachtouris | "cpuTimeSeries": "http://stats.okeanos.grnet.gr/b9a...048c/cpu-ts.png", |
773 | e31f6f23 | Stavros Sachtouris | "netBar": "http://stats.okeanos.grnet.gr/b9a...048c/net-bar.png", |
774 | e31f6f23 | Stavros Sachtouris | "netTimeSeries": "http://stats.okeanos.grnet.gr/b9a...048c/net-ts.png" |
775 | e31f6f23 | Stavros Sachtouris | } |
776 | 2cd1c00a | Giorgos Verigakis | } |
777 | 2cd1c00a | Giorgos Verigakis | |
778 | 634ef3a8 | Stavros Sachtouris | *Example Get Network Details Response: XML* |
779 | c3945370 | Vangelis Koukis | |
780 | c3945370 | Vangelis Koukis | .. code-block:: xml |
781 | 2cd1c00a | Giorgos Verigakis | |
782 | 2cd1c00a | Giorgos Verigakis | <?xml version="1.0" encoding="UTF-8"?> |
783 | a5ec880a | Stavros Sachtouris | <stats xmlns="http://docs.openstack.org/compute/api/v1.1"\ |
784 | 671d6f05 | Stavros Sachtouris | xmlns:atom="http://www.w3.org/2005/Atom" |
785 | 671d6f05 | Stavros Sachtouris | serverRef="1" |
786 | 671d6f05 | Stavros Sachtouris | refresh="60" |
787 | a3d2b515 | Stavros Sachtouris | cpuBar="https://www.example.org/stats/snf-42/cpu-bar/", |
788 | a3d2b515 | Stavros Sachtouris | netTimeSeries="https://example.org/stats/snf-42/net-ts/", |
789 | a3d2b515 | Stavros Sachtouris | netBar="https://example.org/stats/snf-42/net-bar/", |
790 | a3d2b515 | Stavros Sachtouris | cpuTimeSeries="https://www.example.org/stats/snf-42/cpu-ts/" |
791 | 2cd1c00a | Giorgos Verigakis | </stats> |
792 | 2cd1c00a | Giorgos Verigakis | |
793 | 671d6f05 | Stavros Sachtouris | Get Server Diagnostics |
794 | a3d2b515 | Stavros Sachtouris | ---------------------- |
795 | 671d6f05 | Stavros Sachtouris | |
796 | 68386e00 | Stavros Sachtouris | .. note:: This operation is not part of OS/Compute v2. |
797 | 671d6f05 | Stavros Sachtouris | |
798 | 68386e00 | Stavros Sachtouris | This operation returns diagnostic information (logs) for a server. |
799 | 68386e00 | Stavros Sachtouris | |
800 | 68386e00 | Stavros Sachtouris | .. rubric:: Request |
801 | 671d6f05 | Stavros Sachtouris | |
802 | 671d6f05 | Stavros Sachtouris | ==================================== ====== ======== ========== |
803 | 68386e00 | Stavros Sachtouris | URI Method Cyclades OS/Compute |
804 | 671d6f05 | Stavros Sachtouris | ==================================== ====== ======== ========== |
805 | 671d6f05 | Stavros Sachtouris | ``/servers/<server-id>/diagnostics`` GET ✔ **✘** |
806 | 671d6f05 | Stavros Sachtouris | ==================================== ====== ======== ========== |
807 | 671d6f05 | Stavros Sachtouris | |
808 | 671d6f05 | Stavros Sachtouris | * **server-id** is the identifier of the virtual server |
809 | 671d6f05 | Stavros Sachtouris | |
810 | 671d6f05 | Stavros Sachtouris | | |
811 | 671d6f05 | Stavros Sachtouris | |
812 | 8a86499c | Stavros Sachtouris | ============== ========================= ======== ========== |
813 | 8a86499c | Stavros Sachtouris | Request Header Value Cyclades OS/Compute |
814 | 8a86499c | Stavros Sachtouris | ============== ========================= ======== ========== |
815 | 8a86499c | Stavros Sachtouris | X-Auth-Token User authentication token required required |
816 | 8a86499c | Stavros Sachtouris | ============== ========================= ======== ========== |
817 | 671d6f05 | Stavros Sachtouris | |
818 | 68386e00 | Stavros Sachtouris | .. note:: Request parameters should be empty |
819 | 68386e00 | Stavros Sachtouris | |
820 | 68386e00 | Stavros Sachtouris | .. note:: Request body should be empty |
821 | 68386e00 | Stavros Sachtouris | |
822 | 68386e00 | Stavros Sachtouris | .. rubric:: Response |
823 | 671d6f05 | Stavros Sachtouris | |
824 | 671d6f05 | Stavros Sachtouris | =========================== ===================== |
825 | 671d6f05 | Stavros Sachtouris | Return Code Description |
826 | 671d6f05 | Stavros Sachtouris | =========================== ===================== |
827 | 671d6f05 | Stavros Sachtouris | 200 (OK) Request succeeded |
828 | 671d6f05 | Stavros Sachtouris | 400 (Bad Request) Invalid server ID or Server deleted |
829 | 671d6f05 | Stavros Sachtouris | 401 (Unauthorized) Missing or expired user token |
830 | 671d6f05 | Stavros Sachtouris | 403 (Forbidden) Administratively suspended server |
831 | 671d6f05 | Stavros Sachtouris | 404 (Not Found) Server not found |
832 | 671d6f05 | Stavros Sachtouris | 500 (Internal Server Error) The request cannot be completed because of an |
833 | e7f266c3 | Stavros Sachtouris | \ internal error |
834 | 671d6f05 | Stavros Sachtouris | 503 (Service Unavailable) The server is not currently available |
835 | 671d6f05 | Stavros Sachtouris | =========================== ===================== |
836 | 671d6f05 | Stavros Sachtouris | |
837 | 68386e00 | Stavros Sachtouris | | |
838 | 68386e00 | Stavros Sachtouris | |
839 | 68386e00 | Stavros Sachtouris | Response body contents:: |
840 | 68386e00 | Stavros Sachtouris | |
841 | 68386e00 | Stavros Sachtouris | [ |
842 | 68386e00 | Stavros Sachtouris | { |
843 | 68386e00 | Stavros Sachtouris | <diagnostic attribute}: <value>, |
844 | 68386e00 | Stavros Sachtouris | ... |
845 | 68386e00 | Stavros Sachtouris | }, { |
846 | 68386e00 | Stavros Sachtouris | <diagnostic attribute}: <value>, |
847 | 68386e00 | Stavros Sachtouris | ... |
848 | 68386e00 | Stavros Sachtouris | }, |
849 | 68386e00 | Stavros Sachtouris | ... |
850 | 68386e00 | Stavros Sachtouris | ] |
851 | 671d6f05 | Stavros Sachtouris | |
852 | 671d6f05 | Stavros Sachtouris | ==================== =========== |
853 | 671d6f05 | Stavros Sachtouris | Diagnostic attribute Description |
854 | 671d6f05 | Stavros Sachtouris | ==================== =========== |
855 | 671d6f05 | Stavros Sachtouris | level Debug level |
856 | 671d6f05 | Stavros Sachtouris | created Log entry timestamp |
857 | 671d6f05 | Stavros Sachtouris | source Log source proccess |
858 | 3458183d | Constantinos Venetsanopoulos | source_date Log source date |
859 | 671d6f05 | Stavros Sachtouris | message Log description |
860 | 671d6f05 | Stavros Sachtouris | details Detailed log description |
861 | 671d6f05 | Stavros Sachtouris | ==================== =========== |
862 | 671d6f05 | Stavros Sachtouris | |
863 | 634ef3a8 | Stavros Sachtouris | *Example Get Server Diagnostics Response: JSON* |
864 | 671d6f05 | Stavros Sachtouris | |
865 | 671d6f05 | Stavros Sachtouris | .. code-block:: javascript |
866 | 671d6f05 | Stavros Sachtouris | |
867 | 671d6f05 | Stavros Sachtouris | [ |
868 | 671d6f05 | Stavros Sachtouris | { |
869 | 671d6f05 | Stavros Sachtouris | "level": "DEBUG", |
870 | 671d6f05 | Stavros Sachtouris | "created": "2013-04-09T15:25:53.965144+00:00", |
871 | 671d6f05 | Stavros Sachtouris | "source": "image-helper-task-start", |
872 | 671d6f05 | Stavros Sachtouris | "source_date": "2013-04-09T15:25:53.954695+00:00", |
873 | 671d6f05 | Stavros Sachtouris | "message": "FixPartitionTable", |
874 | 671d6f05 | Stavros Sachtouris | "details": null |
875 | 671d6f05 | Stavros Sachtouris | }, { |
876 | 671d6f05 | Stavros Sachtouris | "level": "DEBUG", |
877 | 671d6f05 | Stavros Sachtouris | "created": "2013-04-09T15:25:46.413718+00:00", |
878 | 671d6f05 | Stavros Sachtouris | "source": "image-info", |
879 | 671d6f05 | Stavros Sachtouris | "source_date": "2013-04-09T15:25:46.404477+00:00", |
880 | 671d6f05 | Stavros Sachtouris | "message": "Starting customization VM...", |
881 | 671d6f05 | Stavros Sachtouris | "details": null |
882 | 671d6f05 | Stavros Sachtouris | }, { |
883 | 671d6f05 | Stavros Sachtouris | "level": "DEBUG", |
884 | 671d6f05 | Stavros Sachtouris | "created": "2013-04-09T15:25:46.207038+00:00", |
885 | 671d6f05 | Stavros Sachtouris | "source": "image-info", |
886 | 671d6f05 | Stavros Sachtouris | "source_date": "2013-04-09T15:25:46.197183+00:00", |
887 | 671d6f05 | Stavros Sachtouris | "message": "Image copy finished.", |
888 | 671d6f05 | Stavros Sachtouris | "details": "All operations finished as they should. No errors reported." |
889 | 671d6f05 | Stavros Sachtouris | } |
890 | 671d6f05 | Stavros Sachtouris | ] |
891 | 671d6f05 | Stavros Sachtouris | |
892 | cfdbd784 | Stavros Sachtouris | Get Server Details |
893 | a3d2b515 | Stavros Sachtouris | ------------------ |
894 | cfdbd784 | Stavros Sachtouris | |
895 | 68386e00 | Stavros Sachtouris | This operation returns detailed information for a virtual server |
896 | 68386e00 | Stavros Sachtouris | |
897 | 68386e00 | Stavros Sachtouris | .. rubric:: Request |
898 | 68386e00 | Stavros Sachtouris | |
899 | cfdbd784 | Stavros Sachtouris | ======================== ====== ======== ========== |
900 | 68386e00 | Stavros Sachtouris | URI Method Cyclades OS/Compute |
901 | cfdbd784 | Stavros Sachtouris | ======================== ====== ======== ========== |
902 | cfdbd784 | Stavros Sachtouris | ``/servers/<server id>`` GET ✔ ✔ |
903 | cfdbd784 | Stavros Sachtouris | ======================== ====== ======== ========== |
904 | cfdbd784 | Stavros Sachtouris | |
905 | cfdbd784 | Stavros Sachtouris | * **server-id** is the identifier of the virtual server |
906 | cfdbd784 | Stavros Sachtouris | |
907 | cfdbd784 | Stavros Sachtouris | | |
908 | cfdbd784 | Stavros Sachtouris | |
909 | cfdbd784 | Stavros Sachtouris | ============== ========================= ======== ========== |
910 | 68386e00 | Stavros Sachtouris | Request Header Value Cyclades OS/Compute |
911 | cfdbd784 | Stavros Sachtouris | ============== ========================= ======== ========== |
912 | cfdbd784 | Stavros Sachtouris | X-Auth-Token User authentication token required required |
913 | cfdbd784 | Stavros Sachtouris | ============== ========================= ======== ========== |
914 | cfdbd784 | Stavros Sachtouris | |
915 | 68386e00 | Stavros Sachtouris | .. note:: Request parameters should be empty |
916 | 68386e00 | Stavros Sachtouris | |
917 | 68386e00 | Stavros Sachtouris | .. note:: Request body should be empty |
918 | 68386e00 | Stavros Sachtouris | |
919 | 68386e00 | Stavros Sachtouris | .. rubric:: Response |
920 | cfdbd784 | Stavros Sachtouris | |
921 | cfdbd784 | Stavros Sachtouris | =========================== ===================== |
922 | cfdbd784 | Stavros Sachtouris | Return Code Description |
923 | cfdbd784 | Stavros Sachtouris | =========================== ===================== |
924 | cfdbd784 | Stavros Sachtouris | 200 (OK) Request succeeded |
925 | cfdbd784 | Stavros Sachtouris | 400 (Bad Request) Malformed server id |
926 | cfdbd784 | Stavros Sachtouris | 401 (Unauthorized) Missing or expired user token |
927 | cfdbd784 | Stavros Sachtouris | 403 (Forbidden) Administratively suspended server |
928 | cfdbd784 | Stavros Sachtouris | 404 (Not Found) Server not found |
929 | a5ec880a | Stavros Sachtouris | 500 (Internal Server Error) The request cannot be completed because of an |
930 | e7f266c3 | Stavros Sachtouris | \ internal error |
931 | a5ec880a | Stavros Sachtouris | 503 (Service Unavailable) No available backends or service currently |
932 | e7f266c3 | Stavros Sachtouris | \ unavailable |
933 | cfdbd784 | Stavros Sachtouris | =========================== ===================== |
934 | cfdbd784 | Stavros Sachtouris | |
935 | cfdbd784 | Stavros Sachtouris | | |
936 | cfdbd784 | Stavros Sachtouris | |
937 | 68386e00 | Stavros Sachtouris | Response body contents:: |
938 | 68386e00 | Stavros Sachtouris | |
939 | 68386e00 | Stavros Sachtouris | server: { |
940 | 68386e00 | Stavros Sachtouris | <server attribute>: <value>, |
941 | 68386e00 | Stavros Sachtouris | ... |
942 | 68386e00 | Stavros Sachtouris | } |
943 | cfdbd784 | Stavros Sachtouris | |
944 | cfdbd784 | Stavros Sachtouris | ================= ====================== ======== ========== |
945 | 68386e00 | Stavros Sachtouris | Server Attributes Description Cyclades OS/Compute |
946 | cfdbd784 | Stavros Sachtouris | ================= ====================== ======== ========== |
947 | cfdbd784 | Stavros Sachtouris | id The server id ✔ ✔ |
948 | cfdbd784 | Stavros Sachtouris | name The server name ✔ ✔ |
949 | cfdbd784 | Stavros Sachtouris | hostId Server playground empty ✔ |
950 | cfdbd784 | Stavros Sachtouris | created Creation date ✔ ✔ |
951 | cfdbd784 | Stavros Sachtouris | updated Creation date ✔ ✔ |
952 | 45e274fc | Stavros Sachtouris | flavor The flavor id ✔ ✔ |
953 | 45e274fc | Stavros Sachtouris | image The image id ✔ ✔ |
954 | cfdbd784 | Stavros Sachtouris | progress Build progress ✔ ✔ |
955 | cfdbd784 | Stavros Sachtouris | status Server status ✔ ✔ |
956 | 0fbcb755 | Stavros Sachtouris | suspended If server is suspended ✔ **✘** |
957 | cfdbd784 | Stavros Sachtouris | attachments Network interfaces ✔ **✘** |
958 | cfdbd784 | Stavros Sachtouris | addresses Network interfaces **✘** ✔ |
959 | cfdbd784 | Stavros Sachtouris | metadata Server custom metadata ✔ ✔ |
960 | 0fbcb755 | Stavros Sachtouris | diagnostics Diagnostic information ✔ **✘** |
961 | cfdbd784 | Stavros Sachtouris | ================= ====================== ======== ========== |
962 | cfdbd784 | Stavros Sachtouris | |
963 | e31f6f23 | Stavros Sachtouris | * **hostId** is not used in Cyclades, but is returned as an empty string for |
964 | e31f6f23 | Stavros Sachtouris | compatibility |
965 | cfdbd784 | Stavros Sachtouris | |
966 | a5ec880a | Stavros Sachtouris | * **progress** is changing while the server is building up and has values |
967 | e31f6f23 | Stavros Sachtouris | between 0 and 100. When it reaches 100 the server is built. |
968 | cfdbd784 | Stavros Sachtouris | |
969 | de2e08f6 | Stavros Sachtouris | * **status** refers to `the status <#status-ref>`_ of the server |
970 | cfdbd784 | Stavros Sachtouris | |
971 | a5ec880a | Stavros Sachtouris | * **metadata** are custom key:value pairs used to specify various attributes of |
972 | e31f6f23 | Stavros Sachtouris | the VM (e.g. OS, super user, etc.) |
973 | cfdbd784 | Stavros Sachtouris | |
974 | a5ec880a | Stavros Sachtouris | * **attachments** in Cyclades are lists of network interfaces (NICs). |
975 | 68386e00 | Stavros Sachtouris | **Attachments** are different to OS/Compute's **addresses**. The former is a |
976 | a3d2b515 | Stavros Sachtouris | list of the server's `network interface connections <#attachments-ref>`_ while the |
977 | e31f6f23 | Stavros Sachtouris | later is just a list of networks. Thus, a Cyclades virtual server may be |
978 | e31f6f23 | Stavros Sachtouris | connected to the same network through more than one distinct network |
979 | e31f6f23 | Stavros Sachtouris | interfaces. |
980 | cfdbd784 | Stavros Sachtouris | |
981 | a5ec880a | Stavros Sachtouris | * **diagnostics** is a list of items that contain key:value information useful |
982 | e31f6f23 | Stavros Sachtouris | for diagnosing the server behavior and may be used by the administrators of |
983 | e31f6f23 | Stavros Sachtouris | deployed Synnefo setups. |
984 | 0fbcb755 | Stavros Sachtouris | |
985 | 634ef3a8 | Stavros Sachtouris | *Example Details for server with id 42042: JSON* |
986 | cfdbd784 | Stavros Sachtouris | |
987 | cfdbd784 | Stavros Sachtouris | .. code-block:: javascript |
988 | cfdbd784 | Stavros Sachtouris | |
989 | cfdbd784 | Stavros Sachtouris | { |
990 | cfdbd784 | Stavros Sachtouris | "server": { |
991 | 1d346984 | Stavros Sachtouris | "attachments": [ |
992 | 1d346984 | Stavros Sachtouris | { |
993 | 1d346984 | Stavros Sachtouris | "network_id": "1888", |
994 | 1d346984 | Stavros Sachtouris | "mac_address": "aa:0c:f5:ad:16:41", |
995 | 1d346984 | Stavros Sachtouris | "firewallProfile": "DISABLED", |
996 | 1d346984 | Stavros Sachtouris | "ipv4": "83.212.112.56", |
997 | 1d346984 | Stavros Sachtouris | "ipv6": "2001:648:2ffc:1119:a80c:f5ff:fead:1641", |
998 | 1d346984 | Stavros Sachtouris | "id": "nic-42042-0" |
999 | 1d346984 | Stavros Sachtouris | } |
1000 | 1d346984 | Stavros Sachtouris | ], |
1001 | 1d346984 | Stavros Sachtouris | "links": [ |
1002 | 1d346984 | Stavros Sachtouris | { |
1003 | 1d346984 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/servers/42031", |
1004 | 1d346984 | Stavros Sachtouris | "rel": "self" |
1005 | 1d346984 | Stavros Sachtouris | }, |
1006 | 1d346984 | Stavros Sachtouris | { |
1007 | 1d346984 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/servers/42042", |
1008 | 1d346984 | Stavros Sachtouris | "rel": "bookmark" |
1009 | 1d346984 | Stavros Sachtouris | } |
1010 | 1d346984 | Stavros Sachtouris | ], |
1011 | 1d346984 | Stavros Sachtouris | "created": "2011-05-02T20:51:08.527759+00:00", |
1012 | 1d346984 | Stavros Sachtouris | "flavor": { |
1013 | 1d346984 | Stavros Sachtouris | "id": 1, |
1014 | 1d346984 | Stavros Sachtouris | "links": [ |
1015 | 1d346984 | Stavros Sachtouris | { |
1016 | 1d346984 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/flavors/1", |
1017 | 1d346984 | Stavros Sachtouris | "rel": "self" |
1018 | 1d346984 | Stavros Sachtouris | }, |
1019 | 1d346984 | Stavros Sachtouris | { |
1020 | 1d346984 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/flavors/1", |
1021 | 1d346984 | Stavros Sachtouris | "rel": "bookmark" |
1022 | 1d346984 | Stavros Sachtouris | } |
1023 | 1d346984 | Stavros Sachtouris | ] |
1024 | 1d346984 | Stavros Sachtouris | |
1025 | 1d346984 | Stavros Sachtouris | }, |
1026 | 1d346984 | Stavros Sachtouris | "hostId": "", |
1027 | 1d346984 | Stavros Sachtouris | "id": "42042", |
1028 | 1d346984 | Stavros Sachtouris | "image": { |
1029 | 1d346984 | Stavros Sachtouris | "id": "im4g3-1d", |
1030 | 1d346984 | Stavros Sachtouris | "links": [ |
1031 | 1d346984 | Stavros Sachtouris | { |
1032 | 1d346984 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/images/im4g3-1d", |
1033 | 1d346984 | Stavros Sachtouris | "rel": "self" |
1034 | 1d346984 | Stavros Sachtouris | }, |
1035 | 1d346984 | Stavros Sachtouris | { |
1036 | 1d346984 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/images/im4g3-1d", |
1037 | 1d346984 | Stavros Sachtouris | "rel": "bookmark" |
1038 | 1d346984 | Stavros Sachtouris | }, |
1039 | 1d346984 | Stavros Sachtouris | { |
1040 | 1d346984 | Stavros Sachtouris | "href": "https://example.org/image/v1.0/images/im4g3-1d", |
1041 | 1d346984 | Stavros Sachtouris | "rel": "alternate" |
1042 | 1d346984 | Stavros Sachtouris | } |
1043 | 1d346984 | Stavros Sachtouris | ] |
1044 | 1d346984 | Stavros Sachtouris | }, |
1045 | 1d346984 | Stavros Sachtouris | "name": "My Example Server", |
1046 | 1d346984 | Stavros Sachtouris | "description": "A sample server to showcase server requests", |
1047 | 1d346984 | Stavros Sachtouris | "progress": "0", |
1048 | 1d346984 | Stavros Sachtouris | "status": "ACTIVE", |
1049 | 1d346984 | Stavros Sachtouris | "updated": "2011-05-29T14:59:11.267087+00:00", |
1050 | 1d346984 | Stavros Sachtouris | "suspended": false, |
1051 | 1d346984 | Stavros Sachtouris | "diagnostics": [ |
1052 | 1d346984 | Stavros Sachtouris | { |
1053 | 1d346984 | Stavros Sachtouris | "level": "DEBUG", |
1054 | 1d346984 | Stavros Sachtouris | "created": "2013-04-18T10:09:52.776920+00:00", |
1055 | 1d346984 | Stavros Sachtouris | "source": "image-info", |
1056 | 1d346984 | Stavros Sachtouris | "source_date": "2013-04-18T10:09:52.709791+00:00", |
1057 | 1d346984 | Stavros Sachtouris | "message": "Image customization finished successfully.", |
1058 | 1d346984 | Stavros Sachtouris | "details": null |
1059 | 1d346984 | Stavros Sachtouris | } |
1060 | 1d346984 | Stavros Sachtouris | ], |
1061 | cfdbd784 | Stavros Sachtouris | } |
1062 | cfdbd784 | Stavros Sachtouris | } |
1063 | cfdbd784 | Stavros Sachtouris | } |
1064 | 2cd1c00a | Giorgos Verigakis | |
1065 | 0fbcb755 | Stavros Sachtouris | Rename Server |
1066 | a3d2b515 | Stavros Sachtouris | ------------- |
1067 | 0fbcb755 | Stavros Sachtouris | |
1068 | 68386e00 | Stavros Sachtouris | Modify the ``name`` attribute of a virtual server. OS/Compute API also features |
1069 | 68386e00 | Stavros Sachtouris | the modification of IP addresses |
1070 | 68386e00 | Stavros Sachtouris | |
1071 | 68386e00 | Stavros Sachtouris | .. rubric:: Response |
1072 | 68386e00 | Stavros Sachtouris | |
1073 | 0fbcb755 | Stavros Sachtouris | ======================== ====== ======== ========== |
1074 | 68386e00 | Stavros Sachtouris | URI Method Cyclades OS/Compute |
1075 | 0fbcb755 | Stavros Sachtouris | ======================== ====== ======== ========== |
1076 | 0fbcb755 | Stavros Sachtouris | ``/servers/<server id>`` PUT ✔ ✔ |
1077 | 0fbcb755 | Stavros Sachtouris | ======================== ====== ======== ========== |
1078 | 0fbcb755 | Stavros Sachtouris | |
1079 | 0fbcb755 | Stavros Sachtouris | * **server-id** is the identifier of the virtual server |
1080 | 0fbcb755 | Stavros Sachtouris | |
1081 | 0fbcb755 | Stavros Sachtouris | | |
1082 | 0fbcb755 | Stavros Sachtouris | |
1083 | 0fbcb755 | Stavros Sachtouris | ============== ========================= ======== ========== |
1084 | 68386e00 | Stavros Sachtouris | Request Header Value Cyclades OS/Compute |
1085 | 0fbcb755 | Stavros Sachtouris | ============== ========================= ======== ========== |
1086 | 0fbcb755 | Stavros Sachtouris | X-Auth-Token User authentication token required required |
1087 | 634ef3a8 | Stavros Sachtouris | Content-Type Type or request body required required |
1088 | 634ef3a8 | Stavros Sachtouris | Content-Length Length of request body required required |
1089 | 0fbcb755 | Stavros Sachtouris | ============== ========================= ======== ========== |
1090 | 0fbcb755 | Stavros Sachtouris | |
1091 | 634ef3a8 | Stavros Sachtouris | **Example Request Headers**:: |
1092 | 634ef3a8 | Stavros Sachtouris | |
1093 | 634ef3a8 | Stavros Sachtouris | X-Auth-Token: z31uRXUn1LZy45p1r7V== |
1094 | 634ef3a8 | Stavros Sachtouris | Content-Type: application/json |
1095 | 634ef3a8 | Stavros Sachtouris | Content-Length: 54 |
1096 | 634ef3a8 | Stavros Sachtouris | |
1097 | 68386e00 | Stavros Sachtouris | .. note:: Request parameters should be empty |
1098 | 68386e00 | Stavros Sachtouris | |
1099 | 68386e00 | Stavros Sachtouris | Request body contents:: |
1100 | 68386e00 | Stavros Sachtouris | |
1101 | 68386e00 | Stavros Sachtouris | server: { |
1102 | 68386e00 | Stavros Sachtouris | <server attribute>: <value>, |
1103 | 68386e00 | Stavros Sachtouris | ... |
1104 | 68386e00 | Stavros Sachtouris | } |
1105 | 0fbcb755 | Stavros Sachtouris | |
1106 | 0fbcb755 | Stavros Sachtouris | =========== ==================== ======== ========== |
1107 | 68386e00 | Stavros Sachtouris | Attribute Description Cyclades OS/Compute |
1108 | 0fbcb755 | Stavros Sachtouris | =========== ==================== ======== ========== |
1109 | 0fbcb755 | Stavros Sachtouris | name The server name ✔ ✔ |
1110 | 0fbcb755 | Stavros Sachtouris | accessIPv4 IP v4 address **✘** ✔ |
1111 | 0fbcb755 | Stavros Sachtouris | accessIPv6 IP v6 address **✘** ✔ |
1112 | 0fbcb755 | Stavros Sachtouris | =========== ==================== ======== ========== |
1113 | 0fbcb755 | Stavros Sachtouris | |
1114 | 68386e00 | Stavros Sachtouris | * Cyclades support multiple network connections per virtual server, which |
1115 | 68386e00 | Stavros Sachtouris | explains the above differences in request body attributes. |
1116 | 0fbcb755 | Stavros Sachtouris | |
1117 | 634ef3a8 | Stavros Sachtouris | *Example Rename Server Request: JSON* |
1118 | 634ef3a8 | Stavros Sachtouris | |
1119 | 634ef3a8 | Stavros Sachtouris | .. code-block:: javascript |
1120 | 634ef3a8 | Stavros Sachtouris | |
1121 | 634ef3a8 | Stavros Sachtouris | {"server": {"name": "A new name for my virtual server"}} |
1122 | 634ef3a8 | Stavros Sachtouris | |
1123 | 68386e00 | Stavros Sachtouris | .. rubric:: Response |
1124 | 0fbcb755 | Stavros Sachtouris | |
1125 | 0fbcb755 | Stavros Sachtouris | =========================== ===================== |
1126 | 0fbcb755 | Stavros Sachtouris | Return Code Description |
1127 | 0fbcb755 | Stavros Sachtouris | =========================== ===================== |
1128 | 0fbcb755 | Stavros Sachtouris | 204 (OK) Request succeeded |
1129 | 0fbcb755 | Stavros Sachtouris | 400 (Bad Request) Malformed request or malformed server id |
1130 | 0fbcb755 | Stavros Sachtouris | 401 (Unauthorized) Missing or expired user token |
1131 | 0fbcb755 | Stavros Sachtouris | 403 (Forbidden) User is not allowed to perform this operation |
1132 | 0fbcb755 | Stavros Sachtouris | 404 (Not Found) Server not found |
1133 | 0fbcb755 | Stavros Sachtouris | 415 (Bad Media Type) |
1134 | 0fbcb755 | Stavros Sachtouris | 409 (Build In Progress) Server is not ready yet |
1135 | a5ec880a | Stavros Sachtouris | 500 (Internal Server Error) The request cannot be completed because of an |
1136 | e7f266c3 | Stavros Sachtouris | \ internal error |
1137 | a5ec880a | Stavros Sachtouris | 503 (Service Unavailable) No available backends or service currently |
1138 | e7f266c3 | Stavros Sachtouris | \ unavailable |
1139 | 0fbcb755 | Stavros Sachtouris | =========================== ===================== |
1140 | 0fbcb755 | Stavros Sachtouris | |
1141 | 68386e00 | Stavros Sachtouris | .. note:: In case of a 204 return code, there will be no request results |
1142 | 68386e00 | Stavros Sachtouris | according to the Cyclades API. Compute OS API suggests that response should |
1143 | 68386e00 | Stavros Sachtouris | include the new server details. |
1144 | 0fbcb755 | Stavros Sachtouris | |
1145 | eb775de0 | Stavros Sachtouris | Delete Server |
1146 | a3d2b515 | Stavros Sachtouris | ------------- |
1147 | eb775de0 | Stavros Sachtouris | |
1148 | 68386e00 | Stavros Sachtouris | Delete a virtual server. When a server is deleted, all its connections are |
1149 | 68386e00 | Stavros Sachtouris | deleted as well. |
1150 | 68386e00 | Stavros Sachtouris | |
1151 | 68386e00 | Stavros Sachtouris | .. rubric:: Request |
1152 | 68386e00 | Stavros Sachtouris | |
1153 | eb775de0 | Stavros Sachtouris | ======================== ====== ======== ========== |
1154 | 68386e00 | Stavros Sachtouris | URI Method Cyclades OS/Compute |
1155 | eb775de0 | Stavros Sachtouris | ======================== ====== ======== ========== |
1156 | eb775de0 | Stavros Sachtouris | ``/servers/<server id>`` DELETE ✔ ✔ |
1157 | eb775de0 | Stavros Sachtouris | ======================== ====== ======== ========== |
1158 | eb775de0 | Stavros Sachtouris | |
1159 | e31f6f23 | Stavros Sachtouris | * **server-id** is the identifier of the virtual server. |
1160 | eb775de0 | Stavros Sachtouris | |
1161 | eb775de0 | Stavros Sachtouris | | |
1162 | eb775de0 | Stavros Sachtouris | |
1163 | eb775de0 | Stavros Sachtouris | ============== ========================= ======== ========== |
1164 | 68386e00 | Stavros Sachtouris | Request Header Value Cyclades OS/Compute |
1165 | eb775de0 | Stavros Sachtouris | ============== ========================= ======== ========== |
1166 | eb775de0 | Stavros Sachtouris | X-Auth-Token User authentication token required required |
1167 | eb775de0 | Stavros Sachtouris | ============== ========================= ======== ========== |
1168 | eb775de0 | Stavros Sachtouris | |
1169 | 68386e00 | Stavros Sachtouris | .. note:: Request parameters should be empty |
1170 | 68386e00 | Stavros Sachtouris | |
1171 | 68386e00 | Stavros Sachtouris | .. note:: Request body should be empty |
1172 | 68386e00 | Stavros Sachtouris | |
1173 | 68386e00 | Stavros Sachtouris | .. rubric:: Response |
1174 | eb775de0 | Stavros Sachtouris | |
1175 | eb775de0 | Stavros Sachtouris | =========================== ===================== |
1176 | eb775de0 | Stavros Sachtouris | Return Code Description |
1177 | eb775de0 | Stavros Sachtouris | =========================== ===================== |
1178 | eb775de0 | Stavros Sachtouris | 204 (OK) Request succeeded |
1179 | eb775de0 | Stavros Sachtouris | 400 (Bad Request) Malformed server id or machine already deleted |
1180 | eb775de0 | Stavros Sachtouris | 401 (Unauthorized) Missing or expired user token |
1181 | eb775de0 | Stavros Sachtouris | 404 (Not Found) Server not found |
1182 | eb775de0 | Stavros Sachtouris | 409 (Build In Progress) Server is not ready yet |
1183 | a5ec880a | Stavros Sachtouris | 500 (Internal Server Error) The request cannot be completed because of an |
1184 | e7f266c3 | Stavros Sachtouris | \ internal error |
1185 | a5ec880a | Stavros Sachtouris | 503 (Service Unavailable) Action not supported or service currently |
1186 | e7f266c3 | Stavros Sachtouris | \ unavailable |
1187 | eb775de0 | Stavros Sachtouris | =========================== ===================== |
1188 | eb775de0 | Stavros Sachtouris | |
1189 | 68386e00 | Stavros Sachtouris | .. note:: In case of a 204 code, response body should be empty |
1190 | 2cd1c00a | Giorgos Verigakis | |
1191 | e31f6f23 | Stavros Sachtouris | List Server Addresses |
1192 | a3d2b515 | Stavros Sachtouris | --------------------- |
1193 | 4935e468 | Stavros Sachtouris | |
1194 | 68386e00 | Stavros Sachtouris | List all network connections of a server. In Cyclades API, connections are |
1195 | 68386e00 | Stavros Sachtouris | represented as Network Connection Interfaces (NICs), which describe a server - |
1196 | 68386e00 | Stavros Sachtouris | network relation through their respective identifiers. This mechanism ensures |
1197 | 68386e00 | Stavros Sachtouris | flexibility and multiple networks connecting the same virtual servers. |
1198 | 68386e00 | Stavros Sachtouris | |
1199 | 68386e00 | Stavros Sachtouris | The Synnefo/Cyclades approach in this matter differs substantially to the |
1200 | 68386e00 | Stavros Sachtouris | `one suggested by the OS/Compute API <http://docs.openstack.org/api/openstack-compute/2/content/List_Addresses-d1e3014.html>`_. |
1201 | 68386e00 | Stavros Sachtouris | |
1202 | 68386e00 | Stavros Sachtouris | .. rubric:: Request |
1203 | 4935e468 | Stavros Sachtouris | |
1204 | 4935e468 | Stavros Sachtouris | ============================ ====== ======== ========== |
1205 | 68386e00 | Stavros Sachtouris | URI Method Cyclades OS/Compute |
1206 | 4935e468 | Stavros Sachtouris | ============================ ====== ======== ========== |
1207 | 4935e468 | Stavros Sachtouris | ``/servers/<server id>/ips`` GET ✔ ✔ |
1208 | 4935e468 | Stavros Sachtouris | ============================ ====== ======== ========== |
1209 | 4935e468 | Stavros Sachtouris | |
1210 | 4935e468 | Stavros Sachtouris | * **server-id** is the identifier of the virtual server |
1211 | 4935e468 | Stavros Sachtouris | |
1212 | 4935e468 | Stavros Sachtouris | | |
1213 | 4935e468 | Stavros Sachtouris | |
1214 | 4935e468 | Stavros Sachtouris | ============== ========================= ======== ========== |
1215 | 68386e00 | Stavros Sachtouris | Request Header Value Cyclades OS/Compute |
1216 | 4935e468 | Stavros Sachtouris | ============== ========================= ======== ========== |
1217 | 4935e468 | Stavros Sachtouris | X-Auth-Token User authentication token required required |
1218 | 4935e468 | Stavros Sachtouris | ============== ========================= ======== ========== |
1219 | 4935e468 | Stavros Sachtouris | |
1220 | 68386e00 | Stavros Sachtouris | .. note:: Request parameters should be empty |
1221 | 4935e468 | Stavros Sachtouris | |
1222 | 68386e00 | Stavros Sachtouris | .. note:: Request body should be empty |
1223 | 4935e468 | Stavros Sachtouris | |
1224 | 68386e00 | Stavros Sachtouris | .. rubric:: Response |
1225 | 4935e468 | Stavros Sachtouris | |
1226 | 4935e468 | Stavros Sachtouris | =========================== ===================== |
1227 | 4935e468 | Stavros Sachtouris | Return Code Description |
1228 | 4935e468 | Stavros Sachtouris | =========================== ===================== |
1229 | 4935e468 | Stavros Sachtouris | 200 (OK) Request succeeded |
1230 | 4935e468 | Stavros Sachtouris | 400 (Bad Request) Malformed server id or machine already deleted |
1231 | 4935e468 | Stavros Sachtouris | 401 (Unauthorized) Missing or expired user token |
1232 | 4935e468 | Stavros Sachtouris | 404 (Not Found) Server not found |
1233 | 4935e468 | Stavros Sachtouris | 409 (Build In Progress) Server is not ready yet |
1234 | a5ec880a | Stavros Sachtouris | 500 (Internal Server Error) The request cannot be completed because of an |
1235 | e7f266c3 | Stavros Sachtouris | \ internal error |
1236 | 4935e468 | Stavros Sachtouris | 503 (Service Unavailable) Service currently unavailable |
1237 | 4935e468 | Stavros Sachtouris | =========================== ===================== |
1238 | 4935e468 | Stavros Sachtouris | |
1239 | 68386e00 | Stavros Sachtouris | Response body contents:: |
1240 | 68386e00 | Stavros Sachtouris | |
1241 | 45e274fc | Stavros Sachtouris | addresses: [ |
1242 | 68386e00 | Stavros Sachtouris | { |
1243 | 68386e00 | Stavros Sachtouris | <NIC attribute>: <value>, |
1244 | 68386e00 | Stavros Sachtouris | ... |
1245 | 68386e00 | Stavros Sachtouris | }, |
1246 | 68386e00 | Stavros Sachtouris | ... |
1247 | 45e274fc | Stavros Sachtouris | ] |
1248 | 4935e468 | Stavros Sachtouris | |
1249 | 68386e00 | Stavros Sachtouris | A Network Interface Connection (or NIC) connects the current server to a |
1250 | 68386e00 | Stavros Sachtouris | network, through their respective identifiers. More information in NIC |
1251 | a3d2b515 | Stavros Sachtouris | attributes are `enlisted here <#attachments-ref>`_. |
1252 | 4935e468 | Stavros Sachtouris | |
1253 | 634ef3a8 | Stavros Sachtouris | *Example List Addresses: JSON* |
1254 | 4935e468 | Stavros Sachtouris | |
1255 | 4935e468 | Stavros Sachtouris | .. code-block:: javascript |
1256 | 4935e468 | Stavros Sachtouris | |
1257 | 4935e468 | Stavros Sachtouris | { |
1258 | 45e274fc | Stavros Sachtouris | "addresses": [ |
1259 | 45e274fc | Stavros Sachtouris | { |
1260 | 45e274fc | Stavros Sachtouris | "id": "nic-25455-0" |
1261 | 45e274fc | Stavros Sachtouris | "network_id": "1", |
1262 | 45e274fc | Stavros Sachtouris | "mac_address": "aa:00:03:7a:84:bb", |
1263 | 45e274fc | Stavros Sachtouris | "firewallProfile": "DISABLED", |
1264 | 45e274fc | Stavros Sachtouris | "ipv4": "192.168.0.27", |
1265 | 45e274fc | Stavros Sachtouris | "ipv6": "2001:646:2ffc:1222:a820:3fd:fe7a:84bb", |
1266 | 45e274fc | Stavros Sachtouris | }, { |
1267 | 45e274fc | Stavros Sachtouris | "id": "nic-25455-1" |
1268 | 45e274fc | Stavros Sachtouris | "network_id": "7", |
1269 | 45e274fc | Stavros Sachtouris | "mac_address": "aa:00:03:7a:84:cc", |
1270 | 45e274fc | Stavros Sachtouris | "firewallProfile": "DISABLED", |
1271 | 45e274fc | Stavros Sachtouris | "ipv4": "192.168.0.28", |
1272 | 45e274fc | Stavros Sachtouris | "ipv6": "2002:646:2fec:1222:a820:3fd:fe7a:84bc", |
1273 | 45e274fc | Stavros Sachtouris | }, |
1274 | 45e274fc | Stavros Sachtouris | ] |
1275 | 4935e468 | Stavros Sachtouris | } |
1276 | 4935e468 | Stavros Sachtouris | |
1277 | 68386e00 | Stavros Sachtouris | Get Server NICs by Network |
1278 | a3d2b515 | Stavros Sachtouris | -------------------------- |
1279 | 68386e00 | Stavros Sachtouris | |
1280 | 68386e00 | Stavros Sachtouris | Return the NIC that connects a server to a network. |
1281 | 68386e00 | Stavros Sachtouris | |
1282 | 68386e00 | Stavros Sachtouris | The semantics of this operation are substantially different to the respective |
1283 | 68386e00 | Stavros Sachtouris | OS/Compute |
1284 | 68386e00 | Stavros Sachtouris | `List Addresses by Network semantics <http://docs.openstack.org/api/openstack-compute/2/content/List_Addresses_by_Network-d1e3118.html>`_. |
1285 | 8e3906eb | Stavros Sachtouris | |
1286 | 68386e00 | Stavros Sachtouris | .. rubric:: Request |
1287 | 8e3906eb | Stavros Sachtouris | |
1288 | 8e3906eb | Stavros Sachtouris | ========================================= ====== ======== ========== |
1289 | 68386e00 | Stavros Sachtouris | URI Method Cyclades OS/Compute |
1290 | 8e3906eb | Stavros Sachtouris | ========================================= ====== ======== ========== |
1291 | 8e3906eb | Stavros Sachtouris | ``/servers/<server id>/ips/<network id>`` GET ✔ ✔ |
1292 | 8e3906eb | Stavros Sachtouris | ========================================= ====== ======== ========== |
1293 | 8e3906eb | Stavros Sachtouris | |
1294 | 68386e00 | Stavros Sachtouris | * **server id** is the identifier of the virtual server |
1295 | 8e3906eb | Stavros Sachtouris | |
1296 | 68386e00 | Stavros Sachtouris | * **network id** is the identifier of the network |
1297 | 8e3906eb | Stavros Sachtouris | |
1298 | 8e3906eb | Stavros Sachtouris | | |
1299 | 8e3906eb | Stavros Sachtouris | |
1300 | 8e3906eb | Stavros Sachtouris | ============== ========================= ======== ========== |
1301 | 68386e00 | Stavros Sachtouris | Request Header Value Cyclades OS/Compute |
1302 | 8e3906eb | Stavros Sachtouris | ============== ========================= ======== ========== |
1303 | 8e3906eb | Stavros Sachtouris | X-Auth-Token User authentication token required required |
1304 | 8e3906eb | Stavros Sachtouris | ============== ========================= ======== ========== |
1305 | 8e3906eb | Stavros Sachtouris | |
1306 | 68386e00 | Stavros Sachtouris | .. note:: Request parameters should be empty |
1307 | 8e3906eb | Stavros Sachtouris | |
1308 | 68386e00 | Stavros Sachtouris | .. note:: Request body should be empty |
1309 | 8e3906eb | Stavros Sachtouris | |
1310 | 68386e00 | Stavros Sachtouris | .. rubric:: Response |
1311 | 8e3906eb | Stavros Sachtouris | |
1312 | 8e3906eb | Stavros Sachtouris | =========================== ===================== |
1313 | 8e3906eb | Stavros Sachtouris | Return Code Description |
1314 | 8e3906eb | Stavros Sachtouris | =========================== ===================== |
1315 | 8e3906eb | Stavros Sachtouris | 200 (OK) Request succeeded |
1316 | 8e3906eb | Stavros Sachtouris | 400 (Bad Request) Malformed server id or machine already deleted |
1317 | 8e3906eb | Stavros Sachtouris | 401 (Unauthorized) Missing or expired user token |
1318 | 8e3906eb | Stavros Sachtouris | 404 (Not Found) Server not found |
1319 | 8e3906eb | Stavros Sachtouris | 409 (Build In Progress) Server is not ready yet |
1320 | a5ec880a | Stavros Sachtouris | 500 (Internal Server Error) The request cannot be completed because of an |
1321 | e7f266c3 | Stavros Sachtouris | \ internal error |
1322 | 8e3906eb | Stavros Sachtouris | 503 (Service Unavailable) Service currently unavailable |
1323 | 8e3906eb | Stavros Sachtouris | =========================== ===================== |
1324 | 8e3906eb | Stavros Sachtouris | |
1325 | 68386e00 | Stavros Sachtouris | | |
1326 | 68386e00 | Stavros Sachtouris | |
1327 | 68386e00 | Stavros Sachtouris | Response body contents:: |
1328 | 68386e00 | Stavros Sachtouris | |
1329 | 68386e00 | Stavros Sachtouris | network: { |
1330 | 68386e00 | Stavros Sachtouris | <NIC attributes>: <value>, |
1331 | 68386e00 | Stavros Sachtouris | ... |
1332 | 68386e00 | Stavros Sachtouris | } |
1333 | 8e3906eb | Stavros Sachtouris | |
1334 | a3d2b515 | Stavros Sachtouris | Network Interface Connection (NIC) attributes are listed `here <#attachments-ref>`_. |
1335 | 8e3906eb | Stavros Sachtouris | |
1336 | 68386e00 | Stavros Sachtouris | **List Server NICs Example with server id 25455, network id 7: JSON** |
1337 | 8e3906eb | Stavros Sachtouris | |
1338 | 8e3906eb | Stavros Sachtouris | .. code-block:: javascript |
1339 | 8e3906eb | Stavros Sachtouris | |
1340 | 8e3906eb | Stavros Sachtouris | { |
1341 | 8e3906eb | Stavros Sachtouris | "network": { |
1342 | 68386e00 | Stavros Sachtouris | "id": "nic-25455-0" |
1343 | e31f6f23 | Stavros Sachtouris | "network_id": "7", |
1344 | e31f6f23 | Stavros Sachtouris | "mac_address": "aa:00:03:7a:84:bb", |
1345 | e31f6f23 | Stavros Sachtouris | "firewallProfile": "DISABLED", |
1346 | e31f6f23 | Stavros Sachtouris | "ipv4": "192.168.0.27", |
1347 | e31f6f23 | Stavros Sachtouris | "ipv6": "2001:646:2ffc:1222:a820:3fd:fe7a:84bb", |
1348 | 8e3906eb | Stavros Sachtouris | } |
1349 | 8e3906eb | Stavros Sachtouris | } |
1350 | 8e3906eb | Stavros Sachtouris | |
1351 | 2cd1c00a | Giorgos Verigakis | |
1352 | 68386e00 | Stavros Sachtouris | List Server Metadata |
1353 | a3d2b515 | Stavros Sachtouris | -------------------- |
1354 | 2cd1c00a | Giorgos Verigakis | |
1355 | 68386e00 | Stavros Sachtouris | List the metadata of a server |
1356 | 68386e00 | Stavros Sachtouris | |
1357 | 68386e00 | Stavros Sachtouris | .. note:: This operation is semantically equivalent in Cyclades and OS/Compute |
1358 | 68386e00 | Stavros Sachtouris | besides the different URI. |
1359 | 68386e00 | Stavros Sachtouris | |
1360 | 68386e00 | Stavros Sachtouris | .. rubric:: Request |
1361 | a5ec880a | Stavros Sachtouris | |
1362 | a5ec880a | Stavros Sachtouris | ================================= ====== ======== ========== |
1363 | 68386e00 | Stavros Sachtouris | URI Method Cyclades OS/Compute |
1364 | a5ec880a | Stavros Sachtouris | ================================= ====== ======== ========== |
1365 | 45e274fc | Stavros Sachtouris | ``/servers/<server-id>/metadata`` GET ✔ ✔ |
1366 | a5ec880a | Stavros Sachtouris | ================================= ====== ======== ========== |
1367 | a5ec880a | Stavros Sachtouris | |
1368 | a5ec880a | Stavros Sachtouris | * **server-id** is the identifier of the virtual server |
1369 | a5ec880a | Stavros Sachtouris | |
1370 | a5ec880a | Stavros Sachtouris | | |
1371 | a5ec880a | Stavros Sachtouris | |
1372 | e31f6f23 | Stavros Sachtouris | ============== ========================= ======== ========== |
1373 | 68386e00 | Stavros Sachtouris | Request Header Value Cyclades OS/Compute |
1374 | e31f6f23 | Stavros Sachtouris | ============== ========================= ======== ========== |
1375 | e31f6f23 | Stavros Sachtouris | X-Auth-Token User authentication token required required |
1376 | e31f6f23 | Stavros Sachtouris | ============== ========================= ======== ========== |
1377 | a5ec880a | Stavros Sachtouris | |
1378 | 68386e00 | Stavros Sachtouris | .. note:: Request parameters should be empty |
1379 | 68386e00 | Stavros Sachtouris | |
1380 | 68386e00 | Stavros Sachtouris | .. note:: Request body should be empty |
1381 | 68386e00 | Stavros Sachtouris | |
1382 | 68386e00 | Stavros Sachtouris | .. rubric:: Response |
1383 | a5ec880a | Stavros Sachtouris | |
1384 | a5ec880a | Stavros Sachtouris | =========================== ===================== |
1385 | a5ec880a | Stavros Sachtouris | Return Code Description |
1386 | a5ec880a | Stavros Sachtouris | =========================== ===================== |
1387 | a5ec880a | Stavros Sachtouris | 200 (OK) Request succeeded |
1388 | a5ec880a | Stavros Sachtouris | 400 (Bad Request) Invalid server ID or Malformed request |
1389 | a5ec880a | Stavros Sachtouris | 401 (Unauthorized) Missing or expired user token |
1390 | a5ec880a | Stavros Sachtouris | 403 (Forbidden) Administratively suspended server |
1391 | a5ec880a | Stavros Sachtouris | 404 (Not Found) Server not found |
1392 | a5ec880a | Stavros Sachtouris | 500 (Internal Server Error) The request cannot be completed because of an |
1393 | e7f266c3 | Stavros Sachtouris | \ internal error |
1394 | a5ec880a | Stavros Sachtouris | 503 (Service Unavailable) The server is not currently available |
1395 | a5ec880a | Stavros Sachtouris | =========================== ===================== |
1396 | a5ec880a | Stavros Sachtouris | |
1397 | 68386e00 | Stavros Sachtouris | Response body contents:: |
1398 | 68386e00 | Stavros Sachtouris | |
1399 | 45e274fc | Stavros Sachtouris | metadata: { |
1400 | 45e274fc | Stavros Sachtouris | <key>: <value>, |
1401 | 68386e00 | Stavros Sachtouris | ... |
1402 | 68386e00 | Stavros Sachtouris | } |
1403 | 68386e00 | Stavros Sachtouris | |
1404 | 634ef3a8 | Stavros Sachtouris | *Example List Server Metadata: JSON* |
1405 | 68386e00 | Stavros Sachtouris | |
1406 | 68386e00 | Stavros Sachtouris | .. code-block:: javascript |
1407 | a5ec880a | Stavros Sachtouris | |
1408 | 3458183d | Constantinos Venetsanopoulos | { |
1409 | e31f6f23 | Stavros Sachtouris | ""metadata": { |
1410 | 45e274fc | Stavros Sachtouris | "OS": "Linux", |
1411 | 45e274fc | Stavros Sachtouris | "users": "root" |
1412 | a5ec880a | Stavros Sachtouris | } |
1413 | a5ec880a | Stavros Sachtouris | } |
1414 | a5ec880a | Stavros Sachtouris | |
1415 | a5ec880a | Stavros Sachtouris | Set / Update Server Metadata |
1416 | a3d2b515 | Stavros Sachtouris | ---------------------------- |
1417 | a5ec880a | Stavros Sachtouris | |
1418 | a5ec880a | Stavros Sachtouris | In Cyclades API, setting new metadata and updating the values of existing ones |
1419 | 68386e00 | Stavros Sachtouris | is achieved with the same type of request (``POST``), while in OS/Compute API |
1420 | 68386e00 | Stavros Sachtouris | there are two separate request types (``PUT`` and ``POST`` for |
1421 | a5ec880a | Stavros Sachtouris | `setting new <http://docs.openstack.org/api/openstack-compute/2/content/Create_or_Replace_Metadata-d1e5358.html>`_ |
1422 | a5ec880a | Stavros Sachtouris | and |
1423 | a5ec880a | Stavros Sachtouris | `updating existing <http://docs.openstack.org/api/openstack-compute/2/content/Update_Metadata-d1e5208.html>`_ |
1424 | a5ec880a | Stavros Sachtouris | metadata, respectively). |
1425 | a5ec880a | Stavros Sachtouris | |
1426 | c347ba83 | Stavros Sachtouris | In Cyclades API, metadata keys which are not referred by the operation will |
1427 | 68386e00 | Stavros Sachtouris | remain intact, while metadata referred by the operation will be overwritten. |
1428 | 68386e00 | Stavros Sachtouris | |
1429 | 68386e00 | Stavros Sachtouris | .. rubric:: Request |
1430 | a5ec880a | Stavros Sachtouris | |
1431 | a5ec880a | Stavros Sachtouris | ================================= ====== ======== ========== |
1432 | 68386e00 | Stavros Sachtouris | URI Method Cyclades OS/Compute |
1433 | a5ec880a | Stavros Sachtouris | ================================= ====== ======== ========== |
1434 | a5ec880a | Stavros Sachtouris | ``/servers/<server-id>/metadata`` PUT **✘** ✔ |
1435 | 45e274fc | Stavros Sachtouris | ``/servers/<server-id>/metadata`` POST ✔ ✔ |
1436 | a5ec880a | Stavros Sachtouris | ================================= ====== ======== ========== |
1437 | a5ec880a | Stavros Sachtouris | |
1438 | a5ec880a | Stavros Sachtouris | * **server-id** is the identifier of the virtual server |
1439 | a5ec880a | Stavros Sachtouris | |
1440 | a5ec880a | Stavros Sachtouris | | |
1441 | a5ec880a | Stavros Sachtouris | |
1442 | e31f6f23 | Stavros Sachtouris | ============== ========================= ======== ========== |
1443 | 68386e00 | Stavros Sachtouris | Request Header Value Cyclades OS/Compute |
1444 | e31f6f23 | Stavros Sachtouris | ============== ========================= ======== ========== |
1445 | e31f6f23 | Stavros Sachtouris | X-Auth-Token User authentication token required required |
1446 | 634ef3a8 | Stavros Sachtouris | Content-Type Type or request body required required |
1447 | 634ef3a8 | Stavros Sachtouris | Content-Length Length of request body required required |
1448 | e31f6f23 | Stavros Sachtouris | ============== ========================= ======== ========== |
1449 | a5ec880a | Stavros Sachtouris | |
1450 | 634ef3a8 | Stavros Sachtouris | **Example Request Headers**:: |
1451 | 634ef3a8 | Stavros Sachtouris | |
1452 | 634ef3a8 | Stavros Sachtouris | X-Auth-Token: z31uRXUn1LZy45p1r7V== |
1453 | 634ef3a8 | Stavros Sachtouris | Content-Type: application/json |
1454 | 634ef3a8 | Stavros Sachtouris | Content-Length: 56 |
1455 | 634ef3a8 | Stavros Sachtouris | |
1456 | 68386e00 | Stavros Sachtouris | .. note:: Request parameters should be empty |
1457 | a5ec880a | Stavros Sachtouris | |
1458 | 68386e00 | Stavros Sachtouris | Request body contents:: |
1459 | a5ec880a | Stavros Sachtouris | |
1460 | 68386e00 | Stavros Sachtouris | metadata: { |
1461 | 45e274fc | Stavros Sachtouris | <key>: <value>, |
1462 | 68386e00 | Stavros Sachtouris | ... |
1463 | 68386e00 | Stavros Sachtouris | } |
1464 | a5ec880a | Stavros Sachtouris | |
1465 | 634ef3a8 | Stavros Sachtouris | *Example Request Set / Update Server Metadata: JSON* |
1466 | 68386e00 | Stavros Sachtouris | |
1467 | 68386e00 | Stavros Sachtouris | .. code-block:: javascript |
1468 | 68386e00 | Stavros Sachtouris | |
1469 | 68386e00 | Stavros Sachtouris | {"metadata": {"role": "webmail", "users": "root,maild"}} |
1470 | 68386e00 | Stavros Sachtouris | |
1471 | 68386e00 | Stavros Sachtouris | .. rubric:: Response |
1472 | a5ec880a | Stavros Sachtouris | |
1473 | a5ec880a | Stavros Sachtouris | =========================== ===================== |
1474 | a5ec880a | Stavros Sachtouris | Return Code Description |
1475 | a5ec880a | Stavros Sachtouris | =========================== ===================== |
1476 | a5ec880a | Stavros Sachtouris | 201 (OK) Request succeeded |
1477 | a5ec880a | Stavros Sachtouris | 400 (Bad Request) Invalid server ID or Malformed request |
1478 | a5ec880a | Stavros Sachtouris | 401 (Unauthorized) Missing or expired user token |
1479 | a5ec880a | Stavros Sachtouris | 403 (Forbidden) Administratively suspended server |
1480 | a5ec880a | Stavros Sachtouris | 404 (Not Found) Server not found |
1481 | a5ec880a | Stavros Sachtouris | 413 (OverLimit) Maximum number of metadata exceeded |
1482 | a5ec880a | Stavros Sachtouris | 500 (Internal Server Error) The request cannot be completed because of an |
1483 | e7f266c3 | Stavros Sachtouris | \ internal error |
1484 | a5ec880a | Stavros Sachtouris | 503 (Service Unavailable) The server is not currently available |
1485 | a5ec880a | Stavros Sachtouris | =========================== ===================== |
1486 | a5ec880a | Stavros Sachtouris | |
1487 | 68386e00 | Stavros Sachtouris | Response body contents:: |
1488 | a5ec880a | Stavros Sachtouris | |
1489 | 68386e00 | Stavros Sachtouris | metadata: { |
1490 | 45e274fc | Stavros Sachtouris | <key>: <value>, |
1491 | 68386e00 | Stavros Sachtouris | ... |
1492 | 68386e00 | Stavros Sachtouris | } |
1493 | 68386e00 | Stavros Sachtouris | |
1494 | 634ef3a8 | Stavros Sachtouris | *Example Response Set / Update Server Metadata: JSON* |
1495 | 68386e00 | Stavros Sachtouris | |
1496 | 68386e00 | Stavros Sachtouris | .. code-block:: javascript |
1497 | a5ec880a | Stavros Sachtouris | |
1498 | 68386e00 | Stavros Sachtouris | {"metadata": {"OS": "Linux", "role": "webmail", "users": "root,maild"}} |
1499 | a5ec880a | Stavros Sachtouris | |
1500 | e31f6f23 | Stavros Sachtouris | Get Server Metadata Item |
1501 | a3d2b515 | Stavros Sachtouris | ------------------------ |
1502 | a5ec880a | Stavros Sachtouris | |
1503 | 45e274fc | Stavros Sachtouris | Get the value of a specific piece of metadata of a virtual server |
1504 | 68386e00 | Stavros Sachtouris | |
1505 | 68386e00 | Stavros Sachtouris | .. rubric:: Request |
1506 | a5ec880a | Stavros Sachtouris | |
1507 | a5ec880a | Stavros Sachtouris | ======================================= ====== ======== ========== |
1508 | 68386e00 | Stavros Sachtouris | URI Method Cyclades OS/Compute |
1509 | a5ec880a | Stavros Sachtouris | ======================================= ====== ======== ========== |
1510 | 45e274fc | Stavros Sachtouris | ``/servers/<server-id>/metadata/<key>`` GET ✔ ✔ |
1511 | a5ec880a | Stavros Sachtouris | ======================================= ====== ======== ========== |
1512 | a5ec880a | Stavros Sachtouris | |
1513 | a5ec880a | Stavros Sachtouris | * **server-id** is the identifier of the virtual server |
1514 | e31f6f23 | Stavros Sachtouris | |
1515 | a3d2b515 | Stavros Sachtouris | * **key** is the key of a mata ``key``:``value`` pair |
1516 | a5ec880a | Stavros Sachtouris | |
1517 | a5ec880a | Stavros Sachtouris | | |
1518 | a5ec880a | Stavros Sachtouris | |
1519 | e31f6f23 | Stavros Sachtouris | ============== ========================= ======== ========== |
1520 | 68386e00 | Stavros Sachtouris | Request Header Value Cyclades OS/Compute |
1521 | e31f6f23 | Stavros Sachtouris | ============== ========================= ======== ========== |
1522 | e31f6f23 | Stavros Sachtouris | X-Auth-Token User authentication token required required |
1523 | e31f6f23 | Stavros Sachtouris | ============== ========================= ======== ========== |
1524 | a5ec880a | Stavros Sachtouris | |
1525 | 68386e00 | Stavros Sachtouris | .. note:: Request parameters should be empty |
1526 | 68386e00 | Stavros Sachtouris | |
1527 | 68386e00 | Stavros Sachtouris | .. note:: Request body should be empty |
1528 | 68386e00 | Stavros Sachtouris | |
1529 | 68386e00 | Stavros Sachtouris | .. rubric:: Response |
1530 | a5ec880a | Stavros Sachtouris | |
1531 | a5ec880a | Stavros Sachtouris | =========================== ===================== |
1532 | a5ec880a | Stavros Sachtouris | Return Code Description |
1533 | a5ec880a | Stavros Sachtouris | =========================== ===================== |
1534 | a5ec880a | Stavros Sachtouris | 200 (OK) Request succeeded |
1535 | a5ec880a | Stavros Sachtouris | 400 (Bad Request) Invalid server ID or Malformed request |
1536 | a5ec880a | Stavros Sachtouris | 401 (Unauthorized) Missing or expired user token |
1537 | a5ec880a | Stavros Sachtouris | 403 (Forbidden) Administratively suspended server |
1538 | a3d2b515 | Stavros Sachtouris | 404 (Not Found) Meta key not found |
1539 | a5ec880a | Stavros Sachtouris | 500 (Internal Server Error) The request cannot be completed because of an |
1540 | e7f266c3 | Stavros Sachtouris | \ internal error |
1541 | a5ec880a | Stavros Sachtouris | 503 (Service Unavailable) The server is not currently available |
1542 | a5ec880a | Stavros Sachtouris | =========================== ===================== |
1543 | a5ec880a | Stavros Sachtouris | |
1544 | 68386e00 | Stavros Sachtouris | Response body content:: |
1545 | 68386e00 | Stavros Sachtouris | |
1546 | 45e274fc | Stavros Sachtouris | metadata: {<key>: <value>} |
1547 | 68386e00 | Stavros Sachtouris | |
1548 | a3d2b515 | Stavros Sachtouris | *Example Get Server Metadata for Item 'role', JSON* |
1549 | a5ec880a | Stavros Sachtouris | |
1550 | 68386e00 | Stavros Sachtouris | .. code-block:: javascript |
1551 | 68386e00 | Stavros Sachtouris | |
1552 | 68386e00 | Stavros Sachtouris | {"metadata": {"role": "webmail"}} |
1553 | a5ec880a | Stavros Sachtouris | |
1554 | a3d2b515 | Stavros Sachtouris | Update Server Metadata Item |
1555 | a3d2b515 | Stavros Sachtouris | --------------------------- |
1556 | a5ec880a | Stavros Sachtouris | |
1557 | 68386e00 | Stavros Sachtouris | Set a new or update an existing a metadum value for a virtual server. |
1558 | 68386e00 | Stavros Sachtouris | |
1559 | 68386e00 | Stavros Sachtouris | .. rubric:: Request |
1560 | a5ec880a | Stavros Sachtouris | |
1561 | a5ec880a | Stavros Sachtouris | ======================================= ====== ======== ========== |
1562 | 68386e00 | Stavros Sachtouris | URI Method Cyclades OS/Compute |
1563 | a5ec880a | Stavros Sachtouris | ======================================= ====== ======== ========== |
1564 | 45e274fc | Stavros Sachtouris | ``/servers/<server-id>/metadata/<key>`` PUT ✔ ✔ |
1565 | a5ec880a | Stavros Sachtouris | ======================================= ====== ======== ========== |
1566 | a5ec880a | Stavros Sachtouris | |
1567 | a5ec880a | Stavros Sachtouris | * **server-id** is the identifier of the virtual server |
1568 | e31f6f23 | Stavros Sachtouris | |
1569 | 45e274fc | Stavros Sachtouris | * **key** is the key of a ``key``:``value`` pair piece of metadata |
1570 | a5ec880a | Stavros Sachtouris | |
1571 | a5ec880a | Stavros Sachtouris | | |
1572 | a5ec880a | Stavros Sachtouris | |
1573 | e31f6f23 | Stavros Sachtouris | ============== ========================= ======== ========== |
1574 | 68386e00 | Stavros Sachtouris | Request Header Value Cyclades OS/Compute |
1575 | e31f6f23 | Stavros Sachtouris | ============== ========================= ======== ========== |
1576 | e31f6f23 | Stavros Sachtouris | X-Auth-Token User authentication token required required |
1577 | 634ef3a8 | Stavros Sachtouris | Content-Type Type or request body required required |
1578 | 634ef3a8 | Stavros Sachtouris | Content-Length Length of request body required required |
1579 | e31f6f23 | Stavros Sachtouris | ============== ========================= ======== ========== |
1580 | a5ec880a | Stavros Sachtouris | |
1581 | 634ef3a8 | Stavros Sachtouris | **Example Request Headers**:: |
1582 | 634ef3a8 | Stavros Sachtouris | |
1583 | 634ef3a8 | Stavros Sachtouris | X-Auth-Token: z31uRXUn1LZy45p1r7V== |
1584 | 634ef3a8 | Stavros Sachtouris | Content-Type: application/json |
1585 | 634ef3a8 | Stavros Sachtouris | Content-Length: 29 |
1586 | 634ef3a8 | Stavros Sachtouris | |
1587 | 68386e00 | Stavros Sachtouris | .. note:: Request parameters should be empty |
1588 | 68386e00 | Stavros Sachtouris | |
1589 | 68386e00 | Stavros Sachtouris | Request body content:: |
1590 | a5ec880a | Stavros Sachtouris | |
1591 | 45e274fc | Stavros Sachtouris | metadata: {<key>: <value>} |
1592 | 68386e00 | Stavros Sachtouris | |
1593 | a3d2b515 | Stavros Sachtouris | *Example Request to Set or Update Server Metadata "role": JSON* |
1594 | e31f6f23 | Stavros Sachtouris | |
1595 | e31f6f23 | Stavros Sachtouris | .. code-block:: javascript |
1596 | a5ec880a | Stavros Sachtouris | |
1597 | 45e274fc | Stavros Sachtouris | {"metadata": {"role": "gateway"}} |
1598 | a5ec880a | Stavros Sachtouris | |
1599 | 68386e00 | Stavros Sachtouris | .. rubric:: Response |
1600 | a5ec880a | Stavros Sachtouris | |
1601 | a5ec880a | Stavros Sachtouris | =========================== ===================== |
1602 | a5ec880a | Stavros Sachtouris | Return Code Description |
1603 | a5ec880a | Stavros Sachtouris | =========================== ===================== |
1604 | a5ec880a | Stavros Sachtouris | 201 (OK) Request succeeded |
1605 | a5ec880a | Stavros Sachtouris | 400 (Bad Request) Invalid server ID or Malformed request |
1606 | a5ec880a | Stavros Sachtouris | 401 (Unauthorized) Missing or expired user token |
1607 | a5ec880a | Stavros Sachtouris | 403 (Forbidden) Administratively suspended server |
1608 | a3d2b515 | Stavros Sachtouris | 404 (Not Found) Meta key not found |
1609 | a5ec880a | Stavros Sachtouris | 413 (OverLimit) Maximum number of metadata exceeded |
1610 | a5ec880a | Stavros Sachtouris | 500 (Internal Server Error) The request cannot be completed because of an |
1611 | e7f266c3 | Stavros Sachtouris | \ internal error |
1612 | a5ec880a | Stavros Sachtouris | 503 (Service Unavailable) The server is not currently available |
1613 | 68386e00 | Stavros Sachtouris | =========================== ==================== |
1614 | a5ec880a | Stavros Sachtouris | |
1615 | 68386e00 | Stavros Sachtouris | Response body content:: |
1616 | a5ec880a | Stavros Sachtouris | |
1617 | 45e274fc | Stavros Sachtouris | metadata: {<key>: <value>} |
1618 | 68386e00 | Stavros Sachtouris | |
1619 | a3d2b515 | Stavros Sachtouris | *Example Set or Update Server Metadata "role":"gateway": JSON* |
1620 | 68386e00 | Stavros Sachtouris | |
1621 | 68386e00 | Stavros Sachtouris | .. code-block:: javascript |
1622 | 68386e00 | Stavros Sachtouris | |
1623 | 45e274fc | Stavros Sachtouris | {"metadata": {"role": "gateway"}} |
1624 | a5ec880a | Stavros Sachtouris | |
1625 | a3d2b515 | Stavros Sachtouris | Delete Server Metadata |
1626 | a3d2b515 | Stavros Sachtouris | ---------------------- |
1627 | a5ec880a | Stavros Sachtouris | |
1628 | a3d2b515 | Stavros Sachtouris | Delete a metadata of a virtual server |
1629 | 68386e00 | Stavros Sachtouris | |
1630 | 68386e00 | Stavros Sachtouris | .. rubric:: Request |
1631 | a5ec880a | Stavros Sachtouris | |
1632 | a5ec880a | Stavros Sachtouris | ======================================= ====== ======== ========== |
1633 | 68386e00 | Stavros Sachtouris | URI Method Cyclades OS/Compute |
1634 | a5ec880a | Stavros Sachtouris | ======================================= ====== ======== ========== |
1635 | 45e274fc | Stavros Sachtouris | ``/servers/<server-id>/metadata/<key>`` DELETE ✔ ✔ |
1636 | a5ec880a | Stavros Sachtouris | ======================================= ====== ======== ========== |
1637 | a5ec880a | Stavros Sachtouris | |
1638 | a5ec880a | Stavros Sachtouris | * **server-id** is the identifier of the virtual server |
1639 | e31f6f23 | Stavros Sachtouris | |
1640 | a3d2b515 | Stavros Sachtouris | * **key** is the key of a mata ``key``:``value`` pair |
1641 | a5ec880a | Stavros Sachtouris | |
1642 | a5ec880a | Stavros Sachtouris | | |
1643 | a5ec880a | Stavros Sachtouris | |
1644 | e31f6f23 | Stavros Sachtouris | ============== ========================= ======== ========== |
1645 | 68386e00 | Stavros Sachtouris | Request Header Value Cyclades OS/Compute |
1646 | e31f6f23 | Stavros Sachtouris | ============== ========================= ======== ========== |
1647 | e31f6f23 | Stavros Sachtouris | X-Auth-Token User authentication token required required |
1648 | e31f6f23 | Stavros Sachtouris | ============== ========================= ======== ========== |
1649 | a5ec880a | Stavros Sachtouris | |
1650 | 68386e00 | Stavros Sachtouris | .. note:: Request parameters should be empty |
1651 | 68386e00 | Stavros Sachtouris | |
1652 | 68386e00 | Stavros Sachtouris | .. note:: Request body should be empty |
1653 | 68386e00 | Stavros Sachtouris | |
1654 | 68386e00 | Stavros Sachtouris | .. rubric:: Response |
1655 | a5ec880a | Stavros Sachtouris | |
1656 | a5ec880a | Stavros Sachtouris | =========================== ===================== |
1657 | a5ec880a | Stavros Sachtouris | Return Code Description |
1658 | a5ec880a | Stavros Sachtouris | =========================== ===================== |
1659 | a5ec880a | Stavros Sachtouris | 204 (OK) Request succeeded |
1660 | a5ec880a | Stavros Sachtouris | 400 (Bad Request) Invalid server ID |
1661 | a5ec880a | Stavros Sachtouris | 401 (Unauthorized) Missing or expired user token |
1662 | a5ec880a | Stavros Sachtouris | 403 (Forbidden) Administratively suspended server |
1663 | a3d2b515 | Stavros Sachtouris | 404 (Not Found) Metadata key not found |
1664 | a5ec880a | Stavros Sachtouris | 500 (Internal Server Error) The request cannot be completed because of an |
1665 | e7f266c3 | Stavros Sachtouris | \ internal error |
1666 | a5ec880a | Stavros Sachtouris | 503 (Service Unavailable) The server is not currently available |
1667 | a5ec880a | Stavros Sachtouris | =========================== ===================== |
1668 | a5ec880a | Stavros Sachtouris | |
1669 | 68386e00 | Stavros Sachtouris | .. note:: In case of a 204 code, response body should be empty |
1670 | 68386e00 | Stavros Sachtouris | |
1671 | e31f6f23 | Stavros Sachtouris | Server Actions |
1672 | e31f6f23 | Stavros Sachtouris | -------------- |
1673 | e31f6f23 | Stavros Sachtouris | |
1674 | 68386e00 | Stavros Sachtouris | Actions are operations that are achieved through the same type of request |
1675 | 68386e00 | Stavros Sachtouris | (``POST``). There are differences in the implementations of some operations |
1676 | 68386e00 | Stavros Sachtouris | between Synnefo/Cyclades and OS/Compute. Although this document focuses on |
1677 | 68386e00 | Stavros Sachtouris | Synnefo/Cyclades, differences and similarities between the APIs are also |
1678 | 68386e00 | Stavros Sachtouris | briefed. |
1679 | e31f6f23 | Stavros Sachtouris | |
1680 | 8a86499c | Stavros Sachtouris | =============================================== ======== ========== |
1681 | 8a86499c | Stavros Sachtouris | Operations Cyclades OS/Compute |
1682 | 8a86499c | Stavros Sachtouris | =============================================== ======== ========== |
1683 | 8a86499c | Stavros Sachtouris | `Start <#start-server>`_ ✔ **✘** |
1684 | 8a86499c | Stavros Sachtouris | `Shutdown <#shutdown-server>`_ ✔ **✘** |
1685 | 8a86499c | Stavros Sachtouris | `Reboot <#reboot-server>`_ ✔ ✔ |
1686 | 8a86499c | Stavros Sachtouris | `Get Console <#get-server-console>`_ ✔ **✘** |
1687 | 8a86499c | Stavros Sachtouris | `Set Firewall <#set-server-firewall-profile>`_ ✔ **✘** |
1688 | 8a86499c | Stavros Sachtouris | `Change Admin Password <#os-compute-specific>`_ **✘** ✔ |
1689 | 8a86499c | Stavros Sachtouris | `Rebuild <#os-compute-specific>`_ **✘** ✔ |
1690 | 8a86499c | Stavros Sachtouris | `Resize <#os-compute-specific>`_ **✘** ✔ |
1691 | 8a86499c | Stavros Sachtouris | `Confirm Resized <#os-compute-specific>`_ **✘** ✔ |
1692 | 8a86499c | Stavros Sachtouris | `Revert Resized <#os-compute-specific>`_ **✘** ✔ |
1693 | 8a86499c | Stavros Sachtouris | `Create Image <#os-compute-specific>`_ **✘** ✔ |
1694 | 8a86499c | Stavros Sachtouris | =============================================== ======== ========== |
1695 | e31f6f23 | Stavros Sachtouris | |
1696 | 68386e00 | Stavros Sachtouris | .. rubric:: Request |
1697 | e31f6f23 | Stavros Sachtouris | |
1698 | e31f6f23 | Stavros Sachtouris | =============================== ====== ======== ========== |
1699 | 68386e00 | Stavros Sachtouris | URI Method Cyclades OS/Compute |
1700 | e31f6f23 | Stavros Sachtouris | =============================== ====== ======== ========== |
1701 | e31f6f23 | Stavros Sachtouris | ``/servers/<server id>/action`` POST ✔ ✔ |
1702 | e31f6f23 | Stavros Sachtouris | =============================== ====== ======== ========== |
1703 | e31f6f23 | Stavros Sachtouris | |
1704 | e31f6f23 | Stavros Sachtouris | | |
1705 | e31f6f23 | Stavros Sachtouris | |
1706 | e31f6f23 | Stavros Sachtouris | ============== ========================= ======== ========== |
1707 | 68386e00 | Stavros Sachtouris | Request Header Value Cyclades OS/Compute |
1708 | e31f6f23 | Stavros Sachtouris | ============== ========================= ======== ========== |
1709 | e31f6f23 | Stavros Sachtouris | X-Auth-Token User authentication token required required |
1710 | 634ef3a8 | Stavros Sachtouris | Content-Type Type or request body required required |
1711 | 634ef3a8 | Stavros Sachtouris | Content-Length Length of request body required required |
1712 | e31f6f23 | Stavros Sachtouris | ============== ========================= ======== ========== |
1713 | e31f6f23 | Stavros Sachtouris | |
1714 | 634ef3a8 | Stavros Sachtouris | **Example Request Headers**:: |
1715 | 634ef3a8 | Stavros Sachtouris | |
1716 | 634ef3a8 | Stavros Sachtouris | X-Auth-Token: z31uRXUn1LZy45p1r7V== |
1717 | 634ef3a8 | Stavros Sachtouris | Content-Type: application/json |
1718 | 634ef3a8 | Stavros Sachtouris | Content-Length: 32 |
1719 | 634ef3a8 | Stavros Sachtouris | |
1720 | 68386e00 | Stavros Sachtouris | .. note:: Request parameters should be empty |
1721 | 68386e00 | Stavros Sachtouris | |
1722 | 68386e00 | Stavros Sachtouris | .. note:: Request body varies between operations (see bellow) |
1723 | 68386e00 | Stavros Sachtouris | |
1724 | 68386e00 | Stavros Sachtouris | .. rubric:: Response |
1725 | e31f6f23 | Stavros Sachtouris | |
1726 | e31f6f23 | Stavros Sachtouris | =========================== ===================== |
1727 | e31f6f23 | Stavros Sachtouris | Return Code Description |
1728 | e31f6f23 | Stavros Sachtouris | =========================== ===================== |
1729 | e31f6f23 | Stavros Sachtouris | 200 (OK) Request succeeded (for console operation) |
1730 | e31f6f23 | Stavros Sachtouris | 202 (OK) Request succeeded |
1731 | e31f6f23 | Stavros Sachtouris | 400 (Bad Request) Invalid request or unknown action |
1732 | e31f6f23 | Stavros Sachtouris | 401 (Unauthorized) Missing or expired user token |
1733 | e31f6f23 | Stavros Sachtouris | 403 (Forbidden) User is not allowed to perform this operation |
1734 | e31f6f23 | Stavros Sachtouris | 500 (Internal Server Error) The request cannot be completed because of an |
1735 | e31f6f23 | Stavros Sachtouris | \ internal error |
1736 | e31f6f23 | Stavros Sachtouris | 503 (Service Unavailable) The server is not currently available |
1737 | e31f6f23 | Stavros Sachtouris | =========================== ===================== |
1738 | e31f6f23 | Stavros Sachtouris | |
1739 | 68386e00 | Stavros Sachtouris | .. note:: Response body varies between operations (see bellow) |
1740 | 68386e00 | Stavros Sachtouris | |
1741 | e31f6f23 | Stavros Sachtouris | Start server |
1742 | e31f6f23 | Stavros Sachtouris | ................ |
1743 | e31f6f23 | Stavros Sachtouris | |
1744 | e31f6f23 | Stavros Sachtouris | This operation transitions a server from a STOPPED to an ACTIVE state. |
1745 | e31f6f23 | Stavros Sachtouris | |
1746 | 68386e00 | Stavros Sachtouris | Request body contents:: |
1747 | e31f6f23 | Stavros Sachtouris | |
1748 | 68386e00 | Stavros Sachtouris | start: {} |
1749 | e31f6f23 | Stavros Sachtouris | |
1750 | 634ef3a8 | Stavros Sachtouris | *Example Start Server: JSON* |
1751 | 68386e00 | Stavros Sachtouris | |
1752 | 68386e00 | Stavros Sachtouris | .. code-block:: javascript |
1753 | 68386e00 | Stavros Sachtouris | |
1754 | 68386e00 | Stavros Sachtouris | {"start": {}} |
1755 | 68386e00 | Stavros Sachtouris | |
1756 | 68386e00 | Stavros Sachtouris | .. note:: Response body should be empty |
1757 | e31f6f23 | Stavros Sachtouris | |
1758 | e31f6f23 | Stavros Sachtouris | Reboot Server |
1759 | e31f6f23 | Stavros Sachtouris | ............. |
1760 | e31f6f23 | Stavros Sachtouris | |
1761 | e31f6f23 | Stavros Sachtouris | This operation transitions a server from ``ACTIVE`` to ``REBOOT`` and then |
1762 | 68386e00 | Stavros Sachtouris | ``ACTIVE`` again. |
1763 | e31f6f23 | Stavros Sachtouris | |
1764 | 68386e00 | Stavros Sachtouris | Synnefo and OS/Compute APIs offer two reboot modes: ``soft`` |
1765 | 68386e00 | Stavros Sachtouris | and ``hard``. OS/Compute distinguishes between the two intermediate states |
1766 | 68386e00 | Stavros Sachtouris | (``REBOOT`` and ``HARD_REBOOT``) while rebooting, while Synnefo/Cyclades use |
1767 | 634ef3a8 | Stavros Sachtouris | only the ``REBOOT`` term. The expected behavior is the same, though. |
1768 | e31f6f23 | Stavros Sachtouris | |
1769 | 68386e00 | Stavros Sachtouris | Request body contents:: |
1770 | 68386e00 | Stavros Sachtouris | |
1771 | 68386e00 | Stavros Sachtouris | reboot: {type: <reboot type>} |
1772 | e31f6f23 | Stavros Sachtouris | |
1773 | e31f6f23 | Stavros Sachtouris | * **reboot type** can be either ``SOFT`` or ``HARD``. |
1774 | e31f6f23 | Stavros Sachtouris | |
1775 | 634ef3a8 | Stavros Sachtouris | *Example (soft) Reboot Server: JSON* |
1776 | e31f6f23 | Stavros Sachtouris | |
1777 | e31f6f23 | Stavros Sachtouris | .. code-block:: javascript |
1778 | 3458183d | Constantinos Venetsanopoulos | |
1779 | 68386e00 | Stavros Sachtouris | {"reboot" : { "type": "soft"}} |
1780 | 68386e00 | Stavros Sachtouris | |
1781 | 68386e00 | Stavros Sachtouris | .. note:: Response body should be empty |
1782 | e31f6f23 | Stavros Sachtouris | |
1783 | e31f6f23 | Stavros Sachtouris | Shutdown server |
1784 | e31f6f23 | Stavros Sachtouris | ............... |
1785 | e31f6f23 | Stavros Sachtouris | |
1786 | e31f6f23 | Stavros Sachtouris | This operation transitions a server from an ACTIVE to a STOPPED state. |
1787 | e31f6f23 | Stavros Sachtouris | |
1788 | 68386e00 | Stavros Sachtouris | Request body contents:: |
1789 | 68386e00 | Stavros Sachtouris | |
1790 | 68386e00 | Stavros Sachtouris | shutdown: {} |
1791 | 68386e00 | Stavros Sachtouris | |
1792 | 634ef3a8 | Stavros Sachtouris | *Example Shutdown Server: JSON* |
1793 | 68386e00 | Stavros Sachtouris | |
1794 | 68386e00 | Stavros Sachtouris | .. code-block:: javascript |
1795 | e31f6f23 | Stavros Sachtouris | |
1796 | e31f6f23 | Stavros Sachtouris | {"shutdown": {}} |
1797 | e31f6f23 | Stavros Sachtouris | |
1798 | 68386e00 | Stavros Sachtouris | .. note:: Response body should be empty |
1799 | 68386e00 | Stavros Sachtouris | |
1800 | e31f6f23 | Stavros Sachtouris | Get Server Console |
1801 | e31f6f23 | Stavros Sachtouris | .................. |
1802 | e31f6f23 | Stavros Sachtouris | |
1803 | 68386e00 | Stavros Sachtouris | .. note:: This operation is not part of OS/Compute API |
1804 | 68386e00 | Stavros Sachtouris | |
1805 | e31f6f23 | Stavros Sachtouris | The console operation arranges for an OOB console of the specified type. Only |
1806 | e31f6f23 | Stavros Sachtouris | consoles of type ``vnc`` are supported for now. Cyclades server uses a running |
1807 | e31f6f23 | Stavros Sachtouris | instance of vncauthproxy to setup proper VNC forwarding with a random password, |
1808 | e31f6f23 | Stavros Sachtouris | then returns the necessary VNC connection info to the caller. |
1809 | e31f6f23 | Stavros Sachtouris | |
1810 | 68386e00 | Stavros Sachtouris | Request body contents:: |
1811 | 68386e00 | Stavros Sachtouris | |
1812 | 68386e00 | Stavros Sachtouris | console: {type: vnc} |
1813 | 68386e00 | Stavros Sachtouris | |
1814 | 634ef3a8 | Stavros Sachtouris | *Example Get Server Console: JSON* |
1815 | e31f6f23 | Stavros Sachtouris | |
1816 | e31f6f23 | Stavros Sachtouris | .. code-block:: javascript |
1817 | e31f6f23 | Stavros Sachtouris | |
1818 | e31f6f23 | Stavros Sachtouris | {"console": {"type": "vnc" } |
1819 | e31f6f23 | Stavros Sachtouris | |
1820 | 68386e00 | Stavros Sachtouris | Response body contents:: |
1821 | e31f6f23 | Stavros Sachtouris | |
1822 | 68386e00 | Stavros Sachtouris | console: { |
1823 | 68386e00 | Stavros Sachtouris | <vnc attribute>: <value>, |
1824 | 68386e00 | Stavros Sachtouris | ... |
1825 | 68386e00 | Stavros Sachtouris | } |
1826 | e31f6f23 | Stavros Sachtouris | |
1827 | 68386e00 | Stavros Sachtouris | ============== ====================== |
1828 | 3458183d | Constantinos Venetsanopoulos | VNC Attributes Description |
1829 | 68386e00 | Stavros Sachtouris | ============== ====================== |
1830 | 68386e00 | Stavros Sachtouris | host The vncprocy host |
1831 | 68386e00 | Stavros Sachtouris | port vncprocy port |
1832 | 68386e00 | Stavros Sachtouris | password Temporary password |
1833 | 68386e00 | Stavros Sachtouris | type Connection type (only VNC) |
1834 | 68386e00 | Stavros Sachtouris | ============== ====================== |
1835 | e31f6f23 | Stavros Sachtouris | |
1836 | 634ef3a8 | Stavros Sachtouris | *Example Action Console Response: JSON* |
1837 | e31f6f23 | Stavros Sachtouris | |
1838 | e31f6f23 | Stavros Sachtouris | .. code-block:: javascript |
1839 | e31f6f23 | Stavros Sachtouris | |
1840 | e31f6f23 | Stavros Sachtouris | { |
1841 | e31f6f23 | Stavros Sachtouris | "console": { |
1842 | e31f6f23 | Stavros Sachtouris | "type": "vnc", |
1843 | e31f6f23 | Stavros Sachtouris | "host": "vm42.example.org", |
1844 | e31f6f23 | Stavros Sachtouris | "port": 1234, |
1845 | e31f6f23 | Stavros Sachtouris | "password": "513NR14PN0T" |
1846 | e31f6f23 | Stavros Sachtouris | } |
1847 | e31f6f23 | Stavros Sachtouris | } |
1848 | e31f6f23 | Stavros Sachtouris | |
1849 | e31f6f23 | Stavros Sachtouris | Set Server Firewall Profile |
1850 | e31f6f23 | Stavros Sachtouris | ........................... |
1851 | e31f6f23 | Stavros Sachtouris | |
1852 | e31f6f23 | Stavros Sachtouris | The firewallProfile function sets a firewall profile for the public interface |
1853 | e31f6f23 | Stavros Sachtouris | of a server. |
1854 | e31f6f23 | Stavros Sachtouris | |
1855 | 68386e00 | Stavros Sachtouris | Request body contents:: |
1856 | e31f6f23 | Stavros Sachtouris | |
1857 | 7bf80be9 | Dionysis Grigoropoulos | firewallProfile: {profile: <firewall profile>, nic: <nic id>} |
1858 | e31f6f23 | Stavros Sachtouris | |
1859 | e31f6f23 | Stavros Sachtouris | * **firewall profile** can be ``ENABLED``, ``DISABLED`` or ``PROTECTED`` |
1860 | e31f6f23 | Stavros Sachtouris | |
1861 | 634ef3a8 | Stavros Sachtouris | *Example Action firewallProfile: JSON** |
1862 | e31f6f23 | Stavros Sachtouris | |
1863 | e31f6f23 | Stavros Sachtouris | .. code-block:: javascript |
1864 | e31f6f23 | Stavros Sachtouris | |
1865 | 7bf80be9 | Dionysis Grigoropoulos | {"firewallProfile": {"profile": "ENABLED", "nic": 123}} |
1866 | e31f6f23 | Stavros Sachtouris | |
1867 | 68386e00 | Stavros Sachtouris | .. note:: Response body should be empty |
1868 | 68386e00 | Stavros Sachtouris | |
1869 | 68386e00 | Stavros Sachtouris | OS/Compute Specific |
1870 | b38e8fa5 | Stavros Sachtouris | ................... |
1871 | e31f6f23 | Stavros Sachtouris | |
1872 | e31f6f23 | Stavros Sachtouris | The following operations are meaningless or not supported in the context of |
1873 | 68386e00 | Stavros Sachtouris | Synnefo/Cyclades, but are parts of the OS/Compute API: |
1874 | e31f6f23 | Stavros Sachtouris | |
1875 | e31f6f23 | Stavros Sachtouris | * `Change Administrator Password <http://docs.openstack.org/api/openstack-compute/2/content/Change_Password-d1e3234.html>`_ |
1876 | e31f6f23 | Stavros Sachtouris | * `Rebuild Server <http://docs.openstack.org/api/openstack-compute/2/content/Rebuild_Server-d1e3538.html>`_ |
1877 | e31f6f23 | Stavros Sachtouris | * `Resize Server <http://docs.openstack.org/api/openstack-compute/2/content/Resize_Server-d1e3707.html>`_ |
1878 | e31f6f23 | Stavros Sachtouris | * `Confirm Resized Server <http://docs.openstack.org/api/openstack-compute/2/content/Confirm_Resized_Server-d1e3868.html>`_ |
1879 | e31f6f23 | Stavros Sachtouris | * `Revert Resized Server <http://docs.openstack.org/api/openstack-compute/2/content/Revert_Resized_Server-d1e4024.html>`_ |
1880 | e31f6f23 | Stavros Sachtouris | * `Create Image <http://docs.openstack.org/api/openstack-compute/2/content/Create_Image-d1e4655.html>`_ |
1881 | e31f6f23 | Stavros Sachtouris | |
1882 | de2e08f6 | Stavros Sachtouris | List Flavors |
1883 | a3d2b515 | Stavros Sachtouris | ------------ |
1884 | de2e08f6 | Stavros Sachtouris | |
1885 | 2b9d64a5 | Stavros Sachtouris | List the flavors that are accessible by the user |
1886 | 2b9d64a5 | Stavros Sachtouris | |
1887 | 2b9d64a5 | Stavros Sachtouris | .. rubric:: Request |
1888 | 2b9d64a5 | Stavros Sachtouris | |
1889 | de2e08f6 | Stavros Sachtouris | =================== ====== ======== ========== |
1890 | 68386e00 | Stavros Sachtouris | URI Method Cyclades OS/Compute |
1891 | de2e08f6 | Stavros Sachtouris | =================== ====== ======== ========== |
1892 | de2e08f6 | Stavros Sachtouris | ``/flavors`` GET ✔ ✔ |
1893 | 45e274fc | Stavros Sachtouris | ``/flavors/detail`` GET ✔ ✔ |
1894 | de2e08f6 | Stavros Sachtouris | =================== ====== ======== ========== |
1895 | de2e08f6 | Stavros Sachtouris | |
1896 | de2e08f6 | Stavros Sachtouris | | |
1897 | b38e8fa5 | Stavros Sachtouris | ============== ========================= ======== ========== |
1898 | 68386e00 | Stavros Sachtouris | Request Header Value Cyclades OS/Compute |
1899 | b38e8fa5 | Stavros Sachtouris | ============== ========================= ======== ========== |
1900 | b38e8fa5 | Stavros Sachtouris | X-Auth-Token User authentication token required required |
1901 | b38e8fa5 | Stavros Sachtouris | ============== ========================= ======== ========== |
1902 | de2e08f6 | Stavros Sachtouris | |
1903 | de2e08f6 | Stavros Sachtouris | | |
1904 | de2e08f6 | Stavros Sachtouris | ================= =============== |
1905 | 3458183d | Constantinos Venetsanopoulos | Request Parameter Value |
1906 | de2e08f6 | Stavros Sachtouris | ================= =============== |
1907 | de2e08f6 | Stavros Sachtouris | json Respond in json |
1908 | 3458183d | Constantinos Venetsanopoulos | xml Respond in xml |
1909 | de2e08f6 | Stavros Sachtouris | ================= =============== |
1910 | de2e08f6 | Stavros Sachtouris | |
1911 | 2b9d64a5 | Stavros Sachtouris | .. note:: Request body should be empty |
1912 | 2b9d64a5 | Stavros Sachtouris | |
1913 | 2b9d64a5 | Stavros Sachtouris | .. rubric:: Response |
1914 | de2e08f6 | Stavros Sachtouris | |
1915 | de2e08f6 | Stavros Sachtouris | =========================== ===================== |
1916 | de2e08f6 | Stavros Sachtouris | Return Code Description |
1917 | de2e08f6 | Stavros Sachtouris | =========================== ===================== |
1918 | de2e08f6 | Stavros Sachtouris | 200 (OK) Request succeeded |
1919 | 23a2f796 | Stavros Sachtouris | 400 (Bad Request) Malformed request |
1920 | de2e08f6 | Stavros Sachtouris | 401 (Unauthorized) Missing or expired user token |
1921 | de2e08f6 | Stavros Sachtouris | 403 (Forbidden) Forbidden to use this flavor |
1922 | de2e08f6 | Stavros Sachtouris | 500 (Internal Server Error) The request cannot be completed because of an |
1923 | e7f266c3 | Stavros Sachtouris | \ internal error |
1924 | de2e08f6 | Stavros Sachtouris | 503 (Service Unavailable) The server is not currently available |
1925 | de2e08f6 | Stavros Sachtouris | =========================== ===================== |
1926 | de2e08f6 | Stavros Sachtouris | |
1927 | 2b9d64a5 | Stavros Sachtouris | Response code contents:: |
1928 | de2e08f6 | Stavros Sachtouris | |
1929 | 45e274fc | Stavros Sachtouris | flavors: [ |
1930 | 2b9d64a5 | Stavros Sachtouris | { |
1931 | 2b9d64a5 | Stavros Sachtouris | <flavor attribute>: <value>, |
1932 | 2b9d64a5 | Stavros Sachtouris | ... |
1933 | 2b9d64a5 | Stavros Sachtouris | }, |
1934 | 2b9d64a5 | Stavros Sachtouris | ... |
1935 | 45e274fc | Stavros Sachtouris | ] |
1936 | de2e08f6 | Stavros Sachtouris | |
1937 | 2b9d64a5 | Stavros Sachtouris | Flavor attributes are `listed here <#flavor-ref>`_. Regular listing contains |
1938 | 2b9d64a5 | Stavros Sachtouris | only ``id`` and ``name`` attributes. |
1939 | 2cd1c00a | Giorgos Verigakis | |
1940 | 634ef3a8 | Stavros Sachtouris | *Example List Flavors (regular): JSON* |
1941 | de2e08f6 | Stavros Sachtouris | |
1942 | de2e08f6 | Stavros Sachtouris | .. code-block:: javascript |
1943 | de2e08f6 | Stavros Sachtouris | |
1944 | de2e08f6 | Stavros Sachtouris | { |
1945 | 45e274fc | Stavros Sachtouris | "flavors": [ |
1946 | 45e274fc | Stavros Sachtouris | { |
1947 | 45e274fc | Stavros Sachtouris | "id": 1, |
1948 | 45e274fc | Stavros Sachtouris | "name": "One code", |
1949 | 1d346984 | Stavros Sachtouris | "links": [ |
1950 | 1d346984 | Stavros Sachtouris | { |
1951 | 1d346984 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/flavors/1", |
1952 | 1d346984 | Stavros Sachtouris | "rel": "self" |
1953 | 1d346984 | Stavros Sachtouris | }, |
1954 | 1d346984 | Stavros Sachtouris | { |
1955 | 1d346984 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/flavors/1", |
1956 | 1d346984 | Stavros Sachtouris | "rel": "bookmark" |
1957 | 1d346984 | Stavros Sachtouris | } |
1958 | 1d346984 | Stavros Sachtouris | ] |
1959 | 45e274fc | Stavros Sachtouris | }, { |
1960 | 45e274fc | Stavros Sachtouris | "id": 3, |
1961 | 45e274fc | Stavros Sachtouris | "name": "Four core", |
1962 | 1d346984 | Stavros Sachtouris | "links": [ |
1963 | 1d346984 | Stavros Sachtouris | { |
1964 | 1d346984 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/flavors/3", |
1965 | 1d346984 | Stavros Sachtouris | "rel": "self" |
1966 | 1d346984 | Stavros Sachtouris | }, |
1967 | 1d346984 | Stavros Sachtouris | { |
1968 | 1d346984 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/flavors/3", |
1969 | 1d346984 | Stavros Sachtouris | "rel": "bookmark" |
1970 | 1d346984 | Stavros Sachtouris | } |
1971 | 1d346984 | Stavros Sachtouris | ] |
1972 | 45e274fc | Stavros Sachtouris | } |
1973 | 45e274fc | Stavros Sachtouris | ] |
1974 | de2e08f6 | Stavros Sachtouris | } |
1975 | de2e08f6 | Stavros Sachtouris | |
1976 | 2b9d64a5 | Stavros Sachtouris | |
1977 | 634ef3a8 | Stavros Sachtouris | *Example List Flavors (regular): XML* |
1978 | de2e08f6 | Stavros Sachtouris | |
1979 | de2e08f6 | Stavros Sachtouris | .. code-block:: xml |
1980 | de2e08f6 | Stavros Sachtouris | |
1981 | de2e08f6 | Stavros Sachtouris | <?xml version="1.0" encoding="UTF-8"?> |
1982 | de2e08f6 | Stavros Sachtouris | <flavors xmlns="http://docs.openstack.org/compute/api/v1" |
1983 | de2e08f6 | Stavros Sachtouris | xmlns:atom="http://www.w3.org/2005/Atom"> |
1984 | de2e08f6 | Stavros Sachtouris | <flavor id="1" name="One core"/> |
1985 | de2e08f6 | Stavros Sachtouris | <flavor id="3" name="Four core"/> |
1986 | de2e08f6 | Stavros Sachtouris | </flavors> |
1987 | de2e08f6 | Stavros Sachtouris | |
1988 | 634ef3a8 | Stavros Sachtouris | *Example List Flavors (detail): JSON* |
1989 | de2e08f6 | Stavros Sachtouris | |
1990 | de2e08f6 | Stavros Sachtouris | .. code-block:: javascript |
1991 | de2e08f6 | Stavros Sachtouris | |
1992 | de2e08f6 | Stavros Sachtouris | { |
1993 | 45e274fc | Stavros Sachtouris | "flavors": [ |
1994 | 45e274fc | Stavros Sachtouris | { |
1995 | 45e274fc | Stavros Sachtouris | "id": 1, |
1996 | 45e274fc | Stavros Sachtouris | "name": "One core", |
1997 | 45e274fc | Stavros Sachtouris | "ram": 1024, |
1998 | 45e274fc | Stavros Sachtouris | "SNF:disk_template": "drbd", |
1999 | 45e274fc | Stavros Sachtouris | "disk": 20, |
2000 | 1d346984 | Stavros Sachtouris | "cpu": 1, |
2001 | 1d346984 | Stavros Sachtouris | "links": [ |
2002 | 1d346984 | Stavros Sachtouris | { |
2003 | 1d346984 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/flavors/1", |
2004 | 1d346984 | Stavros Sachtouris | "rel": "self" |
2005 | 1d346984 | Stavros Sachtouris | }, |
2006 | 1d346984 | Stavros Sachtouris | { |
2007 | 1d346984 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/flavors/1", |
2008 | 1d346984 | Stavros Sachtouris | "rel": "bookmark" |
2009 | 1d346984 | Stavros Sachtouris | } |
2010 | 1d346984 | Stavros Sachtouris | ] |
2011 | 45e274fc | Stavros Sachtouris | }, { |
2012 | 45e274fc | Stavros Sachtouris | "id": 3, |
2013 | 45e274fc | Stavros Sachtouris | "name": "Four core", |
2014 | 45e274fc | Stavros Sachtouris | "ram": 1024, |
2015 | 45e274fc | Stavros Sachtouris | "SNF:disk_template": "drbd", |
2016 | 45e274fc | Stavros Sachtouris | "disk": 40, |
2017 | 1d346984 | Stavros Sachtouris | "cpu": 4, |
2018 | 1d346984 | Stavros Sachtouris | "links": [ |
2019 | 1d346984 | Stavros Sachtouris | { |
2020 | 1d346984 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/flavors/3", |
2021 | 1d346984 | Stavros Sachtouris | "rel": "self" |
2022 | 1d346984 | Stavros Sachtouris | }, |
2023 | 1d346984 | Stavros Sachtouris | { |
2024 | 1d346984 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/flavors/3", |
2025 | 1d346984 | Stavros Sachtouris | "rel": "bookmark" |
2026 | 1d346984 | Stavros Sachtouris | } |
2027 | 1d346984 | Stavros Sachtouris | ] |
2028 | 45e274fc | Stavros Sachtouris | } |
2029 | 45e274fc | Stavros Sachtouris | ] |
2030 | de2e08f6 | Stavros Sachtouris | } |
2031 | de2e08f6 | Stavros Sachtouris | |
2032 | de2e08f6 | Stavros Sachtouris | Get Flavor Details |
2033 | a3d2b515 | Stavros Sachtouris | ------------------ |
2034 | de2e08f6 | Stavros Sachtouris | |
2035 | 2b9d64a5 | Stavros Sachtouris | Get the configuration of a specific flavor |
2036 | 2b9d64a5 | Stavros Sachtouris | |
2037 | 2b9d64a5 | Stavros Sachtouris | .. rubric:: Request |
2038 | 2b9d64a5 | Stavros Sachtouris | |
2039 | 23a2f796 | Stavros Sachtouris | ======================= ====== ======== ========== |
2040 | 68386e00 | Stavros Sachtouris | URI Method Cyclades OS/Compute |
2041 | 23a2f796 | Stavros Sachtouris | ======================= ====== ======== ========== |
2042 | 23a2f796 | Stavros Sachtouris | ``/flavors/<flavor-id`` GET ✔ ✔ |
2043 | 23a2f796 | Stavros Sachtouris | ======================= ====== ======== ========== |
2044 | 23a2f796 | Stavros Sachtouris | |
2045 | 23a2f796 | Stavros Sachtouris | * **flavor-id** is the identifier of the flavor |
2046 | 23a2f796 | Stavros Sachtouris | |
2047 | 23a2f796 | Stavros Sachtouris | | |
2048 | 23a2f796 | Stavros Sachtouris | |
2049 | b38e8fa5 | Stavros Sachtouris | ============== ========================= ======== ========== |
2050 | 68386e00 | Stavros Sachtouris | Request Header Value Cyclades OS/Compute |
2051 | b38e8fa5 | Stavros Sachtouris | ============== ========================= ======== ========== |
2052 | b38e8fa5 | Stavros Sachtouris | X-Auth-Token User authentication token required required |
2053 | b38e8fa5 | Stavros Sachtouris | ============== ========================= ======== ========== |
2054 | 23a2f796 | Stavros Sachtouris | |
2055 | 23a2f796 | Stavros Sachtouris | | |
2056 | 23a2f796 | Stavros Sachtouris | |
2057 | 23a2f796 | Stavros Sachtouris | ================= =============== |
2058 | 3458183d | Constantinos Venetsanopoulos | Request Parameter Value |
2059 | 23a2f796 | Stavros Sachtouris | ================= =============== |
2060 | 23a2f796 | Stavros Sachtouris | json Respond in json |
2061 | 3458183d | Constantinos Venetsanopoulos | xml Respond in xml |
2062 | 23a2f796 | Stavros Sachtouris | ================= =============== |
2063 | 23a2f796 | Stavros Sachtouris | |
2064 | 2b9d64a5 | Stavros Sachtouris | .. note:: Request body should be empty |
2065 | 2b9d64a5 | Stavros Sachtouris | |
2066 | 2b9d64a5 | Stavros Sachtouris | .. rubric:: Response |
2067 | 23a2f796 | Stavros Sachtouris | |
2068 | 23a2f796 | Stavros Sachtouris | =========================== ===================== |
2069 | 23a2f796 | Stavros Sachtouris | Return Code Description |
2070 | 23a2f796 | Stavros Sachtouris | =========================== ===================== |
2071 | 23a2f796 | Stavros Sachtouris | 200 (OK) Request succeeded |
2072 | 23a2f796 | Stavros Sachtouris | 400 (Bad Request) Malformed flavor ID |
2073 | 23a2f796 | Stavros Sachtouris | 401 (Unauthorized) Missing or expired user token |
2074 | 23a2f796 | Stavros Sachtouris | 403 (Forbidden) Forbidden to use this flavor |
2075 | 23a2f796 | Stavros Sachtouris | 404 (Not Found) Flavor id not founmd |
2076 | 23a2f796 | Stavros Sachtouris | 500 (Internal Server Error) The request cannot be completed because of an |
2077 | e7f266c3 | Stavros Sachtouris | \ internal error |
2078 | 23a2f796 | Stavros Sachtouris | 503 (Service Unavailable) The server is not currently available |
2079 | 23a2f796 | Stavros Sachtouris | =========================== ===================== |
2080 | 23a2f796 | Stavros Sachtouris | |
2081 | 2b9d64a5 | Stavros Sachtouris | Response code contents:: |
2082 | 23a2f796 | Stavros Sachtouris | |
2083 | 2b9d64a5 | Stavros Sachtouris | flavor: { |
2084 | 2b9d64a5 | Stavros Sachtouris | <flavor attribute>: <value>, |
2085 | 2b9d64a5 | Stavros Sachtouris | ... |
2086 | 2b9d64a5 | Stavros Sachtouris | } |
2087 | 2b9d64a5 | Stavros Sachtouris | |
2088 | a3d2b515 | Stavros Sachtouris | All flavor attributes are `listed here <#flavor-ref>`_. |
2089 | 2b9d64a5 | Stavros Sachtouris | |
2090 | 634ef3a8 | Stavros Sachtouris | *Example Flavor Details: JSON* |
2091 | 23a2f796 | Stavros Sachtouris | |
2092 | 23a2f796 | Stavros Sachtouris | .. code-block:: javascript |
2093 | 3458183d | Constantinos Venetsanopoulos | |
2094 | 23a2f796 | Stavros Sachtouris | { |
2095 | 23a2f796 | Stavros Sachtouris | "flavor": { |
2096 | 23a2f796 | Stavros Sachtouris | { |
2097 | 23a2f796 | Stavros Sachtouris | "id": 1, |
2098 | 23a2f796 | Stavros Sachtouris | "name": "One core", |
2099 | 23a2f796 | Stavros Sachtouris | "ram": 1024, |
2100 | 23a2f796 | Stavros Sachtouris | "SNF:disk_template": "drbd", |
2101 | 23a2f796 | Stavros Sachtouris | "disk": 20, |
2102 | 1d346984 | Stavros Sachtouris | "cpu": 1, |
2103 | 1d346984 | Stavros Sachtouris | "links": [ |
2104 | 1d346984 | Stavros Sachtouris | { |
2105 | 1d346984 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/flavors/1", |
2106 | 1d346984 | Stavros Sachtouris | "rel": "self" |
2107 | 1d346984 | Stavros Sachtouris | }, |
2108 | 1d346984 | Stavros Sachtouris | { |
2109 | 1d346984 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/flavors/1", |
2110 | 1d346984 | Stavros Sachtouris | "rel": "bookmark" |
2111 | 1d346984 | Stavros Sachtouris | } |
2112 | 1d346984 | Stavros Sachtouris | ] |
2113 | 23a2f796 | Stavros Sachtouris | } |
2114 | 23a2f796 | Stavros Sachtouris | } |
2115 | 23a2f796 | Stavros Sachtouris | } |
2116 | 23a2f796 | Stavros Sachtouris | |
2117 | 634ef3a8 | Stavros Sachtouris | *Example Flavor Details: XML* |
2118 | 23a2f796 | Stavros Sachtouris | |
2119 | 23a2f796 | Stavros Sachtouris | .. code-block:: xml |
2120 | 23a2f796 | Stavros Sachtouris | |
2121 | 23a2f796 | Stavros Sachtouris | <?xml version="1.0" encoding="UTF-8"?> |
2122 | 23a2f796 | Stavros Sachtouris | <flavor xmlns="http://docs.openstack.org/compute/api/v1" |
2123 | 23a2f796 | Stavros Sachtouris | xmlns:atom="http://www.w3.org/2005/Atom" |
2124 | 23a2f796 | Stavros Sachtouris | id="1" name="One core" ram="1024" disk="20" cpu="1" /> |
2125 | 2cd1c00a | Giorgos Verigakis | |
2126 | e74edfbb | Stavros Sachtouris | List Images |
2127 | a3d2b515 | Stavros Sachtouris | ----------- |
2128 | e74edfbb | Stavros Sachtouris | |
2129 | 2b9d64a5 | Stavros Sachtouris | List all images accessible by the user |
2130 | 2b9d64a5 | Stavros Sachtouris | |
2131 | 2b9d64a5 | Stavros Sachtouris | .. rubric:: Request |
2132 | 2b9d64a5 | Stavros Sachtouris | |
2133 | e74edfbb | Stavros Sachtouris | =================== ====== ======== ========== |
2134 | 68386e00 | Stavros Sachtouris | URI Method Cyclades OS/Compute |
2135 | e74edfbb | Stavros Sachtouris | =================== ====== ======== ========== |
2136 | b16e83ee | Stavros Sachtouris | ``/images`` GET ✔ ✔ |
2137 | b16e83ee | Stavros Sachtouris | ``/images/detail`` GET ✔ ✔ |
2138 | e74edfbb | Stavros Sachtouris | =================== ====== ======== ========== |
2139 | e74edfbb | Stavros Sachtouris | |
2140 | 2b9d64a5 | Stavros Sachtouris | | |
2141 | 2b9d64a5 | Stavros Sachtouris | |
2142 | 2b9d64a5 | Stavros Sachtouris | ============== ========================= ======== ========== |
2143 | 2b9d64a5 | Stavros Sachtouris | Request Header Value Cyclades OS/Compute |
2144 | 2b9d64a5 | Stavros Sachtouris | ============== ========================= ======== ========== |
2145 | 2b9d64a5 | Stavros Sachtouris | X-Auth-Token User authentication token required required |
2146 | 2b9d64a5 | Stavros Sachtouris | ============== ========================= ======== ========== |
2147 | e74edfbb | Stavros Sachtouris | |
2148 | e74edfbb | Stavros Sachtouris | | |
2149 | e74edfbb | Stavros Sachtouris | |
2150 | e74edfbb | Stavros Sachtouris | ================= ======================== ======== ========== |
2151 | 68386e00 | Stavros Sachtouris | Request Parameter Value Cyclades OS/Compute |
2152 | e74edfbb | Stavros Sachtouris | ================= ======================== ======== ========== |
2153 | e74edfbb | Stavros Sachtouris | server Server filter **✘** ✔ |
2154 | e74edfbb | Stavros Sachtouris | name Image name filter **✘** ✔ |
2155 | e74edfbb | Stavros Sachtouris | status Server status filter **✘** ✔ |
2156 | e74edfbb | Stavros Sachtouris | changes-since Change timestamp filter ✔ ✔ |
2157 | e74edfbb | Stavros Sachtouris | marker Last list last ID filter **✘** ✔ |
2158 | e74edfbb | Stavros Sachtouris | limit Page size filter **✘** ✔ |
2159 | e74edfbb | Stavros Sachtouris | type Request filter type **✘** ✔ |
2160 | e74edfbb | Stavros Sachtouris | ================= ======================== ======== ========== |
2161 | e74edfbb | Stavros Sachtouris | |
2162 | b38e8fa5 | Stavros Sachtouris | * **changes-since** must be an ISO8601 date string. In Cyclades it refers to |
2163 | b38e8fa5 | Stavros Sachtouris | the image ``updated_at`` attribute and it should be a date in the window |
2164 | b38e8fa5 | Stavros Sachtouris | [- POLL_LIMIT ... now]. POLL_LIMIT default value is 3600 seconds except if it |
2165 | b38e8fa5 | Stavros Sachtouris | is set otherwise at server side. |
2166 | e74edfbb | Stavros Sachtouris | |
2167 | 2b9d64a5 | Stavros Sachtouris | .. note:: Request body should be empty |
2168 | e74edfbb | Stavros Sachtouris | |
2169 | 2b9d64a5 | Stavros Sachtouris | .. rubric:: Response |
2170 | e74edfbb | Stavros Sachtouris | |
2171 | e74edfbb | Stavros Sachtouris | =========================== ===================== |
2172 | e74edfbb | Stavros Sachtouris | Return Code Description |
2173 | e74edfbb | Stavros Sachtouris | =========================== ===================== |
2174 | e74edfbb | Stavros Sachtouris | 200 (OK) Request succeeded |
2175 | e74edfbb | Stavros Sachtouris | 304 (No images since date) Can be returned if ``changes-since`` is given |
2176 | e74edfbb | Stavros Sachtouris | 400 (Bad Request) Invalid or malformed ``changes-since`` parameter |
2177 | e74edfbb | Stavros Sachtouris | 401 (Unauthorized) Missing or expired user token |
2178 | e74edfbb | Stavros Sachtouris | 403 (Forbidden) User is not allowed to perform this operation |
2179 | e74edfbb | Stavros Sachtouris | 500 (Internal Server Error) The request cannot be completed because of an |
2180 | e7f266c3 | Stavros Sachtouris | \ internal error |
2181 | e74edfbb | Stavros Sachtouris | 503 (Service Unavailable) The server is not currently available |
2182 | e74edfbb | Stavros Sachtouris | =========================== ===================== |
2183 | e74edfbb | Stavros Sachtouris | |
2184 | 2b9d64a5 | Stavros Sachtouris | Response body contents:: |
2185 | b38e8fa5 | Stavros Sachtouris | |
2186 | 45e274fc | Stavros Sachtouris | images: [ |
2187 | 2b9d64a5 | Stavros Sachtouris | { |
2188 | 2b9d64a5 | Stavros Sachtouris | <image attribute>: <value>, |
2189 | 2b9d64a5 | Stavros Sachtouris | ... |
2190 | 45e274fc | Stavros Sachtouris | metadata: { |
2191 | a3d2b515 | Stavros Sachtouris | <image meta key>: <value>, |
2192 | 2b9d64a5 | Stavros Sachtouris | ... |
2193 | 45e274fc | Stavros Sachtouris | }, |
2194 | 2b9d64a5 | Stavros Sachtouris | ... |
2195 | 2b9d64a5 | Stavros Sachtouris | }, |
2196 | 2b9d64a5 | Stavros Sachtouris | ... |
2197 | 45e274fc | Stavros Sachtouris | ] |
2198 | 2b9d64a5 | Stavros Sachtouris | |
2199 | 45e274fc | Stavros Sachtouris | The regular response returns just ``id`` and ``name``, while the detail returns |
2200 | 45e274fc | Stavros Sachtouris | a collections of the `image attributes listed here <#image-ref>`_. |
2201 | e74edfbb | Stavros Sachtouris | |
2202 | 634ef3a8 | Stavros Sachtouris | *Example List Image (detail): JSON* |
2203 | e74edfbb | Stavros Sachtouris | |
2204 | e74edfbb | Stavros Sachtouris | .. code-block:: javascript |
2205 | e74edfbb | Stavros Sachtouris | |
2206 | e74edfbb | Stavros Sachtouris | { |
2207 | 45e274fc | Stavros Sachtouris | "images: [ |
2208 | 45e274fc | Stavros Sachtouris | { |
2209 | 45e274fc | Stavros Sachtouris | "status": "ACTIVE", |
2210 | 45e274fc | Stavros Sachtouris | "updated": "2013-03-02T15:57:03+00:00", |
2211 | 45e274fc | Stavros Sachtouris | "name": "edx_saas", |
2212 | 45e274fc | Stavros Sachtouris | "created": "2013-03-02T12:21:00+00:00", |
2213 | 45e274fc | Stavros Sachtouris | "progress": 100, |
2214 | 45e274fc | Stavros Sachtouris | "id": "175716...526236", |
2215 | 1d346984 | Stavros Sachtouris | "links": [ |
2216 | 1d346984 | Stavros Sachtouris | { |
2217 | 1d346984 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/images/175716...526236", |
2218 | 1d346984 | Stavros Sachtouris | "rel": "self" |
2219 | 1d346984 | Stavros Sachtouris | }, |
2220 | 1d346984 | Stavros Sachtouris | { |
2221 | 1d346984 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/images/175716...526236", |
2222 | 1d346984 | Stavros Sachtouris | "rel": "bookmark" |
2223 | 1d346984 | Stavros Sachtouris | }, |
2224 | 1d346984 | Stavros Sachtouris | { |
2225 | 1d346984 | Stavros Sachtouris | "href": "https://example.org/image/v1.0/images/175716...526236", |
2226 | 1d346984 | Stavros Sachtouris | "rel": "alternate" |
2227 | 1d346984 | Stavros Sachtouris | } |
2228 | 1d346984 | Stavros Sachtouris | ], |
2229 | 45e274fc | Stavros Sachtouris | "metadata": { |
2230 | 45e274fc | Stavros Sachtouris | "partition_table": "msdos", |
2231 | 45e274fc | Stavros Sachtouris | "osfamily": "linux", |
2232 | 45e274fc | Stavros Sachtouris | "users": "root saasbook", |
2233 | 45e274fc | Stavros Sachtouris | "exclude_task_changepassword": "yes", |
2234 | 45e274fc | Stavros Sachtouris | "os": "ubuntu", |
2235 | 45e274fc | Stavros Sachtouris | "root_partition": "1", |
2236 | 45e274fc | Stavros Sachtouris | "description": "Ubuntu 12.04 LTS" |
2237 | e74edfbb | Stavros Sachtouris | } |
2238 | 45e274fc | Stavros Sachtouris | }, { |
2239 | 45e274fc | Stavros Sachtouris | "status": "ACTIVE", |
2240 | 45e274fc | Stavros Sachtouris | "updated": "2013-03-02T15:57:03+00:00", |
2241 | 45e274fc | Stavros Sachtouris | "name": "edx_saas", |
2242 | 45e274fc | Stavros Sachtouris | "created": "2013-03-02T12:21:00+00:00", |
2243 | 45e274fc | Stavros Sachtouris | "progress": 100, |
2244 | 45e274fc | Stavros Sachtouris | "id": "1357163d...c526206", |
2245 | 1d346984 | Stavros Sachtouris | "links": [ |
2246 | 1d346984 | Stavros Sachtouris | { |
2247 | 1d346984 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/images/1357163d...c526206", |
2248 | 1d346984 | Stavros Sachtouris | "rel": "self" |
2249 | 1d346984 | Stavros Sachtouris | }, |
2250 | 1d346984 | Stavros Sachtouris | { |
2251 | 1d346984 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/images/1357163d...c526206", |
2252 | 1d346984 | Stavros Sachtouris | "rel": "bookmark" |
2253 | 1d346984 | Stavros Sachtouris | }, |
2254 | 1d346984 | Stavros Sachtouris | { |
2255 | 1d346984 | Stavros Sachtouris | "href": "https://example.org/image/v1.0/images/1357163d...c526206", |
2256 | 1d346984 | Stavros Sachtouris | "rel": "alternate" |
2257 | 1d346984 | Stavros Sachtouris | } |
2258 | 1d346984 | Stavros Sachtouris | ], |
2259 | 45e274fc | Stavros Sachtouris | "metadata": { |
2260 | 45e274fc | Stavros Sachtouris | "partition_table": "msdos", |
2261 | 45e274fc | Stavros Sachtouris | "osfamily": "windows", |
2262 | 45e274fc | Stavros Sachtouris | "users": "Administratior", |
2263 | 45e274fc | Stavros Sachtouris | "exclude_task_changepassword": "yes", |
2264 | 45e274fc | Stavros Sachtouris | "os": "WinME", |
2265 | 45e274fc | Stavros Sachtouris | "root_partition": "1", |
2266 | 45e274fc | Stavros Sachtouris | "description": "Rerto Windows" |
2267 | 45e274fc | Stavros Sachtouris | } |
2268 | 45e274fc | Stavros Sachtouris | } |
2269 | 45e274fc | Stavros Sachtouris | ] |
2270 | e74edfbb | Stavros Sachtouris | } |
2271 | e74edfbb | Stavros Sachtouris | |
2272 | f76ec11f | Stavros Sachtouris | Get Image Details |
2273 | a3d2b515 | Stavros Sachtouris | ----------------- |
2274 | f76ec11f | Stavros Sachtouris | |
2275 | 2b9d64a5 | Stavros Sachtouris | Get the details of a specific image |
2276 | 2b9d64a5 | Stavros Sachtouris | |
2277 | 2b9d64a5 | Stavros Sachtouris | .. rubric:: Request |
2278 | 2b9d64a5 | Stavros Sachtouris | |
2279 | f76ec11f | Stavros Sachtouris | ====================== ====== ======== ========== |
2280 | 68386e00 | Stavros Sachtouris | URI Method Cyclades OS/Compute |
2281 | f76ec11f | Stavros Sachtouris | ====================== ====== ======== ========== |
2282 | f76ec11f | Stavros Sachtouris | ``/images/<image-id>`` GET ✔ ✔ |
2283 | f76ec11f | Stavros Sachtouris | ====================== ====== ======== ========== |
2284 | f76ec11f | Stavros Sachtouris | |
2285 | f76ec11f | Stavros Sachtouris | * **image-id** is the identifier of the virtual image |
2286 | f76ec11f | Stavros Sachtouris | |
2287 | f76ec11f | Stavros Sachtouris | | |
2288 | f76ec11f | Stavros Sachtouris | |
2289 | f76ec11f | Stavros Sachtouris | ============== ========================= ======== ========== |
2290 | 68386e00 | Stavros Sachtouris | Request Header Value Cyclades OS/Compute |
2291 | f76ec11f | Stavros Sachtouris | ============== ========================= ======== ========== |
2292 | f76ec11f | Stavros Sachtouris | X-Auth-Token User authentication token required required |
2293 | f76ec11f | Stavros Sachtouris | ============== ========================= ======== ========== |
2294 | f76ec11f | Stavros Sachtouris | |
2295 | 2b9d64a5 | Stavros Sachtouris | .. note:: Request parameters should be empty |
2296 | 2b9d64a5 | Stavros Sachtouris | |
2297 | 2b9d64a5 | Stavros Sachtouris | .. note:: Request body should be empty |
2298 | 2b9d64a5 | Stavros Sachtouris | |
2299 | 2b9d64a5 | Stavros Sachtouris | .. rubric:: Response |
2300 | f76ec11f | Stavros Sachtouris | |
2301 | f76ec11f | Stavros Sachtouris | =========================== ===================== |
2302 | f76ec11f | Stavros Sachtouris | Return Code Description |
2303 | f76ec11f | Stavros Sachtouris | =========================== ===================== |
2304 | f76ec11f | Stavros Sachtouris | 200 (OK) Request succeeded |
2305 | f76ec11f | Stavros Sachtouris | 400 (Bad Request) Malformed image id |
2306 | f76ec11f | Stavros Sachtouris | 401 (Unauthorized) Missing or expired user token |
2307 | f76ec11f | Stavros Sachtouris | 403 (Forbidden) Not allowed to use this image |
2308 | f76ec11f | Stavros Sachtouris | 404 (Not Found) Image not found |
2309 | f76ec11f | Stavros Sachtouris | 500 (Internal Server Error) The request cannot be completed because of an |
2310 | e7f266c3 | Stavros Sachtouris | \ internal error |
2311 | f76ec11f | Stavros Sachtouris | 503 (Service Unavailable) No available backends or service currently |
2312 | e7f266c3 | Stavros Sachtouris | \ unavailable |
2313 | f76ec11f | Stavros Sachtouris | =========================== ===================== |
2314 | f76ec11f | Stavros Sachtouris | |
2315 | 2b9d64a5 | Stavros Sachtouris | Response body contents:: |
2316 | f76ec11f | Stavros Sachtouris | |
2317 | 2b9d64a5 | Stavros Sachtouris | image: { |
2318 | 2b9d64a5 | Stavros Sachtouris | <image attribute>: <value>, |
2319 | 2b9d64a5 | Stavros Sachtouris | ... |
2320 | 45e274fc | Stavros Sachtouris | metadata: { |
2321 | a3d2b515 | Stavros Sachtouris | <image meta key>: <value> |
2322 | 45e274fc | Stavros Sachtouris | } |
2323 | 2b9d64a5 | Stavros Sachtouris | } |
2324 | f76ec11f | Stavros Sachtouris | |
2325 | 2b9d64a5 | Stavros Sachtouris | Image attributes are `listed here <#image-ref>`_. |
2326 | f76ec11f | Stavros Sachtouris | |
2327 | 634ef3a8 | Stavros Sachtouris | *Example Details for an image with id 6404619d-...-aef57eaff4af, in JSON* |
2328 | f76ec11f | Stavros Sachtouris | |
2329 | f76ec11f | Stavros Sachtouris | .. code-block:: javascript |
2330 | f76ec11f | Stavros Sachtouris | |
2331 | 45e274fc | Stavros Sachtouris | { |
2332 | 45e274fc | Stavros Sachtouris | "image": { |
2333 | 45e274fc | Stavros Sachtouris | "id": "6404619d-...-aef57eaff4af", |
2334 | 45e274fc | Stavros Sachtouris | "name": "FreeBSD", |
2335 | 45e274fc | Stavros Sachtouris | "status": "ACTIVE", |
2336 | 45e274fc | Stavros Sachtouris | "updated": "2013-04-24T12:06:02+00:00", |
2337 | 45e274fc | Stavros Sachtouris | "created": "2013-04-24T11:52:16+00:00", |
2338 | 45e274fc | Stavros Sachtouris | "progress": 100, |
2339 | 1d346984 | Stavros Sachtouris | "links": [ |
2340 | 1d346984 | Stavros Sachtouris | { |
2341 | 1d346984 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/images/6404619d-...-aef57eaff4af", |
2342 | 1d346984 | Stavros Sachtouris | "rel": "self" |
2343 | 1d346984 | Stavros Sachtouris | }, |
2344 | 1d346984 | Stavros Sachtouris | { |
2345 | 1d346984 | Stavros Sachtouris | "href": "https://example.org/compute/v2.0/images/6404619d-...-aef57eaff4af", |
2346 | 1d346984 | Stavros Sachtouris | "rel": "bookmark" |
2347 | 1d346984 | Stavros Sachtouris | }, |
2348 | 1d346984 | Stavros Sachtouris | { |
2349 | 1d346984 | Stavros Sachtouris | "href": "https://example.org/image/v1.0/images/6404619d-...-aef57eaff4af", |
2350 | 1d346984 | Stavros Sachtouris | "rel": "alternate" |
2351 | 1d346984 | Stavros Sachtouris | } |
2352 | 1d346984 | Stavros Sachtouris | ], |
2353 | 45e274fc | Stavros Sachtouris | "metadata": { |
2354 | 45e274fc | Stavros Sachtouris | "kernel": "9.1 RELEASE", |
2355 | 45e274fc | Stavros Sachtouris | "osfamily": "freebsd", |
2356 | 45e274fc | Stavros Sachtouris | "users": "root", |
2357 | 45e274fc | Stavros Sachtouris | "gui": "No GUI", |
2358 | 45e274fc | Stavros Sachtouris | "sortorder": "9", |
2359 | 45e274fc | Stavros Sachtouris | "os": "freebsd", |
2360 | 45e274fc | Stavros Sachtouris | "root_partition": "2", |
2361 | 45e274fc | Stavros Sachtouris | "description": "FreeBSD 9" |
2362 | f76ec11f | Stavros Sachtouris | } |
2363 | f76ec11f | Stavros Sachtouris | } |
2364 | f76ec11f | Stavros Sachtouris | } |
2365 | e74edfbb | Stavros Sachtouris | |
2366 | e74edfbb | Stavros Sachtouris | |
2367 | 9169cde6 | Stavros Sachtouris | Delete Image |
2368 | a3d2b515 | Stavros Sachtouris | ------------ |
2369 | 9169cde6 | Stavros Sachtouris | |
2370 | 2b9d64a5 | Stavros Sachtouris | Delete an image, by changing its status from ``ACTIVE`` to ``DELETED``. |
2371 | 2b9d64a5 | Stavros Sachtouris | |
2372 | 2b9d64a5 | Stavros Sachtouris | .. rubric:: Request |
2373 | 2b9d64a5 | Stavros Sachtouris | |
2374 | 348bdb4e | Stavros Sachtouris | ====================== ====== ======== ========== |
2375 | 68386e00 | Stavros Sachtouris | URI Method Cyclades OS/Compute |
2376 | 348bdb4e | Stavros Sachtouris | ====================== ====== ======== ========== |
2377 | 9169cde6 | Stavros Sachtouris | ``/images/<image id>`` DELETE ✔ ✔ |
2378 | 9169cde6 | Stavros Sachtouris | ====================== ====== ======== ========== |
2379 | 9169cde6 | Stavros Sachtouris | |
2380 | 2b9d64a5 | Stavros Sachtouris | * **image id** is the identifier of the image |
2381 | 9169cde6 | Stavros Sachtouris | |
2382 | 9169cde6 | Stavros Sachtouris | | |
2383 | 9169cde6 | Stavros Sachtouris | |
2384 | 9169cde6 | Stavros Sachtouris | ============== ========================= ======== ========== |
2385 | 68386e00 | Stavros Sachtouris | Request Header Value Cyclades OS/Compute |
2386 | 9169cde6 | Stavros Sachtouris | ============== ========================= ======== ========== |
2387 | 9169cde6 | Stavros Sachtouris | X-Auth-Token User authentication token required required |
2388 | 9169cde6 | Stavros Sachtouris | ============== ========================= ======== ========== |
2389 | 9169cde6 | Stavros Sachtouris | |
2390 | 2b9d64a5 | Stavros Sachtouris | .. note:: Request parameters should be empty |
2391 | 2b9d64a5 | Stavros Sachtouris | |
2392 | 2b9d64a5 | Stavros Sachtouris | .. note:: Request body should be empty |
2393 | 2b9d64a5 | Stavros Sachtouris | |
2394 | 2b9d64a5 | Stavros Sachtouris | .. rubric:: Response |
2395 | 9169cde6 | Stavros Sachtouris | |
2396 | 9169cde6 | Stavros Sachtouris | =========================== ===================== |
2397 | 9169cde6 | Stavros Sachtouris | Return Code Description |
2398 | 9169cde6 | Stavros Sachtouris | =========================== ===================== |
2399 | 9169cde6 | Stavros Sachtouris | 204 (OK) Request succeeded |
2400 | 9169cde6 | Stavros Sachtouris | 400 (Bad Request) Invalid request or image id |
2401 | 9169cde6 | Stavros Sachtouris | 401 (Unauthorized) Missing or expired user token |
2402 | 9169cde6 | Stavros Sachtouris | 404 (Not Found) Image not found |
2403 | 9169cde6 | Stavros Sachtouris | 500 (Internal Server Error) The request cannot be completed because of an |
2404 | e7f266c3 | Stavros Sachtouris | \ internal error |
2405 | 9169cde6 | Stavros Sachtouris | 503 (Service Unavailable) Action not supported or service currently |
2406 | e7f266c3 | Stavros Sachtouris | \ unavailable |
2407 | 9169cde6 | Stavros Sachtouris | =========================== ===================== |
2408 | 9169cde6 | Stavros Sachtouris | |
2409 | 2b9d64a5 | Stavros Sachtouris | .. note:: In case of a 204 code, request body should be empty |
2410 | b38e8fa5 | Stavros Sachtouris | |
2411 | 03c9cb80 | Stavros Sachtouris | List Image Metadata |
2412 | a3d2b515 | Stavros Sachtouris | ------------------- |
2413 | c347ba83 | Stavros Sachtouris | |
2414 | 03c9cb80 | Stavros Sachtouris | .. rubric:: Request |
2415 | 03c9cb80 | Stavros Sachtouris | |
2416 | c347ba83 | Stavros Sachtouris | =============================== ====== ======== ========== |
2417 | 68386e00 | Stavros Sachtouris | URI Method Cyclades OS/Compute |
2418 | c347ba83 | Stavros Sachtouris | =============================== ====== ======== ========== |
2419 | 45e274fc | Stavros Sachtouris | ``/images/<image-id>/metadata`` GET ✔ ✔ |
2420 | c347ba83 | Stavros Sachtouris | =============================== ====== ======== ========== |
2421 | c347ba83 | Stavros Sachtouris | |
2422 | c347ba83 | Stavros Sachtouris | * **image-id** is the identifier of the virtual image |
2423 | c347ba83 | Stavros Sachtouris | |
2424 | c347ba83 | Stavros Sachtouris | | |
2425 | c347ba83 | Stavros Sachtouris | ============== ========================= ======== ========== |
2426 | 68386e00 | Stavros Sachtouris | Request Header Value Cyclades OS/Compute |
2427 | c347ba83 | Stavros Sachtouris | ============== ========================= ======== ========== |
2428 | c347ba83 | Stavros Sachtouris | X-Auth-Token User authentication token required required |
2429 | c347ba83 | Stavros Sachtouris | ============== ========================= ======== ========== |
2430 | c347ba83 | Stavros Sachtouris | |
2431 | 03c9cb80 | Stavros Sachtouris | .. note:: Request parameters should be empty |
2432 | 03c9cb80 | Stavros Sachtouris | |
2433 | 03c9cb80 | Stavros Sachtouris | .. note:: Request body should be empty |
2434 | 03c9cb80 | Stavros Sachtouris | |
2435 | 03c9cb80 | Stavros Sachtouris | .. rubric:: Response |
2436 | c347ba83 | Stavros Sachtouris | |
2437 | c347ba83 | Stavros Sachtouris | =========================== ===================== |
2438 | c347ba83 | Stavros Sachtouris | Return Code Description |
2439 | c347ba83 | Stavros Sachtouris | =========================== ===================== |
2440 | c347ba83 | Stavros Sachtouris | 201 (OK) Request succeeded |
2441 | c347ba83 | Stavros Sachtouris | 400 (Bad Request) Invalid image ID or Malformed request |
2442 | c347ba83 | Stavros Sachtouris | 401 (Unauthorized) Missing or expired user token |
2443 | c347ba83 | Stavros Sachtouris | 403 (Forbidden) Administratively suspended server |
2444 | c347ba83 | Stavros Sachtouris | 404 (Not Found) Server not found |
2445 | c347ba83 | Stavros Sachtouris | 409 (Build In Progress) The image is not ready yet |
2446 | c347ba83 | Stavros Sachtouris | 500 (Internal Server Error) The request cannot be completed because of an |
2447 | e7f266c3 | Stavros Sachtouris | \ internal error |
2448 | c347ba83 | Stavros Sachtouris | 503 (Service Unavailable) The server is not currently available |
2449 | c347ba83 | Stavros Sachtouris | =========================== ===================== |
2450 | c347ba83 | Stavros Sachtouris | |
2451 | 03c9cb80 | Stavros Sachtouris | Response body content:: |
2452 | 03c9cb80 | Stavros Sachtouris | |
2453 | 03c9cb80 | Stavros Sachtouris | metadata: { |
2454 | a3d2b515 | Stavros Sachtouris | <meta key>: <value>, |
2455 | 45e274fc | Stavros Sachtouris | ... |
2456 | 03c9cb80 | Stavros Sachtouris | } |
2457 | 03c9cb80 | Stavros Sachtouris | |
2458 | 634ef3a8 | Stavros Sachtouris | *Example List Image Metadata: JSON* |
2459 | e74edfbb | Stavros Sachtouris | |
2460 | c347ba83 | Stavros Sachtouris | .. code-block:: javascript |
2461 | e74edfbb | Stavros Sachtouris | |
2462 | 3458183d | Constantinos Venetsanopoulos | { |
2463 | 68386e00 | Stavros Sachtouris | "metadata": { |
2464 | 45e274fc | Stavros Sachtouris | "partition_table": "msdos", |
2465 | 45e274fc | Stavros Sachtouris | "kernel": "3.2.0", |
2466 | 45e274fc | Stavros Sachtouris | "osfamily": "linux", |
2467 | 45e274fc | Stavros Sachtouris | "users": "user", |
2468 | 45e274fc | Stavros Sachtouris | "gui": "Unity 5", |
2469 | 45e274fc | Stavros Sachtouris | "sortorder": "3", |
2470 | 45e274fc | Stavros Sachtouris | "os": "ubuntu", |
2471 | 45e274fc | Stavros Sachtouris | "root_partition": "1", |
2472 | 45e274fc | Stavros Sachtouris | "description": "Ubuntu 12 LTS" |
2473 | c347ba83 | Stavros Sachtouris | } |
2474 | c347ba83 | Stavros Sachtouris | } |
2475 | c347ba83 | Stavros Sachtouris | |
2476 | 03c9cb80 | Stavros Sachtouris | .. note:: In OS/Compute API the ``values`` level is missing from the response. |
2477 | c347ba83 | Stavros Sachtouris | |
2478 | 1730a8b6 | Stavros Sachtouris | Update Image Metadata |
2479 | a3d2b515 | Stavros Sachtouris | --------------------- |
2480 | c347ba83 | Stavros Sachtouris | |
2481 | c347ba83 | Stavros Sachtouris | In Cyclades API, setting new metadata and updating the values of existing ones |
2482 | 03c9cb80 | Stavros Sachtouris | is achieved using one type of request (POST), while in OS/Compute API two |
2483 | 03c9cb80 | Stavros Sachtouris | different types are used (PUT and POST for |
2484 | c347ba83 | Stavros Sachtouris | `setting new <http://docs.openstack.org/api/openstack-compute/2/content/Create_or_Replace_Metadata-d1e5358.html>`_ |
2485 | c347ba83 | Stavros Sachtouris | and |
2486 | c347ba83 | Stavros Sachtouris | `updating existing <http://docs.openstack.org/api/openstack-compute/2/content/Update_Metadata-d1e5208.html>`_ |
2487 | c347ba83 | Stavros Sachtouris | metadata, respectively). |
2488 | c347ba83 | Stavros Sachtouris | |
2489 | b38e8fa5 | Stavros Sachtouris | In Cyclades API, unmentioned metadata keys will remain intact, while metadata |
2490 | b38e8fa5 | Stavros Sachtouris | referred by the operation will be overwritten. |
2491 | c347ba83 | Stavros Sachtouris | |
2492 | 03c9cb80 | Stavros Sachtouris | .. rubric:: Request |
2493 | 03c9cb80 | Stavros Sachtouris | |
2494 | c347ba83 | Stavros Sachtouris | =============================== ====== ======== ========== |
2495 | 68386e00 | Stavros Sachtouris | URI Method Cyclades OS/Compute |
2496 | c347ba83 | Stavros Sachtouris | =============================== ====== ======== ========== |
2497 | c347ba83 | Stavros Sachtouris | ``/images/<image-id>/metadata`` PUT **✘** ✔ |
2498 | 45e274fc | Stavros Sachtouris | ``/images/<image-id>/metadata`` POST ✔ ✔ |
2499 | c347ba83 | Stavros Sachtouris | =============================== ====== ======== ========== |
2500 | c347ba83 | Stavros Sachtouris | |
2501 | c347ba83 | Stavros Sachtouris | * **image-id** is the identifier of the virtual image |
2502 | c347ba83 | Stavros Sachtouris | |
2503 | c347ba83 | Stavros Sachtouris | | |
2504 | c347ba83 | Stavros Sachtouris | ============== ========================= ======== ========== |
2505 | 68386e00 | Stavros Sachtouris | Request Header Value Cyclades OS/Compute |
2506 | c347ba83 | Stavros Sachtouris | ============== ========================= ======== ========== |
2507 | c347ba83 | Stavros Sachtouris | X-Auth-Token User authentication token required required |
2508 | 634ef3a8 | Stavros Sachtouris | Content-Type Type or request body required required |
2509 | 634ef3a8 | Stavros Sachtouris | Content-Length Length of request body required required |
2510 | c347ba83 | Stavros Sachtouris | ============== ========================= ======== ========== |
2511 | c347ba83 | Stavros Sachtouris | |
2512 | 634ef3a8 | Stavros Sachtouris | **Example Request Headers**:: |
2513 | 634ef3a8 | Stavros Sachtouris | |
2514 | 634ef3a8 | Stavros Sachtouris | X-Auth-Token: z31uRXUn1LZy45p1r7V== |
2515 | 634ef3a8 | Stavros Sachtouris | Content-Type: application/json |
2516 | 634ef3a8 | Stavros Sachtouris | Content-Length: 52 |
2517 | 634ef3a8 | Stavros Sachtouris | |
2518 | 03c9cb80 | Stavros Sachtouris | .. note:: Request parameters should be empty |
2519 | 03c9cb80 | Stavros Sachtouris | |
2520 | 03c9cb80 | Stavros Sachtouris | Request body content:: |
2521 | 03c9cb80 | Stavros Sachtouris | |
2522 | 03c9cb80 | Stavros Sachtouris | metadata: { |
2523 | a3d2b515 | Stavros Sachtouris | <meta key>: <value>, |
2524 | 03c9cb80 | Stavros Sachtouris | ... |
2525 | 03c9cb80 | Stavros Sachtouris | } |
2526 | c347ba83 | Stavros Sachtouris | |
2527 | 634ef3a8 | Stavros Sachtouris | *Example Update Image Metadata Request: JSON* |
2528 | c347ba83 | Stavros Sachtouris | |
2529 | 03c9cb80 | Stavros Sachtouris | .. code-block:: javascript |
2530 | c347ba83 | Stavros Sachtouris | |
2531 | 03c9cb80 | Stavros Sachtouris | {"metadata": {"NewAttr": "NewVal", "os": "Xubuntu'}} |
2532 | 03c9cb80 | Stavros Sachtouris | |
2533 | 03c9cb80 | Stavros Sachtouris | .. rubric:: Response |
2534 | c347ba83 | Stavros Sachtouris | |
2535 | c347ba83 | Stavros Sachtouris | =========================== ===================== |
2536 | c347ba83 | Stavros Sachtouris | Return Code Description |
2537 | c347ba83 | Stavros Sachtouris | =========================== ===================== |
2538 | c347ba83 | Stavros Sachtouris | 201 (OK) Request succeeded |
2539 | c347ba83 | Stavros Sachtouris | 400 (Bad Request) Malformed request or image id |
2540 | c347ba83 | Stavros Sachtouris | 401 (Unauthorized) Missing or expired user token |
2541 | c347ba83 | Stavros Sachtouris | 403 (Forbidden) Not allowed to modify this image |
2542 | a3d2b515 | Stavros Sachtouris | 404 (Not Found) Image or meta key not found |
2543 | c347ba83 | Stavros Sachtouris | 413 (OverLimit) Maximum number of metadata exceeded |
2544 | c347ba83 | Stavros Sachtouris | 500 (Internal Server Error) The request cannot be completed because of an |
2545 | e7f266c3 | Stavros Sachtouris | \ internal error |
2546 | c347ba83 | Stavros Sachtouris | 503 (Service Unavailable) The server is not currently available |
2547 | c347ba83 | Stavros Sachtouris | =========================== ===================== |
2548 | c347ba83 | Stavros Sachtouris | |
2549 | 03c9cb80 | Stavros Sachtouris | Response body content:: |
2550 | c347ba83 | Stavros Sachtouris | |
2551 | 03c9cb80 | Stavros Sachtouris | metadata: { |
2552 | 45e274fc | Stavros Sachtouris | <key>: <value>, |
2553 | 03c9cb80 | Stavros Sachtouris | ... |
2554 | 03c9cb80 | Stavros Sachtouris | } |
2555 | 03c9cb80 | Stavros Sachtouris | |
2556 | 634ef3a8 | Stavros Sachtouris | *Example Update Image Response: JSON* |
2557 | 03c9cb80 | Stavros Sachtouris | |
2558 | 03c9cb80 | Stavros Sachtouris | .. code-block:: javascript |
2559 | c347ba83 | Stavros Sachtouris | |
2560 | 3458183d | Constantinos Venetsanopoulos | { |
2561 | 03c9cb80 | Stavros Sachtouris | "metadata": { |
2562 | c347ba83 | Stavros Sachtouris | "partition_table": "msdos", |
2563 | c347ba83 | Stavros Sachtouris | "kernel": "3.2.0", |
2564 | c347ba83 | Stavros Sachtouris | "osfamily": "linux", |
2565 | c347ba83 | Stavros Sachtouris | "users": "user", |
2566 | c347ba83 | Stavros Sachtouris | "gui": "Unity 5", |
2567 | c347ba83 | Stavros Sachtouris | "sortorder": "3", |
2568 | c347ba83 | Stavros Sachtouris | "os": "Xubuntu", |
2569 | c347ba83 | Stavros Sachtouris | "root_partition": "1", |
2570 | c347ba83 | Stavros Sachtouris | "description": "Ubuntu 12 LTS", |
2571 | 03c9cb80 | Stavros Sachtouris | "NewAttr": "NewVal" |
2572 | c347ba83 | Stavros Sachtouris | } |
2573 | c347ba83 | Stavros Sachtouris | } |
2574 | c347ba83 | Stavros Sachtouris | |
2575 | a3d2b515 | Stavros Sachtouris | Get Image Metadata |
2576 | a3d2b515 | Stavros Sachtouris | ------------------ |
2577 | c347ba83 | Stavros Sachtouris | |
2578 | 03c9cb80 | Stavros Sachtouris | .. rubric:: Request |
2579 | 03c9cb80 | Stavros Sachtouris | |
2580 | c347ba83 | Stavros Sachtouris | ===================================== ====== ======== ========== |
2581 | 68386e00 | Stavros Sachtouris | URI Method Cyclades OS/Compute |
2582 | c347ba83 | Stavros Sachtouris | ===================================== ====== ======== ========== |
2583 | 45e274fc | Stavros Sachtouris | ``/images/<image-id>/metadata/<key>`` GET ✔ ✔ |
2584 | c347ba83 | Stavros Sachtouris | ===================================== ====== ======== ========== |
2585 | c347ba83 | Stavros Sachtouris | |
2586 | b38e8fa5 | Stavros Sachtouris | * **image-id** is the identifier of the image |
2587 | b38e8fa5 | Stavros Sachtouris | |
2588 | a3d2b515 | Stavros Sachtouris | * **key** is the key of a mata ``key``:``value`` pair |
2589 | c347ba83 | Stavros Sachtouris | |
2590 | c347ba83 | Stavros Sachtouris | | |
2591 | c347ba83 | Stavros Sachtouris | |
2592 | c347ba83 | Stavros Sachtouris | ============== ========================= ======== ========== |
2593 | 68386e00 | Stavros Sachtouris | Request Header Value Cyclades OS/Compute |
2594 | c347ba83 | Stavros Sachtouris | ============== ========================= ======== ========== |
2595 | c347ba83 | Stavros Sachtouris | X-Auth-Token User authentication token required required |
2596 | c347ba83 | Stavros Sachtouris | ============== ========================= ======== ========== |
2597 | c347ba83 | Stavros Sachtouris | |
2598 | 03c9cb80 | Stavros Sachtouris | .. note:: Request parameters should be empty |
2599 | 03c9cb80 | Stavros Sachtouris | |
2600 | 03c9cb80 | Stavros Sachtouris | .. note:: Request body should be empty |
2601 | 03c9cb80 | Stavros Sachtouris | |
2602 | 03c9cb80 | Stavros Sachtouris | .. rubric:: Response |
2603 | c347ba83 | Stavros Sachtouris | |
2604 | c347ba83 | Stavros Sachtouris | =========================== ===================== |
2605 | c347ba83 | Stavros Sachtouris | Return Code Description |
2606 | c347ba83 | Stavros Sachtouris | =========================== ===================== |
2607 | c347ba83 | Stavros Sachtouris | 200 (OK) Request succeeded |
2608 | c347ba83 | Stavros Sachtouris | 400 (Bad Request) Malformed request or image id |
2609 | c347ba83 | Stavros Sachtouris | 401 (Unauthorized) Missing or expired user token |
2610 | c347ba83 | Stavros Sachtouris | 403 (Forbidden) Not allowed to access this information |
2611 | a3d2b515 | Stavros Sachtouris | 404 (Not Found) Meta key not found |
2612 | c347ba83 | Stavros Sachtouris | 500 (Internal Server Error) The request cannot be completed because of an |
2613 | e7f266c3 | Stavros Sachtouris | \ internal error |
2614 | c347ba83 | Stavros Sachtouris | 503 (Service Unavailable) The server is not currently available |
2615 | c347ba83 | Stavros Sachtouris | =========================== ===================== |
2616 | c347ba83 | Stavros Sachtouris | |
2617 | 03c9cb80 | Stavros Sachtouris | Response body content:: |
2618 | 03c9cb80 | Stavros Sachtouris | |
2619 | 45e274fc | Stavros Sachtouris | metadata: {<key>: <value>} |
2620 | 03c9cb80 | Stavros Sachtouris | |
2621 | a3d2b515 | Stavros Sachtouris | *Example Get Image Metadata Item: JSON* |
2622 | b38e8fa5 | Stavros Sachtouris | |
2623 | b38e8fa5 | Stavros Sachtouris | .. code-block:: javascript |
2624 | c347ba83 | Stavros Sachtouris | |
2625 | 68386e00 | Stavros Sachtouris | {"metadata": {"os": "Xubuntu"}} |
2626 | c347ba83 | Stavros Sachtouris | |
2627 | 68386e00 | Stavros Sachtouris | .. note:: In OS/Compute, ``metadata`` is ``meta`` |
2628 | c347ba83 | Stavros Sachtouris | |
2629 | a3d2b515 | Stavros Sachtouris | Update Image Metadata |
2630 | a3d2b515 | Stavros Sachtouris | --------------------- |
2631 | 0ad49876 | Stavros Sachtouris | |
2632 | 03c9cb80 | Stavros Sachtouris | .. rubric:: Request |
2633 | 03c9cb80 | Stavros Sachtouris | |
2634 | 0ad49876 | Stavros Sachtouris | ===================================== ====== ======== ========== |
2635 | 68386e00 | Stavros Sachtouris | URI Method Cyclades OS/Compute |
2636 | 0ad49876 | Stavros Sachtouris | ===================================== ====== ======== ========== |
2637 | 45e274fc | Stavros Sachtouris | ``/images/<image-id>/metadata/<key>`` PUT ✔ ✔ |
2638 | 0ad49876 | Stavros Sachtouris | ===================================== ====== ======== ========== |
2639 | 0ad49876 | Stavros Sachtouris | |
2640 | 0ad49876 | Stavros Sachtouris | * **image-id** is the identifier of the image |
2641 | b38e8fa5 | Stavros Sachtouris | |
2642 | a3d2b515 | Stavros Sachtouris | * **key** is the key of a matadata ``key``:``value`` pair |
2643 | 0ad49876 | Stavros Sachtouris | |
2644 | 0ad49876 | Stavros Sachtouris | | |
2645 | 0ad49876 | Stavros Sachtouris | |
2646 | 0ad49876 | Stavros Sachtouris | ============== ========================= ======== ========== |
2647 | 68386e00 | Stavros Sachtouris | Request Header Value Cyclades OS/Compute |
2648 | 0ad49876 | Stavros Sachtouris | ============== ========================= ======== ========== |
2649 | 0ad49876 | Stavros Sachtouris | X-Auth-Token User authentication token required required |
2650 | 634ef3a8 | Stavros Sachtouris | Content-Type Type or request body required required |
2651 | 634ef3a8 | Stavros Sachtouris | Content-Length Length of request body required required |
2652 | 0ad49876 | Stavros Sachtouris | ============== ========================= ======== ========== |
2653 | 0ad49876 | Stavros Sachtouris | |
2654 | 634ef3a8 | Stavros Sachtouris | **Example Request Headers**:: |
2655 | 634ef3a8 | Stavros Sachtouris | |
2656 | 634ef3a8 | Stavros Sachtouris | X-Auth-Token: z31uRXUn1LZy45p1r7V== |
2657 | 634ef3a8 | Stavros Sachtouris | Content-Type: application/json |
2658 | 634ef3a8 | Stavros Sachtouris | Content-Length: 27 |
2659 | 634ef3a8 | Stavros Sachtouris | |
2660 | 0ad49876 | Stavros Sachtouris | | |
2661 | 0ad49876 | Stavros Sachtouris | |
2662 | 03c9cb80 | Stavros Sachtouris | .. note:: Request parameters should be empty |
2663 | 0ad49876 | Stavros Sachtouris | |
2664 | 03c9cb80 | Stavros Sachtouris | Request body content:: |
2665 | 0ad49876 | Stavros Sachtouris | |
2666 | 45e274fc | Stavros Sachtouris | metadata: {<key>: <value>} |
2667 | 03c9cb80 | Stavros Sachtouris | |
2668 | a3d2b515 | Stavros Sachtouris | *Example Update Image Metadata Item Request: JSON* |
2669 | 03c9cb80 | Stavros Sachtouris | |
2670 | 03c9cb80 | Stavros Sachtouris | .. code-block:: javascript |
2671 | 03c9cb80 | Stavros Sachtouris | |
2672 | 45e274fc | Stavros Sachtouris | {"metadata": {"os": "Kubuntu"}} |
2673 | 03c9cb80 | Stavros Sachtouris | |
2674 | 03c9cb80 | Stavros Sachtouris | .. rubric:: Response |
2675 | 0ad49876 | Stavros Sachtouris | |
2676 | 0ad49876 | Stavros Sachtouris | =========================== ===================== |
2677 | 0ad49876 | Stavros Sachtouris | Return Code Description |
2678 | 0ad49876 | Stavros Sachtouris | =========================== ===================== |
2679 | 0ad49876 | Stavros Sachtouris | 201 (OK) Request succeeded |
2680 | 0ad49876 | Stavros Sachtouris | 400 (Bad Request) Malformed request or image id |
2681 | 0ad49876 | Stavros Sachtouris | 401 (Unauthorized) Missing or expired user token |
2682 | 0ad49876 | Stavros Sachtouris | 403 (Forbidden) Not allowed to modify this image |
2683 | a3d2b515 | Stavros Sachtouris | 404 (Not Found) Metadata key not found |
2684 | 0ad49876 | Stavros Sachtouris | 413 (OverLimit) Maximum number of metadata exceeded |
2685 | 0ad49876 | Stavros Sachtouris | 500 (Internal Server Error) The request cannot be completed because of an |
2686 | e7f266c3 | Stavros Sachtouris | \ internal error |
2687 | 0ad49876 | Stavros Sachtouris | 503 (Service Unavailable) The server is not currently available |
2688 | 0ad49876 | Stavros Sachtouris | =========================== ===================== |
2689 | 0ad49876 | Stavros Sachtouris | |
2690 | 03c9cb80 | Stavros Sachtouris | Request body content:: |
2691 | 0ad49876 | Stavros Sachtouris | |
2692 | 45e274fc | Stavros Sachtouris | metadata: {<key>: <value>} |
2693 | 0ad49876 | Stavros Sachtouris | |
2694 | a3d2b515 | Stavros Sachtouris | *Example Update Image Metadata Item Response: JSON* |
2695 | 03c9cb80 | Stavros Sachtouris | |
2696 | 03c9cb80 | Stavros Sachtouris | .. code-block:: javascript |
2697 | 03c9cb80 | Stavros Sachtouris | |
2698 | 45e274fc | Stavros Sachtouris | {"metadata": {"os": "Kubuntu"}} |
2699 | 03c9cb80 | Stavros Sachtouris | |
2700 | a3d2b515 | Stavros Sachtouris | Delete Image Metadata |
2701 | a3d2b515 | Stavros Sachtouris | --------------------- |
2702 | 03c9cb80 | Stavros Sachtouris | |
2703 | a3d2b515 | Stavros Sachtouris | Delete an image metadata by its key. |
2704 | 0ad49876 | Stavros Sachtouris | |
2705 | 03c9cb80 | Stavros Sachtouris | .. rubric:: Request |
2706 | 03c9cb80 | Stavros Sachtouris | |
2707 | 0ad49876 | Stavros Sachtouris | ===================================== ====== ======== ========== |
2708 | 68386e00 | Stavros Sachtouris | URI Method Cyclades OS/Compute |
2709 | 0ad49876 | Stavros Sachtouris | ===================================== ====== ======== ========== |
2710 | 45e274fc | Stavros Sachtouris | ``/images/<image-id>/metadata/<key>`` DELETE ✔ ✔ |
2711 | 0ad49876 | Stavros Sachtouris | ===================================== ====== ======== ========== |
2712 | 0ad49876 | Stavros Sachtouris | |
2713 | 0ad49876 | Stavros Sachtouris | * **image-id** is the identifier of the image |
2714 | 45e274fc | Stavros Sachtouris | |
2715 | a3d2b515 | Stavros Sachtouris | * **key** is the key of a mata ``key``:``value`` pair |
2716 | 0ad49876 | Stavros Sachtouris | |
2717 | 0ad49876 | Stavros Sachtouris | | |
2718 | b38e8fa5 | Stavros Sachtouris | ============== ========================= ======== ========== |
2719 | 68386e00 | Stavros Sachtouris | Request Header Value Cyclades OS/Compute |
2720 | b38e8fa5 | Stavros Sachtouris | ============== ========================= ======== ========== |
2721 | b38e8fa5 | Stavros Sachtouris | X-Auth-Token User authentication token required required |
2722 | b38e8fa5 | Stavros Sachtouris | ============== ========================= ======== ========== |
2723 | c347ba83 | Stavros Sachtouris | |
2724 | 03c9cb80 | Stavros Sachtouris | .. note:: Request parameters should be empty |
2725 | 03c9cb80 | Stavros Sachtouris | |
2726 | 03c9cb80 | Stavros Sachtouris | .. note:: Request body should be empty |
2727 | 03c9cb80 | Stavros Sachtouris | |
2728 | 03c9cb80 | Stavros Sachtouris | .. rubric:: Response |
2729 | e74edfbb | Stavros Sachtouris | |
2730 | 0ad49876 | Stavros Sachtouris | =========================== ===================== |
2731 | 0ad49876 | Stavros Sachtouris | Return Code Description |
2732 | 0ad49876 | Stavros Sachtouris | =========================== ===================== |
2733 | 0ad49876 | Stavros Sachtouris | 204 (OK) Request succeeded |
2734 | 0ad49876 | Stavros Sachtouris | 400 (Bad Request) Malformed image ID |
2735 | 0ad49876 | Stavros Sachtouris | 401 (Unauthorized) Missing or expired user token |
2736 | 0ad49876 | Stavros Sachtouris | 403 (Forbidden) Not allowed to modify this image |
2737 | a3d2b515 | Stavros Sachtouris | 404 (Not Found) Metadata key not found |
2738 | 0ad49876 | Stavros Sachtouris | 500 (Internal Server Error) The request cannot be completed because of an |
2739 | e7f266c3 | Stavros Sachtouris | \ internal error |
2740 | 0ad49876 | Stavros Sachtouris | 503 (Service Unavailable) The server is not currently available |
2741 | 0ad49876 | Stavros Sachtouris | =========================== ===================== |
2742 | 2cd1c00a | Giorgos Verigakis | |
2743 | 03c9cb80 | Stavros Sachtouris | .. note:: In case of a 204 code, the response body should be empty. |
2744 | 2cd1c00a | Giorgos Verigakis | |
2745 | a3d2b515 | Stavros Sachtouris | Index of Attributes |
2746 | a3d2b515 | Stavros Sachtouris | ------------------- |
2747 | 2cd1c00a | Giorgos Verigakis | |
2748 | a3d2b515 | Stavros Sachtouris | .. _server-ref: |
2749 | 2cd1c00a | Giorgos Verigakis | |
2750 | a3d2b515 | Stavros Sachtouris | Server Attributes |
2751 | a3d2b515 | Stavros Sachtouris | ................. |
2752 | 7b5eb6ff | Stavros Sachtouris | |
2753 | a3d2b515 | Stavros Sachtouris | =================== ======== ========== |
2754 | a3d2b515 | Stavros Sachtouris | Server attribute Cyclades OS/Compute |
2755 | a3d2b515 | Stavros Sachtouris | =================== ======== ========== |
2756 | a3d2b515 | Stavros Sachtouris | id ✔ ✔ |
2757 | a3d2b515 | Stavros Sachtouris | name ✔ ✔ |
2758 | a3d2b515 | Stavros Sachtouris | addresses ✔ ✔ |
2759 | a3d2b515 | Stavros Sachtouris | links ✔ ✔ |
2760 | a3d2b515 | Stavros Sachtouris | image ✔ ✔ |
2761 | a3d2b515 | Stavros Sachtouris | flavor ✔ ✔ |
2762 | a3d2b515 | Stavros Sachtouris | user_id ✔ ✔ |
2763 | a3d2b515 | Stavros Sachtouris | tenant_id ✔ ✔ |
2764 | a3d2b515 | Stavros Sachtouris | accessIPv4 ✔ ✔ |
2765 | a3d2b515 | Stavros Sachtouris | accessIPv6 ✔ ✔ |
2766 | a3d2b515 | Stavros Sachtouris | progress ✔ ✔ |
2767 | a3d2b515 | Stavros Sachtouris | status ✔ ✔ |
2768 | a3d2b515 | Stavros Sachtouris | updated ✔ ✔ |
2769 | a3d2b515 | Stavros Sachtouris | hostId ✔ ✔ |
2770 | a3d2b515 | Stavros Sachtouris | created ✔ ✔ |
2771 | a3d2b515 | Stavros Sachtouris | adminPass ✔ ✔ |
2772 | a3d2b515 | Stavros Sachtouris | metadata ✔ ✔ |
2773 | a3d2b515 | Stavros Sachtouris | suspended ✔ **✘** |
2774 | a3d2b515 | Stavros Sachtouris | security_groups ✔ **✘** |
2775 | a3d2b515 | Stavros Sachtouris | attachments ✔ **✘** |
2776 | a3d2b515 | Stavros Sachtouris | config_drive ✔ **✘** |
2777 | a3d2b515 | Stavros Sachtouris | SNF:fqdn ✔ **✘** |
2778 | a3d2b515 | Stavros Sachtouris | key_name ✔ **✘** |
2779 | a3d2b515 | Stavros Sachtouris | SNF:port_forwarding ✔ **✘** |
2780 | a3d2b515 | Stavros Sachtouris | SNF:task_state ✔ **✘** |
2781 | a3d2b515 | Stavros Sachtouris | diagnostics ✔ **✘** |
2782 | a3d2b515 | Stavros Sachtouris | deleted ✔ **✘** |
2783 | a3d2b515 | Stavros Sachtouris | =================== ======== ========== |
2784 | a3d2b515 | Stavros Sachtouris | |
2785 | a3d2b515 | Stavros Sachtouris | * **addresses** Networks related to this server. All information in this field |
2786 | a3d2b515 | Stavros Sachtouris | is redundant, since it can be infered from the ``attachments`` field, but |
2787 | a3d2b515 | Stavros Sachtouris | it is used for compatibility with OS/Computet |
2788 | a3d2b515 | Stavros Sachtouris | |
2789 | a3d2b515 | Stavros Sachtouris | * **user_id** The UUID of the owner of the virtual server |
2790 | a3d2b515 | Stavros Sachtouris | |
2791 | c4dccd8a | Stavros Sachtouris | * **tenant_id** The UUID of the project that defines this resource |
2792 | a3d2b515 | Stavros Sachtouris | |
2793 | a3d2b515 | Stavros Sachtouris | * *hostId*, **accessIPv4** and **accessIPv6** are always empty and are used for |
2794 | a3d2b515 | Stavros Sachtouris | compatibility with OS/Compute |
2795 | a3d2b515 | Stavros Sachtouris | |
2796 | a3d2b515 | Stavros Sachtouris | * **progress** Shows the building progress of a virtual server. After the server |
2797 | a3d2b515 | Stavros Sachtouris | is built, it is always ``100`` |
2798 | 2cd1c00a | Giorgos Verigakis | |
2799 | a3d2b515 | Stavros Sachtouris | * **status** values are described `here <#status-ref>`_ |
2800 | 2cd1c00a | Giorgos Verigakis | |
2801 | a3d2b515 | Stavros Sachtouris | * **updated** and **created** are date-formated |
2802 | 2cd1c00a | Giorgos Verigakis | |
2803 | a3d2b515 | Stavros Sachtouris | * **adminPass** is shown only once (in ``create server`` response). This |
2804 | a3d2b515 | Stavros Sachtouris | information is not preserved in a clear text form, so it is not recoverable |
2805 | 7b5eb6ff | Stavros Sachtouris | |
2806 | a3d2b515 | Stavros Sachtouris | * **suspended** is True only if the server is suspended by the cloud |
2807 | a3d2b515 | Stavros Sachtouris | administrations or policy |
2808 | 7b5eb6ff | Stavros Sachtouris | |
2809 | a3d2b515 | Stavros Sachtouris | * **progress** is a number between 0 and 100 and reflects the server building |
2810 | a3d2b515 | Stavros Sachtouris | status |
2811 | 2cd1c00a | Giorgos Verigakis | |
2812 | a3d2b515 | Stavros Sachtouris | * **metadata** are custom key:value pairs. In Cyclades, the ``OS`` and |
2813 | a3d2b515 | Stavros Sachtouris | ``USERS`` metadata are automatically retrieved from the servers image during |
2814 | a3d2b515 | Stavros Sachtouris | creation |
2815 | 2cd1c00a | Giorgos Verigakis | |
2816 | a3d2b515 | Stavros Sachtouris | * **attachments** List of connection ports. Details `here <#attachments-ref>`_. |
2817 | 0e214bbe | Stavros Sachtouris | |
2818 | 0e214bbe | Stavros Sachtouris | .. _status-ref: |
2819 | 0e214bbe | Stavros Sachtouris | |
2820 | 0e214bbe | Stavros Sachtouris | Server Status |
2821 | 0e214bbe | Stavros Sachtouris | ............. |
2822 | 0e214bbe | Stavros Sachtouris | |
2823 | 0e214bbe | Stavros Sachtouris | ============= ==================== ======== ========== |
2824 | 68386e00 | Stavros Sachtouris | Status Description Cyclades OS/Compute |
2825 | 0e214bbe | Stavros Sachtouris | ============= ==================== ======== ========== |
2826 | 0e214bbe | Stavros Sachtouris | BUILD Building ✔ ✔ |
2827 | 0e214bbe | Stavros Sachtouris | ACTIVE Up and running ✔ ✔ |
2828 | 0e214bbe | Stavros Sachtouris | STOPPED Shut down ✔ **✘** |
2829 | 0e214bbe | Stavros Sachtouris | REBOOT Rebooting ✔ ✔ |
2830 | 0e214bbe | Stavros Sachtouris | DELETED Removed ✔ ✔ |
2831 | 0e214bbe | Stavros Sachtouris | UNKNOWN Unexpected error ✔ ✔ |
2832 | 0e214bbe | Stavros Sachtouris | ERROR In error ✔ ✔ |
2833 | 0e214bbe | Stavros Sachtouris | HARD_REBOOT Hard rebooting **✘** ✔ |
2834 | 0e214bbe | Stavros Sachtouris | PASSWORD Resetting password **✘** ✔ |
2835 | 0e214bbe | Stavros Sachtouris | REBUILD Rebuilding server **✘** ✔ |
2836 | 0e214bbe | Stavros Sachtouris | RESCUE In rescue mode **✘** ✔ |
2837 | 0e214bbe | Stavros Sachtouris | RESIZE Resizing **✘** ✔ |
2838 | 0e214bbe | Stavros Sachtouris | REVERT_RESIZE Failed to resize **✘** ✔ |
2839 | 0e214bbe | Stavros Sachtouris | SHUTOFF Shut down by user **✘** ✔ |
2840 | 0e214bbe | Stavros Sachtouris | SUSPENDED Suspended **✘** ✔ |
2841 | 0e214bbe | Stavros Sachtouris | VERIFY_RESIZE Waiting confirmation **✘** ✔ |
2842 | 4935e468 | Stavros Sachtouris | ============= ==================== ======== ========== |
2843 | 4935e468 | Stavros Sachtouris | |
2844 | a3d2b515 | Stavros Sachtouris | .. _attachments-ref: |
2845 | 0ad49876 | Stavros Sachtouris | |
2846 | a3d2b515 | Stavros Sachtouris | Attachments (ports) |
2847 | a3d2b515 | Stavros Sachtouris | ................... |
2848 | 4935e468 | Stavros Sachtouris | |
2849 | a3d2b515 | Stavros Sachtouris | In Cyclades, a port connects a virtual server to a public or private network. |
2850 | 4935e468 | Stavros Sachtouris | |
2851 | a3d2b515 | Stavros Sachtouris | Ports can be handled separately through the Cyclades/Network API. |
2852 | 4935e468 | Stavros Sachtouris | |
2853 | a3d2b515 | Stavros Sachtouris | In a virtual server context, a port may contain the following information: |
2854 | 4935e468 | Stavros Sachtouris | |
2855 | a3d2b515 | Stavros Sachtouris | ================= ====================== |
2856 | a3d2b515 | Stavros Sachtouris | Port Attributes Description |
2857 | a3d2b515 | Stavros Sachtouris | ================= ====================== |
2858 | a3d2b515 | Stavros Sachtouris | id Port id |
2859 | a3d2b515 | Stavros Sachtouris | mac_address NIC's mac address |
2860 | a3d2b515 | Stavros Sachtouris | network_id Network ID |
2861 | a3d2b515 | Stavros Sachtouris | OS-EXT-IPS:type ``fixed`` or ``floating`` |
2862 | a3d2b515 | Stavros Sachtouris | firewallProfile ``ENABLED``, ``DISABLED``, ``PROTECTED`` |
2863 | a3d2b515 | Stavros Sachtouris | ipv4 IP v4 address |
2864 | a3d2b515 | Stavros Sachtouris | ipv6 IP v6 address |
2865 | a3d2b515 | Stavros Sachtouris | ================= ====================== |
2866 | 4935e468 | Stavros Sachtouris | |
2867 | a3d2b515 | Stavros Sachtouris | * **ipv4** and **ipv6** are mutually exclusive in practice, since a port |
2868 | a3d2b515 | Stavros Sachtouris | either handles an IPv4, an IPv6, or none, but not both. |
2869 | de2e08f6 | Stavros Sachtouris | |
2870 | de2e08f6 | Stavros Sachtouris | .. _flavor-ref: |
2871 | de2e08f6 | Stavros Sachtouris | |
2872 | de2e08f6 | Stavros Sachtouris | Flavor |
2873 | de2e08f6 | Stavros Sachtouris | ...... |
2874 | de2e08f6 | Stavros Sachtouris | |
2875 | de2e08f6 | Stavros Sachtouris | A flavor is a hardware configuration for a server. It contains the following |
2876 | de2e08f6 | Stavros Sachtouris | information: |
2877 | de2e08f6 | Stavros Sachtouris | |
2878 | de2e08f6 | Stavros Sachtouris | ================= ==================== ======== ========== |
2879 | 68386e00 | Stavros Sachtouris | Flavor Attributes Description Cyclades OS/Compute |
2880 | de2e08f6 | Stavros Sachtouris | ================= ==================== ======== ========== |
2881 | de2e08f6 | Stavros Sachtouris | id The flavor id ✔ ✔ |
2882 | de2e08f6 | Stavros Sachtouris | name The flavor name ✔ ✔ |
2883 | de2e08f6 | Stavros Sachtouris | ram Server RAM size ✔ ✔ |
2884 | de2e08f6 | Stavros Sachtouris | SNF:disk_template Storage mechanism ✔ **✘** |
2885 | de2e08f6 | Stavros Sachtouris | disk Server disk size ✔ ✔ |
2886 | 45e274fc | Stavros Sachtouris | vcpus # of Virtual CPUs ✔ ✔ |
2887 | de2e08f6 | Stavros Sachtouris | links rel Atom link rel field **✘** ✔ |
2888 | de2e08f6 | Stavros Sachtouris | links href Atom link href field **✘** ✔ |
2889 | de2e08f6 | Stavros Sachtouris | ================= ==================== ======== ========== |
2890 | de2e08f6 | Stavros Sachtouris | |
2891 | de2e08f6 | Stavros Sachtouris | * **id** is the flavor unique id (a possitive integer) |
2892 | de2e08f6 | Stavros Sachtouris | |
2893 | de2e08f6 | Stavros Sachtouris | * **name** is the flavor name (a string) |
2894 | de2e08f6 | Stavros Sachtouris | |
2895 | de2e08f6 | Stavros Sachtouris | * **ram** is the server RAM size in MB |
2896 | de2e08f6 | Stavros Sachtouris | |
2897 | 7b5eb6ff | Stavros Sachtouris | * **SNF:disk_template** is a reference to the underlying storage mechanism |
2898 | 7b5eb6ff | Stavros Sachtouris | used by the Cyclades server. It is Cyclades specific. |
2899 | de2e08f6 | Stavros Sachtouris | |
2900 | de2e08f6 | Stavros Sachtouris | * **disk** the servers disk size in GB |
2901 | de2e08f6 | Stavros Sachtouris | |
2902 | 45e274fc | Stavros Sachtouris | * **vcpus** refer to the number of virtual CPUs assigned to a server |
2903 | de2e08f6 | Stavros Sachtouris | |
2904 | de2e08f6 | Stavros Sachtouris | * **link ref** and **link href** refer to the Atom link attributes that are |
2905 | 7b5eb6ff | Stavros Sachtouris | `used in OS/Compute API <http://docs.openstack.org/api/openstack-compute/2/content/List_Flavors-d1e4188.html>`_. |
2906 | f76ec11f | Stavros Sachtouris | |
2907 | f76ec11f | Stavros Sachtouris | .. _image-ref: |
2908 | f76ec11f | Stavros Sachtouris | |
2909 | f76ec11f | Stavros Sachtouris | Image |
2910 | f76ec11f | Stavros Sachtouris | ..... |
2911 | f76ec11f | Stavros Sachtouris | |
2912 | f76ec11f | Stavros Sachtouris | An image is a collection of files you use to create or rebuild a server. |
2913 | f76ec11f | Stavros Sachtouris | |
2914 | f76ec11f | Stavros Sachtouris | An image item may have the fields presented bellow: |
2915 | f76ec11f | Stavros Sachtouris | |
2916 | a3d2b515 | Stavros Sachtouris | ================ ====================== ======== ========== |
2917 | a3d2b515 | Stavros Sachtouris | Image Attributes Description Cyclades OS/Compute |
2918 | a3d2b515 | Stavros Sachtouris | ================ ====================== ======== ========== |
2919 | a3d2b515 | Stavros Sachtouris | id Image ID ✔ ✔ |
2920 | a3d2b515 | Stavros Sachtouris | name Image name ✔ ✔ |
2921 | a3d2b515 | Stavros Sachtouris | updated Last update date ✔ ✔ |
2922 | a3d2b515 | Stavros Sachtouris | created Image creation date ✔ ✔ |
2923 | a3d2b515 | Stavros Sachtouris | progress Ready status progress ✔ **✘** |
2924 | a3d2b515 | Stavros Sachtouris | status Image status **✘** ✔ |
2925 | a3d2b515 | Stavros Sachtouris | tenant_id Image creator **✘** ✔ |
2926 | a3d2b515 | Stavros Sachtouris | user_id Image users **✘** ✔ |
2927 | a3d2b515 | Stavros Sachtouris | metadata Custom metadata ✔ ✔ |
2928 | a3d2b515 | Stavros Sachtouris | links Atom links **✘** ✔ |
2929 | a3d2b515 | Stavros Sachtouris | minDisk Minimum required disk **✘** ✔ |
2930 | a3d2b515 | Stavros Sachtouris | minRam Minimum required RAM **✘** ✔ |
2931 | a3d2b515 | Stavros Sachtouris | ================ ====================== ======== ========== |
2932 | f76ec11f | Stavros Sachtouris | |
2933 | f76ec11f | Stavros Sachtouris | * **id** is the image id and **name** is the image name. They are both strings. |
2934 | f76ec11f | Stavros Sachtouris | |
2935 | f76ec11f | Stavros Sachtouris | * **updated** and **created** are both ISO8601 date strings |
2936 | f76ec11f | Stavros Sachtouris | |
2937 | f76ec11f | Stavros Sachtouris | * **progress** varies between 0 and 100 and denotes the status of the image |
2938 | f76ec11f | Stavros Sachtouris | |
2939 | f76ec11f | Stavros Sachtouris | * **metadata** is a collection of ``key``:``values`` pairs of custom metadata, |
2940 | 7b5eb6ff | Stavros Sachtouris | under the tag ``values`` which lies under the tag ``metadata``. |
2941 | f76ec11f | Stavros Sachtouris | |
2942 | c4dccd8a | Stavros Sachtouris | * **tenant_id** The UUID of the project that defines this resource |
2943 | c4dccd8a | Stavros Sachtouris | |
2944 | 68386e00 | Stavros Sachtouris | .. note:: in OS/Compute, the ``values`` layer is missing |