from ganeti import uidpool
from ganeti import netutils
from ganeti import runtime
+from ganeti import pathutils
_config_lock = locking.SharedLock("ConfigWriter")
self._config_data = None
self._offline = offline
if cfg_file is None:
- self._cfg_file = constants.CLUSTER_CONF_FILE
+ self._cfg_file = pathutils.CLUSTER_CONF_FILE
else:
self._cfg_file = cfg_file
self._getents = _getents
"""Check if the cluster is configured.
"""
- return os.path.exists(constants.CLUSTER_CONF_FILE)
+ return os.path.exists(pathutils.CLUSTER_CONF_FILE)
def _GenerateOneMAC(self):
"""Generate one mac address
if target is None:
if len(self._config_data.nodegroups) != 1:
raise errors.OpPrereqError("More than one node group exists. Target"
- " group must be specified explicitely.")
+ " group must be specified explicitly.")
else:
return self._config_data.nodegroups.keys()[0]
if target in self._config_data.nodegroups: