Revision 55cec070 lib/rapi/client.py
b/lib/rapi/client.py | ||
---|---|---|
1001 | 1001 |
(GANETI_RAPI_VERSION, instance)), query, None) |
1002 | 1002 |
|
1003 | 1003 |
def RebootInstance(self, instance, reboot_type=None, ignore_secondaries=None, |
1004 |
dry_run=False): |
|
1004 |
dry_run=False, reason=None):
|
|
1005 | 1005 |
"""Reboots an instance. |
1006 | 1006 |
|
1007 | 1007 |
@type instance: str |
... | ... | |
1013 | 1013 |
while re-assembling disks (in hard-reboot mode only) |
1014 | 1014 |
@type dry_run: bool |
1015 | 1015 |
@param dry_run: whether to perform a dry run |
1016 |
@type reason: string |
|
1017 |
@param reason: the reason for the reboot |
|
1016 | 1018 |
@rtype: string |
1017 | 1019 |
@return: job id |
1018 | 1020 |
|
... | ... | |
1022 | 1024 |
_AppendIf(query, reboot_type, ("type", reboot_type)) |
1023 | 1025 |
_AppendIf(query, ignore_secondaries is not None, |
1024 | 1026 |
("ignore_secondaries", ignore_secondaries)) |
1027 |
_AppendIf(query, reason, ("reason", reason)) |
|
1025 | 1028 |
|
1026 | 1029 |
return self._SendRequest(HTTP_POST, |
1027 | 1030 |
("/%s/instances/%s/reboot" % |
Also available in: Unified diff