Merge "Extend sysinv to assign kubernetes labels to nodes"
This commit is contained in:
commit
0decf3591b
@ -1358,4 +1358,26 @@ configuration entity for the system.
|
||||
</wadl:resources>
|
||||
</section>
|
||||
|
||||
<!--*******************************************************-->
|
||||
<!-- LABELS -->
|
||||
<!--*******************************************************-->
|
||||
|
||||
<section xml:id="labels-v1">
|
||||
<title>Labels</title>
|
||||
<wadl:resources xmlns:wadl="http://wadl.dev.java.net/2009/02">
|
||||
<wadl:resource
|
||||
href="../wadls/sysinv-api/v1/sysinv-api-v1.wadl#labels">
|
||||
<wadl:method href="#listLabel"/>
|
||||
</wadl:resource>
|
||||
<wadl:resource
|
||||
href="../wadls/sysinv-api/v1/sysinv-api-v1.wadl#assign_label">
|
||||
<wadl:method href="#assignLabel"/>
|
||||
</wadl:resource>
|
||||
<wadl:resource
|
||||
href="../wadls/sysinv-api/v1/sysinv-api-v1.wadl#label_id">
|
||||
<wadl:method href="#removeLabel"/>
|
||||
</wadl:resource>
|
||||
</wadl:resources>
|
||||
</section>
|
||||
|
||||
</chapter>
|
||||
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"key1": "value1",
|
||||
"key2": "value2"
|
||||
}
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
@ -3952,6 +3952,32 @@
|
||||
</param>
|
||||
'>
|
||||
|
||||
<!-- Host label list Parameters -->
|
||||
|
||||
<!ENTITY labelListParameters '
|
||||
<param xmlns="http://wadl.dev.java.net/2009/02"
|
||||
name="uuid" style="plain" type="csapi:UUID" >
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:wadl="http://wadl.dev.java.net/2009/02" xml:lang="EN">
|
||||
<para>The universally unique identifier for this object.</para>
|
||||
</wadl:doc>
|
||||
</param>
|
||||
<param xmlns="http://wadl.dev.java.net/2009/02"
|
||||
name="host_uuid" style="plain" type="xsd:string" >
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:wadl="http://wadl.dev.java.net/2009/02" xml:lang="EN">
|
||||
<para>The uuid for the host.</para>
|
||||
</wadl:doc>
|
||||
</param>
|
||||
<param xmlns="http://wadl.dev.java.net/2009/02"
|
||||
name="label" style="plain" type="xsd:string" >
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:wadl="http://wadl.dev.java.net/2009/02" xml:lang="EN">
|
||||
<para>The label provisioned for the host.</para>
|
||||
</wadl:doc>
|
||||
</param>
|
||||
'>
|
||||
|
||||
<!-- Useful for describing APIs -->
|
||||
<!ENTITY GET '<command xmlns="http://docbook.org/ns/docbook">GET</command>'>
|
||||
<!ENTITY PUT '<command xmlns="http://docbook.org/ns/docbook">PUT</command>'>
|
||||
|
@ -199,6 +199,11 @@ SPDX-License-Identifier: Apache-2.0
|
||||
<method href="#downgradeHost"/>
|
||||
</resource>
|
||||
|
||||
<!-- /v1/ihosts/{host_id}/labels -->
|
||||
<resource id="labels" path="labels">
|
||||
<method href="#listLabel"/>
|
||||
</resource>
|
||||
|
||||
</resource>
|
||||
</resource>
|
||||
|
||||
@ -1003,6 +1008,26 @@ SPDX-License-Identifier: Apache-2.0
|
||||
<method href="#listLicenseInfo"/>
|
||||
</resource>
|
||||
|
||||
<!-- /v1/labels/{host_id} -->
|
||||
<resource id="assign_label" path="labels/{host_id}">
|
||||
<param name="host_id" style="template" required="true" type="csapi:UUID">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
<para>The unique identifier of an existing host.</para>
|
||||
</wadl:doc>
|
||||
</param>
|
||||
<method href="#assignLabel"/>
|
||||
</resource>
|
||||
|
||||
<!-- /v1/labels/{label_id} -->
|
||||
<resource id="label_id" path="labels/{label_id}" >
|
||||
<param name="label_id" style="template" required="true" type="csapi:UUID">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
<para>The unique identifier of an existing host label. </para>
|
||||
</wadl:doc>
|
||||
</param>
|
||||
<method href="#removeLabel"/>
|
||||
</resource>
|
||||
|
||||
</resource>
|
||||
</resources>
|
||||
|
||||
@ -7263,4 +7288,75 @@ OAM Controller-1 IP Address.</para>
|
||||
&commonFaults; &getFaults;
|
||||
</method>
|
||||
|
||||
|
||||
<!-- ..................................................... -->
|
||||
<!-- .. Label .. -->
|
||||
<!-- ..................................................... -->
|
||||
|
||||
<method name="POST" id="assignLabel">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
|
||||
title="Assign label to a host">
|
||||
<para role="shortdesc">Assign label to a host.</para>
|
||||
</wadl:doc>
|
||||
<request>
|
||||
<representation mediaType="application/xml">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
</wadl:doc>
|
||||
<param xmlns="http://wadl.dev.java.net/2009/02"
|
||||
name="label" style="plain" type="xsd:string" >
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:wadl="http://wadl.dev.java.net/2009/02" xml:lang="EN">
|
||||
<para>This parameter specifies the label key value pairs.
|
||||
</para>
|
||||
</wadl:doc>
|
||||
</param>
|
||||
</representation>
|
||||
<representation mediaType="application/json">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
<xsdxt:code href="api_samples/host_label_assign-request.json"/>
|
||||
</wadl:doc>
|
||||
</representation>
|
||||
</request>
|
||||
<response status="200">
|
||||
<representation mediaType="application/xml">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
</wadl:doc>
|
||||
</representation>
|
||||
</response>
|
||||
&commonFaults; &postPutFaults;
|
||||
</method>
|
||||
|
||||
<method name="GET" id="listLabel">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
|
||||
title="List label for a host">
|
||||
<para role="shortdesc">List host label.</para>
|
||||
</wadl:doc>
|
||||
<response status="200">
|
||||
<representation mediaType="application/xml">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
</wadl:doc>
|
||||
&labelListParameters;
|
||||
</representation>
|
||||
<representation mediaType="application/json">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
<xsdxt:code href="api_samples/host_label_list-response.json"/>
|
||||
</wadl:doc>
|
||||
</representation>
|
||||
</response>
|
||||
&commonFaults; &getFaults;
|
||||
</method>
|
||||
|
||||
<method name="DELETE" id="removeLabel">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN"
|
||||
title="Remove label from a host">
|
||||
<para role="shortdesc">Remove label from a host.</para>
|
||||
</wadl:doc>
|
||||
<response status="204">
|
||||
<representation mediaType="application/json">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
</wadl:doc>
|
||||
</representation>
|
||||
</response>
|
||||
</method>
|
||||
|
||||
</application>
|
||||
|
Loading…
Reference in New Issue
Block a user