Beispiel #1
0
 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
Beispiel #2
0
 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
Beispiel #3
0
 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
Beispiel #4
0
 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
Beispiel #5
0
 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
Beispiel #6
0
 def _save_conf(self, smartd_conf):
     cfg_mgr().check_conf_dir()
     Config.to_file(self.conf_file, smartd_conf)
Beispiel #7
0
 def _save_conf(self, ftp_conf):
     cfg_mgr().check_conf_dir()
     Config.to_file(self.conf_file, ftp_conf)
Beispiel #8
0
 def _save_conf(self, mail_conf):
     cfg_mgr().check_conf_dir()
     Config.to_file(self.conf_file, mail_conf)
Beispiel #9
0
 def _save_conf(self, fs_dict):
     cfg_mgr().check_conf_dir()
     Config.to_file(self.conf_file, fs_dict)
Beispiel #10
0
 def _save_conf(self, zabbix_agent_conf):
     cfg_mgr().check_conf_dir()
     Config.to_file(self.conf_file, zabbix_agent_conf)
Beispiel #11
0
 def _save_conf(self, zabbix_agent_conf):
     cfg_mgr().check_conf_dir()
     Config.to_file(self.conf_file, zabbix_agent_conf)