Revision 2827d1ac tools/cfgupgrade

b/tools/cfgupgrade
284 284
      DowngradeIPolicy(ipolicy)
285 285

  
286 286

  
287
def DowngradeStorageTypes(cluster):
288
  # Remove storage types to downgrade to 2.7
289
  if "enabled_storage_types" in cluster:
290
    logging.warning("Removing cluster storage types; value = %s",
291
                    utils.CommaJoin(cluster["enabled_storage_types"]))
292
    del cluster["enabled_storage_types"]
287
def DowngradeEnabledTemplates(cluster):
288
  # Remove enabled disk templates to downgrade to 2.7
289
  edt_key = "enabled_disk_templates"
290
  if edt_key in cluster:
291
    logging.warning("Removing cluster's enabled disk templates; value = %s",
292
                    utils.CommaJoin(cluster[edt_key]))
293
    del cluster[edt_key]
293 294

  
294 295

  
295 296
def DowngradeCluster(config_data):
296 297
  cluster = config_data.get("cluster", None)
297 298
  if cluster is None:
298 299
    raise Error("Cannot find cluster")
299
  DowngradeStorageTypes(cluster)
300
  DowngradeEnabledTemplates(cluster)
300 301
  ipolicy = cluster.get("ipolicy", None)
301 302
  if ipolicy:
302 303
    DowngradeIPolicy(ipolicy)

Also available in: Unified diff