Revision 1f334d96 lib/rapi/client.py
b/lib/rapi/client.py | ||
---|---|---|
1068 | 1068 |
("/%s/nodes/%s/evacuate" % |
1069 | 1069 |
(GANETI_RAPI_VERSION, node)), query, None) |
1070 | 1070 |
|
1071 |
def MigrateNode(self, node, live=True, dry_run=False):
|
|
1071 |
def MigrateNode(self, node, mode=None, dry_run=False):
|
|
1072 | 1072 |
"""Migrates all primary instances from a node. |
1073 | 1073 |
|
1074 | 1074 |
@type node: str |
1075 | 1075 |
@param node: node to migrate |
1076 |
@type live: bool |
|
1077 |
@param live: whether to use live migration |
|
1076 |
@type mode: string |
|
1077 |
@param mode: if passed, it will overwrite the live migration type, |
|
1078 |
otherwise the hypervisor default will be used |
|
1078 | 1079 |
@type dry_run: bool |
1079 | 1080 |
@param dry_run: whether to perform a dry run |
1080 | 1081 |
|
... | ... | |
1083 | 1084 |
|
1084 | 1085 |
""" |
1085 | 1086 |
query = [] |
1086 |
if live:
|
|
1087 |
query.append(("live", 1))
|
|
1087 |
if mode is not None:
|
|
1088 |
query.append(("mode", mode))
|
|
1088 | 1089 |
if dry_run: |
1089 | 1090 |
query.append(("dry-run", 1)) |
1090 | 1091 |
|
Also available in: Unified diff