From 5c2f921d6f07db7cf6e4e43d39bd2b60c0ad0330 Mon Sep 17 00:00:00 2001 From: Bryan Strassner Date: Wed, 26 Sep 2018 11:03:21 -0500 Subject: [PATCH] [docs] Update docs to match site_statuses API Also rebuilds sample yaml files. Change-Id: I740bdd9aba2464d1656e57c9f8b30886f552cfd6 --- doc/source/API.rst | 26 +++++++++++-------- .../_static/shipyard.policy.yaml.sample | 4 +++ .../etc/shipyard/policy.yaml.sample | 4 +++ 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/doc/source/API.rst b/doc/source/API.rst index c58534d6..7e065aca 100644 --- a/doc/source/API.rst +++ b/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 diff --git a/doc/source/_static/shipyard.policy.yaml.sample b/doc/source/_static/shipyard.policy.yaml.sample index 9c61bec7..50340339 100644 --- a/doc/source/_static/shipyard.policy.yaml.sample +++ b/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" + diff --git a/src/bin/shipyard_airflow/etc/shipyard/policy.yaml.sample b/src/bin/shipyard_airflow/etc/shipyard/policy.yaml.sample index 9c61bec7..50340339 100644 --- a/src/bin/shipyard_airflow/etc/shipyard/policy.yaml.sample +++ b/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" +