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