summaryrefslogtreecommitdiff
path: root/api-ref/source/baremetal-api-v1-conductors.inc
blob: 5b037fbfbcd974b368e944f08d305e5fc6c8048c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
.. -*- rst -*-

=======================
Conductors (conductors)
=======================

.. versionadded:: 1.49

Listing Conductor resources is done through the ``conductors`` resource.

Conductor resources are read-only, they can not be created, updated, or
removed.


List Conductors
===============

.. rest_method:: GET /v1/conductors

Return a list of conductors known by the Bare Metal service.

By default, this query will return the hostname, conductor group, and alive
status for each Conductor. When ``detail`` is set to True in the query string,
will return the full representation of the resource.

Normal response code: 200

Request
-------

.. rest_parameters:: parameters.yaml

    - fields: fields_for_conductor
    - limit: limit
    - marker: marker
    - sort_dir: sort_dir
    - sort_key: sort_key
    - detail: detail

Response
--------

.. rest_parameters:: parameters.yaml

    - hostname: hostname
    - conductor_group: conductor_group
    - alive: alive
    - drivers: drivers
    - links: links

**Example Conductor list response:**

.. literalinclude:: samples/conductor-list-response.json
   :language: javascript

**Example detailed Conductor list response:**

.. literalinclude:: samples/conductor-list-details-response.json
   :language: javascript


Show Conductor Details
======================

.. rest_method::  GET /v1/conductors/{hostname}

Shows details for a conductor. By default, this will return the full
representation of the resource; an optional ``fields`` parameter can be
supplied to return only the specified set.

Normal response codes: 200

Error codes: 400,403,404,406

Request
-------

.. rest_parameters:: parameters.yaml

    - hostname: hostname_ident
    - fields: fields_for_conductor

Response
--------

.. rest_parameters:: parameters.yaml

    - hostname: hostname
    - conductor_group: conductor_group
    - alive: alive
    - drivers: drivers
    - links: links

**Example JSON representation of a Conductor:**

.. literalinclude:: samples/conductor-show-response.json
   :language: javascript