Commit 1b01390b authored by René Nussbaumer's avatar René Nussbaumer

doc/rapi.rst: Document ipolicy parameter

Signed-off-by: default avatarRené Nussbaumer <>
Reviewed-by: default avatarMichael Hanselmann <>
parent 37483aa5
......@@ -166,6 +166,61 @@ likely to succeed or at least start executing.
Force operation to continue even if it will cause the cluster to become
inconsistent (e.g. because there are not enough master candidates).
Parameter details
Some parameters are not straight forward, so we describe them in details
.. _rapi-ipolicy:
The instance policy specification is a dict with the following fields:
.. pyassert::
constants.IPOLICY_ALL_KEYS == set([constants.ISPECS_MIN,
.. pyassert::
(set(constants.ISPECS_PARAMETER_TYPES.keys()) ==
.. |ispec-min| replace:: :pyeval:`constants.ISPECS_MIN`
.. |ispec-max| replace:: :pyeval:`constants.ISPECS_MAX`
.. |ispec-std| replace:: :pyeval:`constants.ISPECS_STD`
|ispec-min|, |ispec-max|, |ispec-std|
A sub- `dict` with the following fields, which sets the limit and standard
values of the instances:
The size in MiB of the memory used
The size in MiB of the disk used
The numbers of disks used
The numbers of cpus used
The numbers of nics used
A `list` of disk templates allowed for instances using this policy
Maximum ratio of virtual to physical CPUs (`float`)
Usage examples
......@@ -803,7 +803,8 @@ class OpClusterSetParams(OpCode):
"Whether to wipe disks before allocating them to instances"),
("nicparams", None, ht.TMaybeDict, "Cluster-wide NIC parameter defaults"),
("ndparams", None, ht.TMaybeDict, "Cluster-wide node parameter defaults"),
("ipolicy", None, ht.TMaybeDict, "Cluster-wide instance policy specs"),
("ipolicy", None, ht.TMaybeDict,
"Cluster-wide :ref:`instance policy <rapi-ipolicy>` specs"),
("drbd_helper", None, ht.TOr(ht.TString, ht.TNone), "DRBD helper program"),
("default_iallocator", None, ht.TOr(ht.TString, ht.TNone),
"Default iallocator for cluster"),
......@@ -1438,7 +1439,8 @@ class OpGroupAdd(OpCode):
("ipolicy", None, ht.TMaybeDict, "Group-wide instance policy specs"),
("ipolicy", None, ht.TMaybeDict,
"Group-wide :ref:`instance policy <rapi-ipolicy>` specs"),
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment