Commit 370f2042 authored by Guido Trotter's avatar Guido Trotter
Browse files

Fix RAPI node modify client and server calls

rapi.client.ModifyNode accepts a "group" and not a "node" param.
(this bug is invisible but still not nice)

rlib2.R_2_nodes_name_modify submits the opcode with instance_name rather
than node_name as a param. This would break the call.
Signed-off-by: default avatarGuido Trotter <>
Reviewed-by: default avatarMichael Hanselmann <>
parent 6555373d
......@@ -1455,20 +1455,20 @@ class GanetiRapiClient(object): # pylint: disable=R0904
("/%s/nodes/%s/role" %
(GANETI_RAPI_VERSION, node)), query, role)
def ModifyNode(self, group, **kwargs):
def ModifyNode(self, node, **kwargs):
"""Modifies a node.
More details for parameters can be found in the RAPI documentation.
@type group: string
@param group: Node name
@type node: string
@param node: Node name
@rtype: string
@return: job id
return self._SendRequest(HTTP_POST,
("/%s/nodes/%s/modify" %
(GANETI_RAPI_VERSION, group)), None, kwargs)
(GANETI_RAPI_VERSION, node)), None, kwargs)
def GetNodeStorageUnits(self, node, storage_type, output_fields):
"""Gets the storage units for a node.
......@@ -513,7 +513,7 @@ class R_2_nodes_name_modify(baserlib.R_Generic):
baserlib.CheckType(self.request_body, dict, "Body contents")
op = baserlib.FillOpcode(opcodes.OpNodeSetParams, self.request_body, {
"instance_name": self.items[0],
"node_name": self.items[0],
return baserlib.SubmitJob([op])
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