Revision 69c88fb1 lib/opcodes.py

b/lib/opcodes.py
184 184
  ("target_groups", None, ht.TMaybeListOf(ht.TNonEmptyString),
185 185
   "Destination group names or UUIDs (defaults to \"all but current group\")")
186 186

  
187
# The reason for a state change of an instance
188
_PReason = \
189
  ("reason", (constants.INSTANCE_REASON_SOURCE_UNKNOWN, None),
190
   ht.TAnd(ht.TIsLength(2),
191
           ht.TItems([
192
             ht.TElemOf(constants.INSTANCE_REASON_SOURCES),
193
             ht.TMaybeString,
194
           ])),
195
   "The reason why the reboot is happening")
196

  
187 197
#: OP_ID conversion regular expression
188 198
_OPID_RE = re.compile("([a-z])([A-Z])")
189 199

  
......
1451 1461
     "Whether to start the instance even if secondary disks are failing"),
1452 1462
    ("reboot_type", ht.NoDefault, ht.TElemOf(constants.REBOOT_TYPES),
1453 1463
     "How to reboot instance"),
1454
    ("reason", (constants.INSTANCE_REASON_SOURCE_UNKNOWN, None),
1455
     ht.TAnd(ht.TIsLength(2),
1456
             ht.TItems([
1457
               ht.TElemOf(constants.INSTANCE_REASON_SOURCES),
1458
               ht.TMaybeString,
1459
             ])),
1460
     "The reason why the reboot is happening"),
1464
    _PReason,
1461 1465
    ]
1462 1466
  OP_RESULT = ht.TNone
1463 1467

  

Also available in: Unified diff