bash_completion: Move common code into function
[ganeti-local] / doc / rapi.rst
index b14b8f2..ee64dec 100644 (file)
@@ -28,7 +28,8 @@ principle.
 Generic parameters
 ------------------
 
-A few parameter mean the same thing across all resources which implement it.
+A few parameter mean the same thing across all resources which implement
+it.
 
 ``bulk``
 ++++++++
@@ -190,6 +191,20 @@ Example::
       }
     }
 
+
+``/2/redistribute-config``
+++++++++++++++++++++++++++
+
+Redistribute configuration to all nodes.
+
+It supports the following commands: ``PUT``.
+
+``PUT``
+~~~~~~~
+
+Redistribute configuration to all nodes. The result will be a job id.
+
+
 ``/2/instances``
 ++++++++++++++++
 
@@ -283,6 +298,20 @@ Deletes an instance.
 It supports the ``dry-run`` argument.
 
 
+``/2/instances/[instance_name]/info``
++++++++++++++++++++++++++++++++++++++++
+
+It supports the following commands: ``GET``.
+
+``GET``
+~~~~~~~
+
+Requests detailed information about the instance. An optional parameter,
+``static`` (bool), can be set to return only static information from the
+configuration without querying the instance's nodes. The result will be
+a job id.
+
+
 ``/2/instances/[instance_name]/reboot``
 +++++++++++++++++++++++++++++++++++++++
 
@@ -333,6 +362,34 @@ instance if even if secondary disks are failing.
 
 It supports the ``dry-run`` argument.
 
+``/2/instances/[instance_name]/reinstall``
+++++++++++++++++++++++++++++++++++++++++++++++
+
+Installs the operating system again.
+
+It supports the following commands: ``POST``.
+
+``POST``
+~~~~~~~~
+
+Takes the parameters ``os`` (OS template name) and ``nostartup`` (bool).
+
+
+``/2/instances/[instance_name]/replace-disks``
+++++++++++++++++++++++++++++++++++++++++++++++
+
+Replaces disks on an instance.
+
+It supports the following commands: ``POST``.
+
+``POST``
+~~~~~~~~
+
+Takes the parameters ``mode`` (one of ``replace_on_primary``,
+``replace_on_secondary``, ``replace_new_secondary`` or
+``replace_auto``), ``disks`` (comma separated list of disk indexes),
+``remote_node`` and ``iallocator``.
+
 
 ``/2/instances/[instance_name]/tags``
 +++++++++++++++++++++++++++++++++++++
@@ -356,7 +413,7 @@ Example::
 Add a set of tags.
 
 The request as a list of strings should be ``PUT`` to this URI. The
-result willl be a job id.
+result will be a job id.
 
 It supports the ``dry-run`` argument.
 
@@ -464,6 +521,13 @@ Example::
       ...
     ]
 
+``/2/nodes/[node_name]``
++++++++++++++++++++++++++++++++++
+
+Returns information about a node.
+
+It supports the following commands: ``GET``.
+
 ``/2/nodes/[node_name]/evacuate``
 +++++++++++++++++++++++++++++++++
 
@@ -480,6 +544,20 @@ parameters must be passed:
     evacuate?iallocator=[iallocator]
     evacuate?remote_node=[nodeX.example.com]
 
+``/2/nodes/[node_name]/migrate``
++++++++++++++++++++++++++++++++++
+
+Migrates all primary instances from a node.
+
+It supports the following commands: ``POST``.
+
+``POST``
+~~~~~~~~
+
+No parameters are required, but ``live`` can be set to a boolean value.
+
+    migrate?live=[0|1]
+
 ``/2/nodes/[node_name]/role``
 +++++++++++++++++++++++++++++
 
@@ -509,11 +587,50 @@ Example::
 
 Change the node role.
 
-The request is a string which should be PUT to this URI. The result will be a
-job id.
+The request is a string which should be PUT to this URI. The result will
+be a job id.
 
 It supports the ``force`` argument.
 
+``/2/nodes/[node_name]/storage``
+++++++++++++++++++++++++++++++++
+
+Manages storage units on the node.
+
+``GET``
+~~~~~~~
+
+Requests a list of storage units on a node. Requires the parameters
+``storage_type`` (one of ``file``, ``lvm-pv`` or ``lvm-vg``) and
+``output_fields``. The result will be a job id, using which the result
+can be retrieved.
+
+``/2/nodes/[node_name]/storage/modify``
++++++++++++++++++++++++++++++++++++++++
+
+Modifies storage units on the node.
+
+``PUT``
+~~~~~~~
+
+Modifies parameters of storage units on the node. Requires the
+parameters ``storage_type`` (one of ``file``, ``lvm-pv`` or ``lvm-vg``)
+and ``name`` (name of the storage unit).  Parameters can be passed
+additionally. Currently only ``allocatable`` (bool) is supported. The
+result will be a job id.
+
+``/2/nodes/[node_name]/storage/repair``
++++++++++++++++++++++++++++++++++++++++
+
+Repairs a storage unit on the node.
+
+``PUT``
+~~~~~~~
+
+Repairs a storage unit on the node. Requires the parameters
+``storage_type`` (currently only ``lvm-vg`` can be repaired) and
+``name`` (name of the storage unit). The result will be a job id.
+
 ``/2/nodes/[node_name]/tags``
 +++++++++++++++++++++++++++++
 
@@ -628,3 +745,5 @@ It supports the following commands: ``GET``.
 
 Returns the remote API version. Ganeti 1.2 returned ``1`` and Ganeti
 2.0 returns ``2``.
+
+.. vim: set textwidth=72 :