Statistics
| Branch: | Tag: | Revision:

root / docs / cyclades-api-guide.rst @ 91a2a94e

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