Revision 1d9f9df7 tools/cfgupgrade

b/tools/cfgupgrade
417 417
  ChangeInstanceIndices(config_data, "uuid", "name")
418 418

  
419 419

  
420
def DowngradeHvparams(config_data):
421
  """Downgrade the cluster's hypervisor parameters."""
422
  cluster = config_data["cluster"]
423
  if "hvparams" in cluster:
424
    hvparams = cluster["hvparams"]
425
    xen_params = None
426
    for xen_variant in [constants.HT_XEN_PVM, constants.HT_XEN_HVM]:
427
      if xen_variant in hvparams:
428
        xen_params = hvparams[xen_variant]
429
        # 'xen_cmd' was introduced in 2.9
430
        if constants.HV_XEN_CMD in xen_params:
431
          del xen_params[constants.HV_XEN_CMD]
432

  
433

  
420 434
def DowngradeAll(config_data):
421 435
  # Any code specific to a particular version should be labeled that way, so
422 436
  # it can be removed when updating to the next version.
......
425 439
  DowngradeInstances(config_data)
426 440
  DowngradeNodeIndices(config_data)
427 441
  DowngradeInstanceIndices(config_data)
442
  DowngradeHvparams(config_data)
428 443

  
429 444

  
430 445
def main():

Also available in: Unified diff