Revision e1f23243 lib/opcodes.py

b/lib/opcodes.py
112 112
_PQueryWhat = ("what", ht.NoDefault, ht.TElemOf(constants.QR_VIA_OP),
113 113
               "Resource(s) to query for")
114 114

  
115
_PEarlyRelease = ("early_release", False, ht.TBool,
116
                  "Whether to release locks as soon as possible")
117

  
115 118
_PIpCheckDoc = "Whether to ensure instance's IP address is inactive"
116 119

  
117 120
#: Do not remember instance state changes
......
894 897
    ]
895 898

  
896 899

  
900
class OpNodeEvacuate(OpCode):
901
  """Evacuate instances off a number of nodes."""
902
  OP_DSC_FIELD = "node_name"
903
  OP_PARAMS = [
904
    _PEarlyRelease,
905
    _PNodeName,
906
    ("remote_node", None, ht.TMaybeString, "New secondary node"),
907
    ("iallocator", None, ht.TMaybeString, "Iallocator for computing solution"),
908
    ("mode", ht.NoDefault, ht.TElemOf(constants.IALLOCATOR_NEVAC_MODES),
909
     "Node evacuation mode"),
910
    ]
911

  
912

  
897 913
# instance opcodes
898 914

  
899 915
class OpInstanceCreate(OpCode):
......
1045 1061
  OP_DSC_FIELD = "instance_name"
1046 1062
  OP_PARAMS = [
1047 1063
    _PInstanceName,
1064
    _PEarlyRelease,
1048 1065
    ("mode", ht.NoDefault, ht.TElemOf(constants.REPLACE_MODES),
1049 1066
     "Replacement mode"),
1050 1067
    ("disks", ht.EmptyList, ht.TListOf(ht.TPositiveInt),
......
1052 1069
    ("remote_node", None, ht.TMaybeString, "New secondary node"),
1053 1070
    ("iallocator", None, ht.TMaybeString,
1054 1071
     "Iallocator for deciding new secondary node"),
1055
    ("early_release", False, ht.TBool,
1056
     "Whether to release locks as soon as possible"),
1057 1072
    ]
1058 1073

  
1059 1074

  

Also available in: Unified diff