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)))
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)