Commit 508e9b20 authored by Michael Hanselmann's avatar Michael Hanselmann

Add RAPI resource to redistribute config

Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarLuca Bigliardi <shammash@google.com>
parent bf968b7f
......@@ -190,6 +190,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``
++++++++++++++++
......@@ -398,7 +412,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.
......
......@@ -201,6 +201,7 @@ def GetHandlers(node_name_pattern, instance_name_pattern, job_id_pattern):
"/2/tags": rlib2.R_2_tags,
"/2/info": rlib2.R_2_info,
"/2/os": rlib2.R_2_os,
"/2/redistribute-config": rlib2.R_2_redist_config,
}
......
......@@ -116,6 +116,17 @@ class R_2_os(baserlib.R_Generic):
return [row[0] for row in diagnose_data if row[1]]
class R_2_redist_config(baserlib.R_Generic):
"""/2/redistribute-config resource.
"""
def PUT(self):
"""Redistribute configuration to all nodes.
"""
return baserlib.SubmitJob([opcodes.OpRedistributeConfig()])
class R_2_jobs(baserlib.R_Generic):
"""/2/jobs resource.
......
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