Fixed api doc for profile-create
This commit is contained in:
@@ -771,7 +771,8 @@ name could be delayed for an unspecified time.</para></note>'>
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
<para>List of policy records where each record contains fields
|
||||
like <code>id</code>, <code>name</code>, <code>type</code>,
|
||||
<code>spec</code>, <code>level</code> etc.
|
||||
<code>spec</code>, <code>level</code>, <code>cooldown</code>
|
||||
etc.
|
||||
</para>
|
||||
</wadl:doc>
|
||||
</param>
|
||||
@@ -787,24 +788,38 @@ name could be delayed for an unspecified time.</para></note>'>
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
<xsdxt:code href="samples/policy_create.json"/>
|
||||
</wadl:doc>
|
||||
<param name="name" style="plain" required="true">
|
||||
<param name="policy" style="plain" required="true">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
<para>Name for the newly created policy.</para>
|
||||
</wadl:doc>
|
||||
</param>
|
||||
<param name="type" style="plain" required="true">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
<para>Name of policy type to be used for the policy.</para>
|
||||
</wadl:doc>
|
||||
</param>
|
||||
<param name="spec" style="plain" required="true">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
<para>Detailed specification based on the chosen policy type.</para>
|
||||
</wadl:doc>
|
||||
</param>
|
||||
<param name="level" style="plain" required="false">
|
||||
<wadl:doc xmlns="http://docbook.org/ns/docbook" xml:lang="EN">
|
||||
<para>A number representing the default enforcement level.</para>
|
||||
<para>A map that contains the following keys and values that specify
|
||||
the details of the policy to be created:</para>
|
||||
<itemizedlist xml:id="policy_body">
|
||||
<title>Policy body</title>
|
||||
<listitem>
|
||||
<para>
|
||||
<code>name</code> Name for the newly created policy. (required).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<code>type</code> Name of policy type to be used for the policy. (required).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<code>spec</code> Detailed specification based on the chosen policy type. (required).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<code>level</code> A number representing the default enforcement level. (optional).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<code>cooldown</code> A number representing the default cooldown seconds. (optional).
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</wadl:doc>
|
||||
</param>
|
||||
</representation>
|
||||
@@ -816,7 +831,56 @@ name could be delayed for an unspecified time.</para></note>'>
|
||||
</wadl:doc>
|
||||
<param name="policy" 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 policy.</para>
|
||||
<para>A map that contains the following keys and values that provides the
|
||||
details of the policy that is created:</para>
|
||||
<itemizedlist xml:id="policy_response_body">
|
||||
<title>Policy Create Response</title>
|
||||
<listitem>
|
||||
<para>
|
||||
<code>id</code> An unique ID for the newly created policy.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<code>name</code> Name for the newly created policy.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<code>type</code> Name of policy type referenced by the policy.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<code>spec</code> Detailed specification based on the chosen policy type.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<code>level</code> A number representing the default enforcement level.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<code>cooldown</code> A number representing the default cooldown seconds.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<code>created_time</code> UTC timestamp when the profile is created.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<code>updated_time</code> UTC timestamp when the profile is updated.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<code>deleted_time</code> UTC timestamp when the profile is deleted.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</wadl:doc>
|
||||
</param>
|
||||
</representation>
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
{
|
||||
"level": 50,
|
||||
"name": "my_deletion_policy",
|
||||
"spec": {
|
||||
"criteria": "oldest_first",
|
||||
"grace_period": 60,
|
||||
"reduce_desired_capacity": false,
|
||||
},
|
||||
"type": "os.senlin.deletion_policy",
|
||||
"policy": {
|
||||
"cooldown": 0,
|
||||
"level": 0,
|
||||
"name": "sp001",
|
||||
"spec": {
|
||||
"adjustment": {
|
||||
"min_step": 1,
|
||||
"number": 1,
|
||||
"type": "CHANGE_IN_CAPACITY"
|
||||
},
|
||||
"max_size": 10,
|
||||
"min_size": 1
|
||||
},
|
||||
"type": "ScalingPolicy"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,22 @@
|
||||
{
|
||||
"policy": {
|
||||
"id": "913e4dea-334e-4e1b-a7e0-507d3bd0271c",
|
||||
"links": [
|
||||
{
|
||||
"href": "http://192.168.12.34:8778/v1/eb1c63a4f77141548385f113a28f0f52/policies/913e4dea-334e-4e1b-a7e0-507d3bd0271c",
|
||||
"rel": "self"
|
||||
}
|
||||
]
|
||||
"cooldown": 0,
|
||||
"created_time": "2015-03-02T07:40:31.733176",
|
||||
"data": {},
|
||||
"deleted_time": null,
|
||||
"id": "02f62195-2198-4797-b0a9-877632208527",
|
||||
"level": 0,
|
||||
"name": "sp001",
|
||||
"spec": {
|
||||
"adjustment": {
|
||||
"min_step": 1,
|
||||
"number": 1,
|
||||
"type": "CHANGE_IN_CAPACITY"
|
||||
},
|
||||
"max_size": 10,
|
||||
"min_size": 1
|
||||
},
|
||||
"type": "ScalingPolicy",
|
||||
"updated_time": null
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user