Revision 6906a9d8 lib/backend.py
b/lib/backend.py | ||
---|---|---|
973 | 973 |
return True |
974 | 974 |
|
975 | 975 |
|
976 |
def MigrationInfo(instance): |
|
977 |
"""Gather information about an instance to be migrated. |
|
978 |
|
|
979 |
@type instance: L{objects.Instance} |
|
980 |
@param instance: the instance definition |
|
981 |
|
|
982 |
""" |
|
983 |
return (True, '') |
|
984 |
|
|
985 |
|
|
986 |
def AcceptInstance(instance, info, target): |
|
987 |
"""Prepare the node to accept an instance. |
|
988 |
|
|
989 |
@type instance: L{objects.Instance} |
|
990 |
@param instance: the instance definition |
|
991 |
@type info: string/data (opaque) |
|
992 |
@param info: migration information, from the source node |
|
993 |
@type target: string |
|
994 |
@param target: target host (usually ip), on this node |
|
995 |
|
|
996 |
""" |
|
997 |
return (True, "Accept successfull") |
|
998 |
|
|
999 |
|
|
1000 |
def FinalizeMigration(instance, info, success): |
|
1001 |
"""Finalize any preparation to accept an instance. |
|
1002 |
|
|
1003 |
@type instance: L{objects.Instance} |
|
1004 |
@param instance: the instance definition |
|
1005 |
@type info: string/data (opaque) |
|
1006 |
@param info: migration information, from the source node |
|
1007 |
@type success: boolean |
|
1008 |
@param success: whether the migration was a success or a failure |
|
1009 |
|
|
1010 |
""" |
|
1011 |
return (True, "Migration Finalized") |
|
1012 |
|
|
1013 |
|
|
976 | 1014 |
def MigrateInstance(instance, target, live): |
977 | 1015 |
"""Migrates an instance to another node. |
978 | 1016 |
|
Also available in: Unified diff