Browse Source

[docs] Update docs to match site_statuses API

Also rebuilds sample yaml files.

Change-Id: I740bdd9aba2464d1656e57c9f8b30886f552cfd6
changes/72/605472/3
Bryan Strassner 3 years ago
parent
commit
5c2f921d6f
  1. 26
      doc/source/API.rst
  2. 4
      doc/source/_static/shipyard.policy.yaml.sample
  3. 4
      src/bin/shipyard_airflow/etc/shipyard/policy.yaml.sample

26
doc/source/API.rst

@ -972,21 +972,25 @@ Site Statuses API
Site Statuses API retrieves node provision status and/or node power state
for all nodes in the site.
/v1.0/site-statuses
/v1.0/site_statuses
~~~~~~~~~~~~~~~~~~~
GET /v1.0/site-statuses
GET /v1.0/site_statuses
^^^^^^^^^^^^^^^^^^^^^^^
Returns the dictionary with nodes provision status and nodes power state status
Query Parameters
''''''''''''''''
- filters=nodes-provision-status,machines-power-state
filters query parameter allows to specify one or more status types to return statuses
of those types. The filter value ``nodes-provision-status`` will fetch provisioning
statuses of all nodes in the site. The filter value ``machines-power-state`` will fetch
power states of all baremetal machines in the site. By omitting the filters
query parameter, statuses of all status types will be returned.
filters query parameter allows to specify one or more status types to return
statuses of those types. The filter value ``nodes-provision-status`` will
fetch provisioning statuses of all nodes in the site. The filter value
``machines-power-state`` will fetch power states of all baremetal machines
in the site. By omitting the filters query parameter, statuses of all status
types will be returned. To specify multiple items explicitly, separate items
with the URL encoded version of a comma: %2C. e.g.::
&filters=nodes-provision-status%2Cmachines-power-state
Responses
'''''''''
@ -1000,7 +1004,7 @@ Example
::
$ curl -X GET $URL/api/v1.0/site-statuses -H "X-Auth-Token:$TOKEN"
$ curl -X GET $URL/api/v1.0/site_statuses -H "X-Auth-Token:$TOKEN"
HTTP/1.1 200 OK
x-shipyard-req: 0804d13e-08fc-4e60-a819-3b7532cac4ec
@ -1033,7 +1037,7 @@ Example
::
$ curl -X GET $URL/api/v1.0/site-statuses?filters=nodes-provision-status \
$ curl -X GET $URL/api/v1.0/site_statuses?filters=nodes-provision-status \
-H "X-Auth-Token:$TOKEN"
HTTP/1.1 200 OK
@ -1057,7 +1061,7 @@ Example
::
$ curl -X GET $URL/api/v1.0/site-statuses?filters=machines-power-state \
$ curl -X GET $URL/api/v1.0/site_statuses?filters=machines-power-state \
-H "X-Auth-Token:$TOKEN"
HTTP/1.1 200 OK
@ -1081,7 +1085,7 @@ Example
::
$ curl -X GET $URL/api/v1.0/site-statuses?filters=nodes-provision-status,machines-power-state \
$ curl -X GET $URL/api/v1.0/site_statuses?filters=nodes-provision-status%2Cmachines-power-state \
-H "X-Auth-Token:$TOKEN"
HTTP/1.1 200 OK

4
doc/source/_static/shipyard.policy.yaml.sample

@ -82,3 +82,7 @@
# POST /api/v1.0/actions
#"workflow_orchestrator:action_redeploy_server": "rule:admin_required"
# Create a workflow action to relabel target nodes
# POST /api/v1.0/actions
#"workflow_orchestrator:action_relabel_nodes": "rule:admin_required"

4
src/bin/shipyard_airflow/etc/shipyard/policy.yaml.sample

@ -82,3 +82,7 @@
# POST /api/v1.0/actions
#"workflow_orchestrator:action_redeploy_server": "rule:admin_required"
# Create a workflow action to relabel target nodes
# POST /api/v1.0/actions
#"workflow_orchestrator:action_relabel_nodes": "rule:admin_required"
Loading…
Cancel
Save