예제 #1
0
 def _get_config_as_dict():
     config_file = Util.defaultConfigFile
     try:
         return ConfigHolder.configFileToDictWithFormattedKeys(config_file)
     except Exception as ex:
         raise Exception('Failed to get persistent_disk_ip parameter '
                         'from %s: %s' % (config_file, str(ex)))
예제 #2
0
 def _initFromConfig(self, conf_filename=''):
     config = ConfigHolder.configFileToDictWithFormattedKeys(
         conf_filename or defaultConfigFile)
     options = PDiskEndpoint.options()
     self.configHolder = ConfigHolder(options, config)
     self.configHolder.set('pdiskEndpoint', self._createPdiskEndpoint())
     self.configHolder.set('verboseLevel', self.DEFAULT_VERBOSE_LEVEL)
     self.configHolder.assign(self)