summaryrefslogtreecommitdiff
path: root/api-ref/source/baremetal-api-v1-indicators.inc
blob: 0c4b1188550f37eae17126517f6a43b65a074edf (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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
.. -*- rst -*-

=====================
Indicators Management
=====================

The Indicators management is an extension of the node ReST API endpoint that
allows reading and toggling the indicators (e.g. LEDs) on the hardware
units.

List Indicators
===============

.. rest_method:: GET /v1/nodes/{node_ident}/management/indicators

.. versionadded:: 1.63

List all available indicator names for each of the hardware components.
The components that the ``redfish`` driver may have are: ``system``,
``chassis`` and ``drive``. The actual list depends on the support by the
underlying hardware.

Normal response code: 200

Error response codes: 404 (if node not found)

Request
-------

.. rest_parameters:: parameters.yaml

   - node_ident: node_ident

Response Parameters
-------------------

.. rest_parameters:: parameters.yaml

   - components: n_components
   - name: component_name
   - links: links

**Example list of indicators for the node:**

.. literalinclude:: samples/node-indicators-list-response.json
   :language: javascript


List Indicators for hardware component
======================================

.. rest_method:: GET /v1/nodes/{node_ident}/management/indicators/{component}

.. versionadded:: 1.63

Retrieves indicators for a given hardware component along with their attributes.
The components that the ``redfish`` driver may have are: ``system``,
``chassis`` and ``drive``. The actual list depends on the support by the
underlying hardware.

Normal response code: 200

Error response codes: 404 (if node or component is not found)

Request
-------

.. rest_parameters:: parameters.yaml

   - node_ident: node_ident
   - component: component

Response Parameters
-------------------

.. rest_parameters:: parameters.yaml

   - indicators: n_indicators
   - name: indicator_name
   - readonly: indicator_readonly
   - states: indicator_states
   - links: links

**Example list of indicators for a given component of the node:**

.. literalinclude:: samples/node-indicators-component-list-response.json
   :language: javascript


Get Indicator State
===================

.. rest_method:: GET /v1/nodes/{node_ident}/management/indicators/{component}/{ind_ident}

.. versionadded:: 1.63

Retrieves the state of a chosen indicator for a given component of the node.
The value of the field in the response object represents its state. The values
can be one of  ``OFF``, ``ON``, ``BLINKING`` or ``UNKNOWN``.

Normal response code: 200

Error response codes: 404 (if node, component or indicator is not found)

Request
-------

.. rest_parameters:: parameters.yaml

  - node_ident: node_ident
  - component: component
  - ind_ident: ind_ident

Response Parameters
-------------------

.. rest_parameters:: parameters.yaml

   - state: n_ind_state

**Example list of indicators for a given component of the node:**

.. literalinclude:: samples/node-indicators-get-state-response.json
  :language: javascript


Set Indicator State
===================

.. rest_method:: PUT /v1/nodes/{node_ident}/management/indicators/{component}/{ind_ident}

.. versionadded:: 1.63

Set the state of the desired indicators of the component.

Normal response code: 204 (No content)

Error codes:
    - 400 (if state is not an accepted value)
    - 404 (if node, component or indicator is not found)

Request
-------

.. rest_parameters:: parameters.yaml

   - node_ident: node_ident
   - component: component
   - ind_ident: ind_ident
   - state: n_ind_state

**Set the State of an Indicator**

.. literalinclude:: samples/node-indicators-set-state.json