Statistics
| Branch: | Tag: | Revision:

root / doc / rapi.rst @ d17e74b4

History | View | Annotate | Download (9 kB)

1 4352bf6d Iustin Pop
Ganeti remote API
2 4352bf6d Iustin Pop
=================
3 4352bf6d Iustin Pop
4 4352bf6d Iustin Pop
Documents Ganeti version 2.0
5 4352bf6d Iustin Pop
6 4352bf6d Iustin Pop
.. contents::
7 4352bf6d Iustin Pop
8 4352bf6d Iustin Pop
Introduction
9 4352bf6d Iustin Pop
------------
10 4352bf6d Iustin Pop
11 4352bf6d Iustin Pop
Ganeti supports a remote API for enable external tools to easily
12 4352bf6d Iustin Pop
retrieve information about a cluster's state. The remote API daemon,
13 4352bf6d Iustin Pop
*ganeti-rapi*, is automatically started on the master node. By default
14 4352bf6d Iustin Pop
it runs on TCP port 5080, but this can be changed either in
15 4352bf6d Iustin Pop
``.../constants.py`` or via the command line parameter *-p*. SSL mode,
16 4352bf6d Iustin Pop
which is used by default, can also be disabled by passing command line
17 4352bf6d Iustin Pop
parameters.
18 4352bf6d Iustin Pop
19 4352bf6d Iustin Pop
Protocol
20 4352bf6d Iustin Pop
--------
21 4352bf6d Iustin Pop
22 4352bf6d Iustin Pop
The protocol used is JSON_ over HTTP designed after the REST_
23 4352bf6d Iustin Pop
principle.
24 4352bf6d Iustin Pop
25 4352bf6d Iustin Pop
.. _JSON: http://www.json.org/
26 4352bf6d Iustin Pop
.. _REST: http://en.wikipedia.org/wiki/Representational_State_Transfer
27 4352bf6d Iustin Pop
28 4352bf6d Iustin Pop
Usage examples
29 4352bf6d Iustin Pop
--------------
30 4352bf6d Iustin Pop
31 4352bf6d Iustin Pop
You can access the API using your favorite programming language as
32 4352bf6d Iustin Pop
long as it supports network connections.
33 4352bf6d Iustin Pop
34 4352bf6d Iustin Pop
Shell
35 4352bf6d Iustin Pop
+++++
36 4352bf6d Iustin Pop
37 4352bf6d Iustin Pop
Using wget::
38 4352bf6d Iustin Pop
39 4352bf6d Iustin Pop
  wget -q -O - https://CLUSTERNAME:5080/2/info
40 4352bf6d Iustin Pop
41 4352bf6d Iustin Pop
or curl::
42 4352bf6d Iustin Pop
43 4352bf6d Iustin Pop
  curl https://CLUSTERNAME:5080/2/info
44 4352bf6d Iustin Pop
45 4352bf6d Iustin Pop
46 4352bf6d Iustin Pop
Python
47 4352bf6d Iustin Pop
++++++
48 4352bf6d Iustin Pop
49 4352bf6d Iustin Pop
::
50 4352bf6d Iustin Pop
51 4352bf6d Iustin Pop
  import urllib2
52 4352bf6d Iustin Pop
  f = urllib2.urlopen('https://CLUSTERNAME:5080/info')
53 4352bf6d Iustin Pop
  print f.read()
54 4352bf6d Iustin Pop
55 4352bf6d Iustin Pop
56 4352bf6d Iustin Pop
JavaScript
57 4352bf6d Iustin Pop
++++++++++
58 4352bf6d Iustin Pop
59 4352bf6d Iustin Pop
.. warning:: While it's possible to use JavaScript, it poses several potential
60 4352bf6d Iustin Pop
  problems, including browser blocking request due to
61 4352bf6d Iustin Pop
  non-standard ports or different domain names. Fetching the data
62 4352bf6d Iustin Pop
  on the webserver is easier.
63 4352bf6d Iustin Pop
64 4352bf6d Iustin Pop
::
65 4352bf6d Iustin Pop
66 4352bf6d Iustin Pop
  var url = 'https://CLUSTERNAME:5080/info';
67 4352bf6d Iustin Pop
  var info;
68 4352bf6d Iustin Pop
  var xmlreq = new XMLHttpRequest();
69 4352bf6d Iustin Pop
  xmlreq.onreadystatechange = function () {
70 4352bf6d Iustin Pop
    if (xmlreq.readyState != 4) return;
71 4352bf6d Iustin Pop
    if (xmlreq.status == 200) {
72 4352bf6d Iustin Pop
      info = eval("(" + xmlreq.responseText + ")");
73 4352bf6d Iustin Pop
      alert(info);
74 4352bf6d Iustin Pop
    } else {
75 4352bf6d Iustin Pop
      alert('Error fetching cluster info');
76 4352bf6d Iustin Pop
    }
77 4352bf6d Iustin Pop
    xmlreq = null;
78 4352bf6d Iustin Pop
  };
79 4352bf6d Iustin Pop
  xmlreq.open('GET', url, true);
80 4352bf6d Iustin Pop
  xmlreq.send(null);
81 4352bf6d Iustin Pop
82 4352bf6d Iustin Pop
Resources
83 4352bf6d Iustin Pop
---------
84 4352bf6d Iustin Pop
85 6d81475c Iustin Pop
/
86 6d81475c Iustin Pop
+
87 6d81475c Iustin Pop
88 6d81475c Iustin Pop
::
89 6d81475c Iustin Pop
90 6d81475c Iustin Pop
  / resource.
91 6d81475c Iustin Pop
92 6d81475c Iustin Pop
It supports the following commands: GET.
93 6d81475c Iustin Pop
94 6d81475c Iustin Pop
GET
95 6d81475c Iustin Pop
~~~
96 6d81475c Iustin Pop
97 6d81475c Iustin Pop
::
98 6d81475c Iustin Pop
99 6d81475c Iustin Pop
  Show the list of mapped resources.
100 6d81475c Iustin Pop
101 6d81475c Iustin Pop
  Returns: a dictionary with 'name' and 'uri' keys for each of them.
102 6d81475c Iustin Pop
103 6d81475c Iustin Pop
/2
104 6d81475c Iustin Pop
++
105 6d81475c Iustin Pop
106 6d81475c Iustin Pop
::
107 6d81475c Iustin Pop
108 6d81475c Iustin Pop
  /2 resource, the root of the version 2 API.
109 6d81475c Iustin Pop
110 6d81475c Iustin Pop
It supports the following commands: GET.
111 6d81475c Iustin Pop
112 6d81475c Iustin Pop
GET
113 6d81475c Iustin Pop
~~~
114 6d81475c Iustin Pop
115 6d81475c Iustin Pop
::
116 6d81475c Iustin Pop
117 6d81475c Iustin Pop
  Show the list of mapped resources.
118 6d81475c Iustin Pop
119 6d81475c Iustin Pop
  Returns: a dictionary with 'name' and 'uri' keys for each of them.
120 6d81475c Iustin Pop
121 6d81475c Iustin Pop
/2/info
122 6d81475c Iustin Pop
+++++++
123 6d81475c Iustin Pop
124 6d81475c Iustin Pop
::
125 6d81475c Iustin Pop
126 6d81475c Iustin Pop
  Cluster info.
127 6d81475c Iustin Pop
128 6d81475c Iustin Pop
It supports the following commands: GET.
129 6d81475c Iustin Pop
130 6d81475c Iustin Pop
GET
131 6d81475c Iustin Pop
~~~
132 6d81475c Iustin Pop
133 6d81475c Iustin Pop
::
134 6d81475c Iustin Pop
135 6d81475c Iustin Pop
  Returns cluster information.
136 6d81475c Iustin Pop
137 6d81475c Iustin Pop
  Example::
138 6d81475c Iustin Pop
139 6d81475c Iustin Pop
  {
140 6d81475c Iustin Pop
    "config_version": 2000000,
141 6d81475c Iustin Pop
    "name": "cluster",
142 6d81475c Iustin Pop
    "software_version": "2.0.0~beta2",
143 6d81475c Iustin Pop
    "os_api_version": 10,
144 6d81475c Iustin Pop
    "export_version": 0,
145 6d81475c Iustin Pop
    "candidate_pool_size": 10,
146 6d81475c Iustin Pop
    "enabled_hypervisors": [
147 6d81475c Iustin Pop
      "fake"
148 6d81475c Iustin Pop
    ],
149 6d81475c Iustin Pop
    "hvparams": {
150 6d81475c Iustin Pop
      "fake": {}
151 6d81475c Iustin Pop
     },
152 6d81475c Iustin Pop
    "default_hypervisor": "fake",
153 6d81475c Iustin Pop
    "master": "node1.example.com",
154 6d81475c Iustin Pop
    "architecture": [
155 6d81475c Iustin Pop
      "64bit",
156 6d81475c Iustin Pop
      "x86_64"
157 6d81475c Iustin Pop
    ],
158 6d81475c Iustin Pop
    "protocol_version": 20,
159 6d81475c Iustin Pop
    "beparams": {
160 6d81475c Iustin Pop
      "default": {
161 6d81475c Iustin Pop
        "auto_balance": true,
162 6d81475c Iustin Pop
        "vcpus": 1,
163 6d81475c Iustin Pop
        "memory": 128
164 6d81475c Iustin Pop
       }
165 6d81475c Iustin Pop
      }
166 6d81475c Iustin Pop
    }
167 6d81475c Iustin Pop
168 6d81475c Iustin Pop
/2/instances
169 6d81475c Iustin Pop
++++++++++++
170 6d81475c Iustin Pop
171 6d81475c Iustin Pop
::
172 6d81475c Iustin Pop
173 6d81475c Iustin Pop
  /2/instances resource.
174 6d81475c Iustin Pop
175 6d81475c Iustin Pop
It supports the following commands: GET, POST.
176 6d81475c Iustin Pop
177 6d81475c Iustin Pop
GET
178 6d81475c Iustin Pop
~~~
179 6d81475c Iustin Pop
180 6d81475c Iustin Pop
::
181 6d81475c Iustin Pop
182 6d81475c Iustin Pop
  Returns a list of all available instances.
183 6d81475c Iustin Pop
184 6d81475c Iustin Pop
185 6d81475c Iustin Pop
  Example::
186 6d81475c Iustin Pop
187 6d81475c Iustin Pop
    [
188 6d81475c Iustin Pop
      {
189 6d81475c Iustin Pop
        "name": "web.example.com",
190 6d81475c Iustin Pop
        "uri": "\/instances\/web.example.com"
191 6d81475c Iustin Pop
      },
192 6d81475c Iustin Pop
      {
193 6d81475c Iustin Pop
        "name": "mail.example.com",
194 6d81475c Iustin Pop
        "uri": "\/instances\/mail.example.com"
195 6d81475c Iustin Pop
      }
196 6d81475c Iustin Pop
    ]
197 6d81475c Iustin Pop
198 6d81475c Iustin Pop
  If the optional 'bulk' argument is provided and set to 'true'
199 6d81475c Iustin Pop
  value (i.e '?bulk=1'), the output contains detailed
200 6d81475c Iustin Pop
  information about instances as a list.
201 6d81475c Iustin Pop
202 6d81475c Iustin Pop
  Example::
203 6d81475c Iustin Pop
204 6d81475c Iustin Pop
    [
205 6d81475c Iustin Pop
      {
206 6d81475c Iustin Pop
         "status": "running",
207 6d81475c Iustin Pop
         "disk_usage": 20480,
208 6d81475c Iustin Pop
         "nic.bridges": [
209 6d81475c Iustin Pop
           "xen-br0"
210 6d81475c Iustin Pop
          ],
211 6d81475c Iustin Pop
         "name": "web.example.com",
212 6d81475c Iustin Pop
         "tags": ["tag1", "tag2"],
213 6d81475c Iustin Pop
         "beparams": {
214 6d81475c Iustin Pop
           "vcpus": 2,
215 6d81475c Iustin Pop
           "memory": 512
216 6d81475c Iustin Pop
         },
217 6d81475c Iustin Pop
         "disk.sizes": [
218 6d81475c Iustin Pop
             20480
219 6d81475c Iustin Pop
         ],
220 6d81475c Iustin Pop
         "pnode": "node1.example.com",
221 6d81475c Iustin Pop
         "nic.macs": ["01:23:45:67:89:01"],
222 6d81475c Iustin Pop
         "snodes": ["node2.example.com"],
223 6d81475c Iustin Pop
         "disk_template": "drbd",
224 6d81475c Iustin Pop
         "admin_state": true,
225 6d81475c Iustin Pop
         "os": "debian-etch",
226 6d81475c Iustin Pop
         "oper_state": true
227 6d81475c Iustin Pop
      },
228 6d81475c Iustin Pop
      ...
229 6d81475c Iustin Pop
    ]
230 6d81475c Iustin Pop
231 6d81475c Iustin Pop
  Returns: a dictionary with 'name' and 'uri' keys for each of them.
232 6d81475c Iustin Pop
233 6d81475c Iustin Pop
POST
234 6d81475c Iustin Pop
~~~~
235 6d81475c Iustin Pop
236 6d81475c Iustin Pop
::
237 6d81475c Iustin Pop
238 6d81475c Iustin Pop
  Create an instance.
239 6d81475c Iustin Pop
240 6d81475c Iustin Pop
  Returns: a job id
241 6d81475c Iustin Pop
242 6d81475c Iustin Pop
/2/instances/[instance_name]
243 6d81475c Iustin Pop
++++++++++++++++++++++++++++
244 6d81475c Iustin Pop
245 6d81475c Iustin Pop
::
246 6d81475c Iustin Pop
247 6d81475c Iustin Pop
  /2/instances/[instance_name] resources.
248 6d81475c Iustin Pop
249 6d81475c Iustin Pop
It supports the following commands: GET, DELETE.
250 6d81475c Iustin Pop
251 6d81475c Iustin Pop
GET
252 6d81475c Iustin Pop
~~~
253 6d81475c Iustin Pop
254 6d81475c Iustin Pop
::
255 6d81475c Iustin Pop
256 6d81475c Iustin Pop
  Send information about an instance.
257 6d81475c Iustin Pop
258 6d81475c Iustin Pop
259 6d81475c Iustin Pop
260 6d81475c Iustin Pop
DELETE
261 6d81475c Iustin Pop
~~~~~~
262 6d81475c Iustin Pop
263 6d81475c Iustin Pop
::
264 6d81475c Iustin Pop
265 6d81475c Iustin Pop
  Delete an instance.
266 6d81475c Iustin Pop
267 6d81475c Iustin Pop
268 6d81475c Iustin Pop
269 6d81475c Iustin Pop
/2/instances/[instance_name]/reboot
270 6d81475c Iustin Pop
+++++++++++++++++++++++++++++++++++
271 6d81475c Iustin Pop
272 6d81475c Iustin Pop
::
273 6d81475c Iustin Pop
274 6d81475c Iustin Pop
  /2/instances/[instance_name]/reboot resource.
275 6d81475c Iustin Pop
276 6d81475c Iustin Pop
  Implements an instance reboot.
277 6d81475c Iustin Pop
278 6d81475c Iustin Pop
It supports the following commands: POST.
279 6d81475c Iustin Pop
280 6d81475c Iustin Pop
POST
281 6d81475c Iustin Pop
~~~~
282 6d81475c Iustin Pop
283 6d81475c Iustin Pop
::
284 6d81475c Iustin Pop
285 6d81475c Iustin Pop
  Reboot an instance.
286 6d81475c Iustin Pop
287 6d81475c Iustin Pop
  The URI takes type=[hard|soft|full] and
288 6d81475c Iustin Pop
  ignore_secondaries=[False|True] parameters.
289 6d81475c Iustin Pop
290 6d81475c Iustin Pop
/2/instances/[instance_name]/shutdown
291 6d81475c Iustin Pop
+++++++++++++++++++++++++++++++++++++
292 6d81475c Iustin Pop
293 6d81475c Iustin Pop
::
294 6d81475c Iustin Pop
295 6d81475c Iustin Pop
  /2/instances/[instance_name]/shutdown resource.
296 6d81475c Iustin Pop
297 6d81475c Iustin Pop
  Implements an instance shutdown.
298 6d81475c Iustin Pop
299 6d81475c Iustin Pop
It supports the following commands: PUT.
300 6d81475c Iustin Pop
301 6d81475c Iustin Pop
PUT
302 6d81475c Iustin Pop
~~~
303 6d81475c Iustin Pop
304 6d81475c Iustin Pop
::
305 6d81475c Iustin Pop
306 6d81475c Iustin Pop
  Shutdown an instance.
307 6d81475c Iustin Pop
308 6d81475c Iustin Pop
309 6d81475c Iustin Pop
310 6d81475c Iustin Pop
/2/instances/[instance_name]/startup
311 6d81475c Iustin Pop
++++++++++++++++++++++++++++++++++++
312 6d81475c Iustin Pop
313 6d81475c Iustin Pop
::
314 6d81475c Iustin Pop
315 6d81475c Iustin Pop
  /2/instances/[instance_name]/startup resource.
316 6d81475c Iustin Pop
317 6d81475c Iustin Pop
  Implements an instance startup.
318 6d81475c Iustin Pop
319 6d81475c Iustin Pop
It supports the following commands: PUT.
320 6d81475c Iustin Pop
321 6d81475c Iustin Pop
PUT
322 6d81475c Iustin Pop
~~~
323 6d81475c Iustin Pop
324 6d81475c Iustin Pop
::
325 6d81475c Iustin Pop
326 6d81475c Iustin Pop
  Startup an instance.
327 6d81475c Iustin Pop
328 6d81475c Iustin Pop
  The URI takes force=[False|True] parameter to start the instance
329 6d81475c Iustin Pop
  if even if secondary disks are failing.
330 6d81475c Iustin Pop
331 6d81475c Iustin Pop
/2/instances/[instance_name]/tags
332 6d81475c Iustin Pop
+++++++++++++++++++++++++++++++++
333 6d81475c Iustin Pop
334 6d81475c Iustin Pop
::
335 6d81475c Iustin Pop
336 6d81475c Iustin Pop
  /2/instances/[instance_name]/tags resource.
337 6d81475c Iustin Pop
338 6d81475c Iustin Pop
  Manages per-instance tags.
339 6d81475c Iustin Pop
340 6d81475c Iustin Pop
It supports the following commands: GET, PUT, DELETE.
341 6d81475c Iustin Pop
342 6d81475c Iustin Pop
GET
343 6d81475c Iustin Pop
~~~
344 6d81475c Iustin Pop
345 6d81475c Iustin Pop
::
346 6d81475c Iustin Pop
347 6d81475c Iustin Pop
  Returns a list of tags.
348 6d81475c Iustin Pop
349 6d81475c Iustin Pop
  Example: ["tag1", "tag2", "tag3"]
350 6d81475c Iustin Pop
351 6d81475c Iustin Pop
PUT
352 6d81475c Iustin Pop
~~~
353 6d81475c Iustin Pop
354 6d81475c Iustin Pop
::
355 6d81475c Iustin Pop
356 6d81475c Iustin Pop
  Add a set of tags.
357 6d81475c Iustin Pop
358 6d81475c Iustin Pop
  The request as a list of strings should be PUT to this URI. And
359 6d81475c Iustin Pop
  you'll have back a job id.
360 6d81475c Iustin Pop
361 6d81475c Iustin Pop
DELETE
362 6d81475c Iustin Pop
~~~~~~
363 6d81475c Iustin Pop
364 6d81475c Iustin Pop
::
365 6d81475c Iustin Pop
366 6d81475c Iustin Pop
  Delete a tag.
367 6d81475c Iustin Pop
368 6d81475c Iustin Pop
  In order to delete a set of tags, the DELETE
369 6d81475c Iustin Pop
  request should be addressed to URI like:
370 6d81475c Iustin Pop
  /tags?tag=[tag]&tag=[tag]
371 6d81475c Iustin Pop
372 6d81475c Iustin Pop
/2/jobs
373 6d81475c Iustin Pop
+++++++
374 6d81475c Iustin Pop
375 6d81475c Iustin Pop
::
376 6d81475c Iustin Pop
377 6d81475c Iustin Pop
  /2/jobs resource.
378 6d81475c Iustin Pop
379 6d81475c Iustin Pop
It supports the following commands: GET.
380 6d81475c Iustin Pop
381 6d81475c Iustin Pop
GET
382 6d81475c Iustin Pop
~~~
383 6d81475c Iustin Pop
384 6d81475c Iustin Pop
::
385 6d81475c Iustin Pop
386 6d81475c Iustin Pop
  Returns a dictionary of jobs.
387 6d81475c Iustin Pop
388 6d81475c Iustin Pop
  Returns: a dictionary with jobs id and uri.
389 6d81475c Iustin Pop
390 6d81475c Iustin Pop
/2/jobs/[job_id]
391 6d81475c Iustin Pop
++++++++++++++++
392 6d81475c Iustin Pop
393 6d81475c Iustin Pop
::
394 6d81475c Iustin Pop
395 6d81475c Iustin Pop
  /2/jobs/[job_id] resource.
396 6d81475c Iustin Pop
397 6d81475c Iustin Pop
It supports the following commands: GET, DELETE.
398 6d81475c Iustin Pop
399 6d81475c Iustin Pop
GET
400 6d81475c Iustin Pop
~~~
401 6d81475c Iustin Pop
402 6d81475c Iustin Pop
::
403 6d81475c Iustin Pop
404 6d81475c Iustin Pop
  Returns a job status.
405 6d81475c Iustin Pop
406 6d81475c Iustin Pop
  Returns: a dictionary with job parameters.
407 6d81475c Iustin Pop
      The result includes:
408 6d81475c Iustin Pop
          - id: job ID as a number
409 6d81475c Iustin Pop
          - status: current job status as a string
410 6d81475c Iustin Pop
          - ops: involved OpCodes as a list of dictionaries for each
411 6d81475c Iustin Pop
            opcodes in the job
412 6d81475c Iustin Pop
          - opstatus: OpCodes status as a list
413 6d81475c Iustin Pop
          - opresult: OpCodes results as a list of lists
414 6d81475c Iustin Pop
415 6d81475c Iustin Pop
DELETE
416 6d81475c Iustin Pop
~~~~~~
417 6d81475c Iustin Pop
418 6d81475c Iustin Pop
::
419 6d81475c Iustin Pop
420 6d81475c Iustin Pop
  Cancel not-yet-started job.
421 6d81475c Iustin Pop
422 6d81475c Iustin Pop
423 6d81475c Iustin Pop
424 6d81475c Iustin Pop
/2/nodes
425 6d81475c Iustin Pop
++++++++
426 6d81475c Iustin Pop
427 6d81475c Iustin Pop
::
428 6d81475c Iustin Pop
429 6d81475c Iustin Pop
  /2/nodes resource.
430 6d81475c Iustin Pop
431 6d81475c Iustin Pop
It supports the following commands: GET.
432 6d81475c Iustin Pop
433 6d81475c Iustin Pop
GET
434 6d81475c Iustin Pop
~~~
435 6d81475c Iustin Pop
436 6d81475c Iustin Pop
::
437 6d81475c Iustin Pop
438 6d81475c Iustin Pop
  Returns a list of all nodes.
439 6d81475c Iustin Pop
440 6d81475c Iustin Pop
  Example::
441 6d81475c Iustin Pop
442 6d81475c Iustin Pop
    [
443 6d81475c Iustin Pop
      {
444 6d81475c Iustin Pop
        "id": "node1.example.com",
445 6d81475c Iustin Pop
        "uri": "\/instances\/node1.example.com"
446 6d81475c Iustin Pop
      },
447 6d81475c Iustin Pop
      {
448 6d81475c Iustin Pop
        "id": "node2.example.com",
449 6d81475c Iustin Pop
        "uri": "\/instances\/node2.example.com"
450 6d81475c Iustin Pop
      }
451 6d81475c Iustin Pop
    ]
452 6d81475c Iustin Pop
453 6d81475c Iustin Pop
  If the optional 'bulk' argument is provided and set to 'true'
454 6d81475c Iustin Pop
  value (i.e '?bulk=1'), the output contains detailed
455 6d81475c Iustin Pop
  information about nodes as a list.
456 6d81475c Iustin Pop
457 6d81475c Iustin Pop
  Example::
458 6d81475c Iustin Pop
459 6d81475c Iustin Pop
    [
460 6d81475c Iustin Pop
      {
461 6d81475c Iustin Pop
        "pinst_cnt": 1,
462 6d81475c Iustin Pop
        "mfree": 31280,
463 6d81475c Iustin Pop
        "mtotal": 32763,
464 6d81475c Iustin Pop
        "name": "www.example.com",
465 6d81475c Iustin Pop
        "tags": [],
466 6d81475c Iustin Pop
        "mnode": 512,
467 6d81475c Iustin Pop
        "dtotal": 5246208,
468 6d81475c Iustin Pop
        "sinst_cnt": 2,
469 6d81475c Iustin Pop
        "dfree": 5171712,
470 6d81475c Iustin Pop
        "offline": false
471 6d81475c Iustin Pop
      },
472 6d81475c Iustin Pop
      ...
473 6d81475c Iustin Pop
    ]
474 6d81475c Iustin Pop
475 6d81475c Iustin Pop
  Returns: a dictionary with 'name' and 'uri' keys for each of them
476 6d81475c Iustin Pop
477 6d81475c Iustin Pop
/2/nodes/[node_name]/tags
478 6d81475c Iustin Pop
+++++++++++++++++++++++++
479 6d81475c Iustin Pop
480 6d81475c Iustin Pop
::
481 6d81475c Iustin Pop
482 6d81475c Iustin Pop
  /2/nodes/[node_name]/tags resource.
483 6d81475c Iustin Pop
484 6d81475c Iustin Pop
  Manages per-node tags.
485 6d81475c Iustin Pop
486 6d81475c Iustin Pop
It supports the following commands: GET, PUT, DELETE.
487 6d81475c Iustin Pop
488 6d81475c Iustin Pop
GET
489 6d81475c Iustin Pop
~~~
490 6d81475c Iustin Pop
491 6d81475c Iustin Pop
::
492 6d81475c Iustin Pop
493 6d81475c Iustin Pop
  Returns a list of tags.
494 6d81475c Iustin Pop
495 6d81475c Iustin Pop
  Example: ["tag1", "tag2", "tag3"]
496 6d81475c Iustin Pop
497 6d81475c Iustin Pop
PUT
498 6d81475c Iustin Pop
~~~
499 6d81475c Iustin Pop
500 6d81475c Iustin Pop
::
501 6d81475c Iustin Pop
502 6d81475c Iustin Pop
  Add a set of tags.
503 6d81475c Iustin Pop
504 6d81475c Iustin Pop
  The request as a list of strings should be PUT to this URI. And
505 6d81475c Iustin Pop
  you'll have back a job id.
506 6d81475c Iustin Pop
507 6d81475c Iustin Pop
DELETE
508 6d81475c Iustin Pop
~~~~~~
509 6d81475c Iustin Pop
510 6d81475c Iustin Pop
::
511 6d81475c Iustin Pop
512 6d81475c Iustin Pop
  Delete a tag.
513 6d81475c Iustin Pop
514 6d81475c Iustin Pop
  In order to delete a set of tags, the DELETE
515 6d81475c Iustin Pop
  request should be addressed to URI like:
516 6d81475c Iustin Pop
  /tags?tag=[tag]&tag=[tag]
517 6d81475c Iustin Pop
518 6d81475c Iustin Pop
/2/os
519 6d81475c Iustin Pop
+++++
520 6d81475c Iustin Pop
521 6d81475c Iustin Pop
::
522 6d81475c Iustin Pop
523 6d81475c Iustin Pop
  /2/os resource.
524 6d81475c Iustin Pop
525 6d81475c Iustin Pop
It supports the following commands: GET.
526 6d81475c Iustin Pop
527 6d81475c Iustin Pop
GET
528 6d81475c Iustin Pop
~~~
529 6d81475c Iustin Pop
530 6d81475c Iustin Pop
::
531 6d81475c Iustin Pop
532 6d81475c Iustin Pop
  Return a list of all OSes.
533 6d81475c Iustin Pop
534 6d81475c Iustin Pop
  Can return error 500 in case of a problem.
535 6d81475c Iustin Pop
536 6d81475c Iustin Pop
  Example: ["debian-etch"]
537 6d81475c Iustin Pop
538 6d81475c Iustin Pop
/2/tags
539 6d81475c Iustin Pop
+++++++
540 6d81475c Iustin Pop
541 6d81475c Iustin Pop
::
542 6d81475c Iustin Pop
543 6d81475c Iustin Pop
  /2/instances/tags resource.
544 6d81475c Iustin Pop
545 6d81475c Iustin Pop
  Manages cluster tags.
546 6d81475c Iustin Pop
547 6d81475c Iustin Pop
It supports the following commands: GET, PUT, DELETE.
548 6d81475c Iustin Pop
549 6d81475c Iustin Pop
GET
550 6d81475c Iustin Pop
~~~
551 6d81475c Iustin Pop
552 6d81475c Iustin Pop
::
553 6d81475c Iustin Pop
554 6d81475c Iustin Pop
  Returns a list of tags.
555 6d81475c Iustin Pop
556 6d81475c Iustin Pop
  Example: ["tag1", "tag2", "tag3"]
557 6d81475c Iustin Pop
558 6d81475c Iustin Pop
PUT
559 6d81475c Iustin Pop
~~~
560 6d81475c Iustin Pop
561 6d81475c Iustin Pop
::
562 6d81475c Iustin Pop
563 6d81475c Iustin Pop
  Add a set of tags.
564 6d81475c Iustin Pop
565 6d81475c Iustin Pop
  The request as a list of strings should be PUT to this URI. And
566 6d81475c Iustin Pop
  you'll have back a job id.
567 6d81475c Iustin Pop
568 6d81475c Iustin Pop
DELETE
569 6d81475c Iustin Pop
~~~~~~
570 6d81475c Iustin Pop
571 6d81475c Iustin Pop
::
572 6d81475c Iustin Pop
573 6d81475c Iustin Pop
  Delete a tag.
574 6d81475c Iustin Pop
575 6d81475c Iustin Pop
  In order to delete a set of tags, the DELETE
576 6d81475c Iustin Pop
  request should be addressed to URI like:
577 6d81475c Iustin Pop
  /tags?tag=[tag]&tag=[tag]
578 6d81475c Iustin Pop
579 6d81475c Iustin Pop
/nodes/[node_name]
580 6d81475c Iustin Pop
++++++++++++++++++
581 6d81475c Iustin Pop
582 6d81475c Iustin Pop
::
583 6d81475c Iustin Pop
584 6d81475c Iustin Pop
  /2/nodes/[node_name] resources.
585 6d81475c Iustin Pop
586 6d81475c Iustin Pop
It supports the following commands: GET.
587 6d81475c Iustin Pop
588 6d81475c Iustin Pop
GET
589 6d81475c Iustin Pop
~~~
590 6d81475c Iustin Pop
591 6d81475c Iustin Pop
::
592 6d81475c Iustin Pop
593 6d81475c Iustin Pop
  Send information about a node.
594 6d81475c Iustin Pop
595 6d81475c Iustin Pop
596 6d81475c Iustin Pop
597 6d81475c Iustin Pop
/version
598 6d81475c Iustin Pop
++++++++
599 6d81475c Iustin Pop
600 6d81475c Iustin Pop
::
601 6d81475c Iustin Pop
602 6d81475c Iustin Pop
  /version resource.
603 6d81475c Iustin Pop
604 6d81475c Iustin Pop
  This resource should be used to determine the remote API version and
605 6d81475c Iustin Pop
  to adapt clients accordingly.
606 6d81475c Iustin Pop
607 6d81475c Iustin Pop
It supports the following commands: GET.
608 6d81475c Iustin Pop
609 6d81475c Iustin Pop
GET
610 6d81475c Iustin Pop
~~~
611 6d81475c Iustin Pop
612 6d81475c Iustin Pop
::
613 6d81475c Iustin Pop
614 6d81475c Iustin Pop
  Returns the remote API version.