From 1c261f19555f5d29470d348dea61ff3151bcd5a0 Mon Sep 17 00:00:00 2001 From: Teresa Ho Date: Thu, 12 Jul 2018 11:48:44 -0400 Subject: [PATCH] Extend sysinv to assign kubernetes labels to nodes Updated restapi documentation for host labels. Change-Id: I5b240177138b3b159f34e1365088986cb516200f Signed-off-by: David Sullivan Story: 2002845 Task: 22793 Depends-On: https://review.openstack.org/#/c/595875/ --- .../api-ref/src/docbkx/ch_sysinv-api-v1.xml | 22 +++++ .../host_label_assign-request.json | 4 + .../api_samples/host_label_list-response.json | 14 +++ .../src/wadls/sysinv-api/v1/common.ent | 26 +++++ .../wadls/sysinv-api/v1/sysinv-api-v1.wadl | 96 +++++++++++++++++++ 5 files changed, 162 insertions(+) create mode 100644 restapi-doc/restapi-doc/api-ref/src/wadls/sysinv-api/v1/api_samples/host_label_assign-request.json create mode 100644 restapi-doc/restapi-doc/api-ref/src/wadls/sysinv-api/v1/api_samples/host_label_list-response.json diff --git a/restapi-doc/restapi-doc/api-ref/src/docbkx/ch_sysinv-api-v1.xml b/restapi-doc/restapi-doc/api-ref/src/docbkx/ch_sysinv-api-v1.xml index fd01cec26..3983dfbf0 100644 --- a/restapi-doc/restapi-doc/api-ref/src/docbkx/ch_sysinv-api-v1.xml +++ b/restapi-doc/restapi-doc/api-ref/src/docbkx/ch_sysinv-api-v1.xml @@ -1358,4 +1358,26 @@ configuration entity for the system. + + + + +
+ Labels + + + + + + + + + + + +
+ diff --git a/restapi-doc/restapi-doc/api-ref/src/wadls/sysinv-api/v1/api_samples/host_label_assign-request.json b/restapi-doc/restapi-doc/api-ref/src/wadls/sysinv-api/v1/api_samples/host_label_assign-request.json new file mode 100644 index 000000000..7afc33d53 --- /dev/null +++ b/restapi-doc/restapi-doc/api-ref/src/wadls/sysinv-api/v1/api_samples/host_label_assign-request.json @@ -0,0 +1,4 @@ +{ + "key1": "value1", + "key2": "value2" +} diff --git a/restapi-doc/restapi-doc/api-ref/src/wadls/sysinv-api/v1/api_samples/host_label_list-response.json b/restapi-doc/restapi-doc/api-ref/src/wadls/sysinv-api/v1/api_samples/host_label_list-response.json new file mode 100644 index 000000000..ba30258d2 --- /dev/null +++ b/restapi-doc/restapi-doc/api-ref/src/wadls/sysinv-api/v1/api_samples/host_label_list-response.json @@ -0,0 +1,14 @@ +{ + "labels": [ + { + "uuid": "a7d37730-c58e-4b18-9046-6bd0f4fe03a8", + "host_uuid": "42e30882-ab1a-41b0-9f65-696f6d804888", + "label": "key1=value1" + }, + { + "uuid": "c9d3aca9-d360-406c-80c7-a059404471c1", + "host_uuid": "42e30882-ab1a-41b0-9f65-696f6d804888", + "label": "key2=value2" + } + ] +} diff --git a/restapi-doc/restapi-doc/api-ref/src/wadls/sysinv-api/v1/common.ent b/restapi-doc/restapi-doc/api-ref/src/wadls/sysinv-api/v1/common.ent index 9e3047f2b..61d36de53 100644 --- a/restapi-doc/restapi-doc/api-ref/src/wadls/sysinv-api/v1/common.ent +++ b/restapi-doc/restapi-doc/api-ref/src/wadls/sysinv-api/v1/common.ent @@ -3903,6 +3903,32 @@ '> + + + + + The universally unique identifier for this object. + + + + + The uuid for the host. + + + + + The label provisioned for the host. + + + '> + GET'> PUT'> diff --git a/restapi-doc/restapi-doc/api-ref/src/wadls/sysinv-api/v1/sysinv-api-v1.wadl b/restapi-doc/restapi-doc/api-ref/src/wadls/sysinv-api/v1/sysinv-api-v1.wadl index f9450a48d..5c4a9f821 100644 --- a/restapi-doc/restapi-doc/api-ref/src/wadls/sysinv-api/v1/sysinv-api-v1.wadl +++ b/restapi-doc/restapi-doc/api-ref/src/wadls/sysinv-api/v1/sysinv-api-v1.wadl @@ -199,6 +199,11 @@ SPDX-License-Identifier: Apache-2.0 + + + + + @@ -1003,6 +1008,26 @@ SPDX-License-Identifier: Apache-2.0 + + + + + The unique identifier of an existing host. + + + + + + + + + + The unique identifier of an existing host label. + + + + + @@ -7263,4 +7288,75 @@ OAM Controller-1 IP Address. &commonFaults; &getFaults; + + + + + + + + Assign label to a host. + + + + + + + + This parameter specifies the label key value pairs. + + + + + + + + + + + + + + + + + &commonFaults; &postPutFaults; + + + + + List host label. + + + + + + &labelListParameters; + + + + + + + + &commonFaults; &getFaults; + + + + + Remove label from a host. + + + + + + + + +