Revision 42d4d8b9 lib/rapi/client.py
b/lib/rapi/client.py | ||
---|---|---|
1474 | 1474 |
("/%s/nodes/%s/role" % |
1475 | 1475 |
(GANETI_RAPI_VERSION, node)), query, role) |
1476 | 1476 |
|
1477 |
def PowercycleNode(self, node, force=False): |
|
1478 |
"""Powercycles a node. |
|
1479 |
|
|
1480 |
@type node: string |
|
1481 |
@param node: Node name |
|
1482 |
@type force: bool |
|
1483 |
@param force: Whether to force the operation |
|
1484 |
|
|
1485 |
@rtype: string |
|
1486 |
@return: job id |
|
1487 |
|
|
1488 |
""" |
|
1489 |
query = [ |
|
1490 |
("force", force), |
|
1491 |
] |
|
1492 |
|
|
1493 |
return self._SendRequest(HTTP_POST, |
|
1494 |
("/%s/nodes/%s/powercycle" % |
|
1495 |
(GANETI_RAPI_VERSION, node)), query, None) |
|
1496 |
|
|
1477 | 1497 |
def GetNodeStorageUnits(self, node, storage_type, output_fields): |
1478 | 1498 |
"""Gets the storage units for a node. |
1479 | 1499 |
|
Also available in: Unified diff