Statistics
| Branch: | Tag: | Revision:

root / docs / compute-api-guide.rst @ 99667854

History | View | Annotate | Download (116.2 kB)

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