Statistics
| Branch: | Tag: | Revision:

root / docs / cyclades-api-guide.rst @ 7faef88f

History | View | Annotate | Download (103.8 kB)

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