Update config version number when downgrading
[ganeti-local] / tools / sanitize-config
index ca9c955..d70204a 100755 (executable)
@@ -19,7 +19,7 @@
 # 02110-1301, USA.
 
 
-# pylint: disable-msg=C0103
+# pylint: disable=C0103
 
 """Tool to sanitize/randomize the configuration file.
 
@@ -33,6 +33,7 @@ import optparse
 from ganeti import constants
 from ganeti import serializer
 from ganeti import utils
+from ganeti import pathutils
 from ganeti import cli
 from ganeti.cli import cli_option
 
@@ -40,8 +41,8 @@ from ganeti.cli import cli_option
 OPTS = [
   cli.VERBOSE_OPT,
   cli_option("--path", help="Convert this configuration file"
-             " instead of '%s'" % constants.CLUSTER_CONF_FILE,
-             default=constants.CLUSTER_CONF_FILE, dest="CONFIG_DATA_PATH"),
+             " instead of '%s'" % pathutils.CLUSTER_CONF_FILE,
+             default=pathutils.CLUSTER_CONF_FILE, dest="CONFIG_DATA_PATH"),
   cli_option("--sanitize-names", default="yes", type="bool",
              help="Randomize the cluster, node and instance names [yes]"),
   cli_option("--sanitize-ips", default="yes", type="bool",
@@ -79,7 +80,7 @@ def GenerateNameMap(opts, names, base):
   return name_map
 
 
-def SanitizeSecrets(opts, cfg): # pylint: disable-msg=W0613
+def SanitizeSecrets(opts, cfg): # pylint: disable=W0613
   """Cleanup configuration secrets.
 
   """
@@ -126,7 +127,7 @@ def SanitizeInstances(opts, cfg):
   RenameDictKeys(cfg["instances"], old_map, True)
 
 
-def SanitizeIps(opts, cfg): # pylint: disable-msg=W0613
+def SanitizeIps(opts, cfg): # pylint: disable=W0613
   """Sanitize the IP names.
 
   @note: we're interested in obscuring the old IPs, not in generating
@@ -161,7 +162,7 @@ def SanitizeIps(opts, cfg): # pylint: disable-msg=W0613
         nic["ip"] = _Get(nic["ip"])
 
 
-def SanitizeOsNames(opts, cfg): # pylint: disable-msg=W0613
+def SanitizeOsNames(opts, cfg): # pylint: disable=W0613
   """Sanitize the OS names.
 
   """
@@ -182,7 +183,7 @@ def SanitizeOsNames(opts, cfg): # pylint: disable-msg=W0613
     RenameDictKeys(cfg["cluster"]["os_hvp"], os_map, False)
 
 
-def SanitizeDisks(opts, cfg): # pylint: disable-msg=W0613
+def SanitizeDisks(opts, cfg): # pylint: disable=W0613
   """Cleanup disks disks.
 
   """