Revision e0ac6ce6 lib/rapi/client.py
b/lib/rapi/client.py | ||
---|---|---|
931 | 931 |
("/%s/instances/%s/export" % |
932 | 932 |
(GANETI_RAPI_VERSION, instance)), None, body) |
933 | 933 |
|
934 |
def MigrateInstance(self, instance, mode=None, cleanup=None): |
|
935 |
"""Starts up an instance. |
|
936 |
|
|
937 |
@type instance: string |
|
938 |
@param instance: Instance name |
|
939 |
@type mode: string |
|
940 |
@param mode: Migration mode |
|
941 |
@type cleanup: bool |
|
942 |
@param cleanup: Whether to clean up a previously failed migration |
|
943 |
|
|
944 |
""" |
|
945 |
body = {} |
|
946 |
|
|
947 |
if mode is not None: |
|
948 |
body["mode"] = mode |
|
949 |
|
|
950 |
if cleanup is not None: |
|
951 |
body["cleanup"] = cleanup |
|
952 |
|
|
953 |
return self._SendRequest(HTTP_PUT, |
|
954 |
("/%s/instances/%s/migrate" % |
|
955 |
(GANETI_RAPI_VERSION, instance)), None, body) |
|
956 |
|
|
934 | 957 |
def GetJobs(self): |
935 | 958 |
"""Gets all jobs for the cluster. |
936 | 959 |
|
Also available in: Unified diff