(GANETI_RAPI_VERSION, instance)), query, None)
def RebootInstance(self, instance, reboot_type=None, ignore_secondaries=None,
(GANETI_RAPI_VERSION, instance)), query, None)
def RebootInstance(self, instance, reboot_type=None, ignore_secondaries=None,
_AppendIf(query, reboot_type, ("type", reboot_type))
_AppendIf(query, ignore_secondaries is not None,
("ignore_secondaries", ignore_secondaries))
_AppendIf(query, reboot_type, ("type", reboot_type))
_AppendIf(query, ignore_secondaries is not None,
("ignore_secondaries", ignore_secondaries))
- _AppendIf(query, reason_text, ("reason_text", reason_text))
+ _AppendIf(query, reason, ("reason", reason))
return self._SendRequest(HTTP_POST,
("/%s/instances/%s/reboot" %
(GANETI_RAPI_VERSION, instance)), query, None)
def ShutdownInstance(self, instance, dry_run=False, no_remember=False,
return self._SendRequest(HTTP_POST,
("/%s/instances/%s/reboot" %
(GANETI_RAPI_VERSION, instance)), query, None)
def ShutdownInstance(self, instance, dry_run=False, no_remember=False,
@param dry_run: whether to perform a dry run
@type no_remember: bool
@param no_remember: if true, will not record the state change
@param dry_run: whether to perform a dry run
@type no_remember: bool
@param no_remember: if true, will not record the state change
_AppendDryRunIf(query, dry_run)
_AppendIf(query, no_remember, ("no_remember", 1))
_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, body)
return self._SendRequest(HTTP_PUT,
("/%s/instances/%s/shutdown" %
(GANETI_RAPI_VERSION, instance)), query, body)
- def StartupInstance(self, instance, dry_run=False, no_remember=False):
+ def StartupInstance(self, instance, dry_run=False, no_remember=False,
+ reason=None):
@param dry_run: whether to perform a dry run
@type no_remember: bool
@param no_remember: if true, will not record the state change
@param dry_run: whether to perform a dry run
@type no_remember: bool
@param no_remember: if true, will not record the state change
query = []
_AppendDryRunIf(query, dry_run)
_AppendIf(query, no_remember, ("no_remember", 1))
query = []
_AppendDryRunIf(query, dry_run)
_AppendIf(query, no_remember, ("no_remember", 1))
return self._SendRequest(HTTP_PUT,
("/%s/instances/%s/startup" %
return self._SendRequest(HTTP_PUT,
("/%s/instances/%s/startup" %