diff --git a/lib/rapi/client.py b/lib/rapi/client.py index b5a4df53013912f5e5feca36fbb2920d26e2eb0c..d8bc5eb93bd810d3c0664475ada8f7a0c398e698 100644 --- a/lib/rapi/client.py +++ b/lib/rapi/client.py @@ -923,7 +923,8 @@ class GanetiRapiClient(object): # pylint: disable=R0904 ("/%s/instances/%s/reboot" % (GANETI_RAPI_VERSION, instance)), query, None) - def ShutdownInstance(self, instance, dry_run=False, no_remember=False): + def ShutdownInstance(self, instance, dry_run=False, no_remember=False, + **kwargs): """Shuts down an instance. @type instance: str @@ -937,12 +938,14 @@ class GanetiRapiClient(object): # pylint: disable=R0904 """ query = [] + body = kwargs + _AppendDryRunIf(query, dry_run) _AppendIf(query, no_remember, ("no-remember", 1)) return self._SendRequest(HTTP_PUT, ("/%s/instances/%s/shutdown" % - (GANETI_RAPI_VERSION, instance)), query, None) + (GANETI_RAPI_VERSION, instance)), query, body) def StartupInstance(self, instance, dry_run=False, no_remember=False): """Starts up an instance.