Revision effc1b86 tools/cfgupgrade

b/tools/cfgupgrade
44 44
from ganeti import netutils
45 45
from ganeti import pathutils
46 46

  
47
from ganeti.utils import version
48

  
47 49

  
48 50
options = None
49 51
args = None
......
347 349

  
348 350

  
349 351
def UpgradeAll(config_data):
350
  config_data["version"] = constants.BuildVersion(TARGET_MAJOR,
351
                                                  TARGET_MINOR, 0)
352
  config_data["version"] = version.BuildVersion(TARGET_MAJOR, TARGET_MINOR, 0)
352 353
  UpgradeRapiUsers()
353 354
  UpgradeWatcher()
354 355
  UpgradeFileStoragePaths(config_data)
......
379 380
def DowngradeAll(config_data):
380 381
  # Any code specific to a particular version should be labeled that way, so
381 382
  # it can be removed when updating to the next version.
382
  config_data["version"] = constants.BuildVersion(DOWNGRADE_MAJOR,
383
                                                  DOWNGRADE_MINOR, 0)
383
  config_data["version"] = version.BuildVersion(DOWNGRADE_MAJOR,
384
                                                DOWNGRADE_MINOR, 0)
384 385
  DowngradeInstances(config_data)
385 386

  
386 387

  
......
482 483
    raise Error("Unable to determine configuration version")
483 484

  
484 485
  (config_major, config_minor, config_revision) = \
485
    constants.SplitVersion(config_version)
486
    version.SplitVersion(config_version)
486 487

  
487 488
  logging.info("Found configuration version %s (%d.%d.%d)",
488 489
               config_version, config_major, config_minor, config_revision)

Also available in: Unified diff