Revised API doc for node-create operation
This commit is contained in:
@@ -1231,41 +1231,55 @@
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
<xsdxt:code href="samples/node_create.json"/>
|
||||
</wadl:doc>
|
||||
<param name="name" style="plain" required="true">
|
||||
<param name="node" style="plain" required="true">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
<para>Name for the newly created node.</para>
|
||||
</wadl:doc>
|
||||
</param>
|
||||
<param name="profile_id" style="plain" required="true">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
<para>ID of profile to be used for the specified node.</para>
|
||||
</wadl:doc>
|
||||
</param>
|
||||
<param name="cluster_id" style="plain" required="false">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
<para>ID of the cluster this new node will belong to. If not specified, the created node becomes a orphan node.</para>
|
||||
</wadl:doc>
|
||||
</param>
|
||||
<param name="role" style="plain" required="false">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
<para>A role to be assigned to the node.</para>
|
||||
</wadl:doc>
|
||||
</param>
|
||||
<param name="tags" style="plain" required="false">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
<para>A list of key-value pairs to be associated with the node.</para>
|
||||
<para>A map that contains detailed data for the node to be created.</para>
|
||||
<itemizedlist xml:id="node_create_body">
|
||||
<title>Node Create Request Body</title>
|
||||
<listitem>
|
||||
<para>
|
||||
<code>name</code> Name for the newly created node. [Required].
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<code>profile_id</code> ID or name or short ID of the profile
|
||||
used by the node for creation. [Required].
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<code>cluster_id</code> ID or name or short ID of the cluster
|
||||
the node lives in. If not specified, the node created will be
|
||||
an orphaned node. [Optional].
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<code>role</code> A string indicating the role this node plays
|
||||
in a cluster. [Optional].
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<code>tags</code> A list of key-value pairs to be attached to
|
||||
the newly created node. [Optional].
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</wadl:doc>
|
||||
</param>
|
||||
</representation>
|
||||
</request>
|
||||
<response status="201">
|
||||
<response status="200">
|
||||
<representation mediaType="application/json">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
<xsdxt:code href="samples/node_create_resp.json" />
|
||||
</wadl:doc>
|
||||
<param name="cluster" style="plain" required="true">
|
||||
<param name="node" style="plain" required="true">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
<para>A dictionary containing the <code>id</code> of and <code>link</code> to the node.</para>
|
||||
<para>A dictionary containing the detailed data of the node created such as
|
||||
<code>id</code>, <code>name</code>, <code>status</code> etc. .</para>
|
||||
</wadl:doc>
|
||||
</param>
|
||||
</representation>
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
{
|
||||
"name": "node-254",
|
||||
"cluster_id": "3095aefc-09fb-4bc7-b1f0-f21a304e864c",
|
||||
"profile_id": "e8d140ba-40de-8abd-4323-3eb7384f9751",
|
||||
"role": "Worker",
|
||||
"tags": {},
|
||||
"node": {
|
||||
"cluster_id": null,
|
||||
"name": "node009",
|
||||
"profile_id": "mystack",
|
||||
"role": "master",
|
||||
"tags": {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,22 @@
|
||||
{
|
||||
"node": {
|
||||
"id": "56e68239-13b2-4d4b-92f1-4ec472fd83bd",
|
||||
"links": [
|
||||
{
|
||||
"href": "http://192.168.12.34:8778/v1/eb1c63a4f77141548385f113a28f0f52/nodes/56e68239-13b2-4d4b-92f1-4ec472fd83bd",
|
||||
"rel": "self"
|
||||
}
|
||||
]
|
||||
"action": "2366d440-c73e-4961-9254-6d1c3af7c167",
|
||||
"cluster_id": null,
|
||||
"created_time": null,
|
||||
"data": {},
|
||||
"deleted_time": null,
|
||||
"id": "0df0931b-e251-4f2e-8719-4ebfda3627ba",
|
||||
"index": -1,
|
||||
"init_time": "2015-03-05T08:53:15.774619",
|
||||
"name": "node009",
|
||||
"physical_id": "",
|
||||
"profile_id": "edc63d0a-2ca4-48fa-9854-27926da76a4a",
|
||||
"profile_name": "mystack",
|
||||
"project": "6e18cc2bdbeb48a5b3cad2dc499f6804",
|
||||
"role": "master",
|
||||
"status": "INIT",
|
||||
"status_reason": "Initializing",
|
||||
"tags": {},
|
||||
"updated_time": null
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user