def _load_conf(self): smartd_conf = {} cfg_mgr().check_conf_dir() if os.path.exists(self.conf_file): smartd_conf = \ Config.from_file(self.conf_file, self.smartd_conf_schema).conf else: smartd_conf = self.smartd_conf_schema.validate(smartd_conf) return smartd_conf
def _load_conf(self): ftp_conf = {} cfg_mgr().check_conf_dir() if os.path.exists(self.conf_file): ftp_conf = \ Config.from_file(self.conf_file, self.ftp_conf_schema).conf else: ftp_conf = self.ftp_conf_schema.validate(ftp_conf) return ftp_conf
def _load_conf(self): zabbix_agent_conf = {} cfg_mgr().check_conf_dir() if os.path.exists(self.conf_file): zabbix_agent_conf = \ Config.from_file(self.conf_file, self.zabbix_agentd_conf_schema).conf else: zabbix_agent_conf = self.zabbix_agentd_conf_schema.validate(zabbix_agent_conf) return zabbix_agent_conf
def _load_conf(self): zabbix_agent_conf = {} cfg_mgr().check_conf_dir() if os.path.exists(self.conf_file): zabbix_agent_conf = \ Config.from_file(self.conf_file, self.zabbix_agentd_conf_schema).conf else: zabbix_agent_conf = self.zabbix_agentd_conf_schema.validate( zabbix_agent_conf) return zabbix_agent_conf
def _load_conf(self): fs_dict = {} cfg_mgr().check_conf_dir() if os.path.exists(self.conf_file): fs_dict = \ Config.from_file(self.conf_file, self.fs_dict_schema).conf # check dev_file by uuid for fs_name, fs_conf in fs_dict.items(): if fs_conf["dev_uuid"] != "": fs_conf["dev_file"] = self._uuid_to_dev_file(fs_conf["dev_uuid"]) return fs_dict
def _save_conf(self, smartd_conf): cfg_mgr().check_conf_dir() Config.to_file(self.conf_file, smartd_conf)
def _save_conf(self, ftp_conf): cfg_mgr().check_conf_dir() Config.to_file(self.conf_file, ftp_conf)
def _save_conf(self, mail_conf): cfg_mgr().check_conf_dir() Config.to_file(self.conf_file, mail_conf)
def _save_conf(self, fs_dict): cfg_mgr().check_conf_dir() Config.to_file(self.conf_file, fs_dict)
def _save_conf(self, zabbix_agent_conf): cfg_mgr().check_conf_dir() Config.to_file(self.conf_file, zabbix_agent_conf)