'Create some \'modules\' from all nagios parameters if they are set and
the modules are not created'

def hack_old_nagios_parameters(self):

    mod_to_add = []
    mod_to_add_to_schedulers = []
    if (hasattr(self, 'status_file') and (self.status_file != '') and hasattr(self, 'object_cache_file')):
        got_status_dat_module = self.got_broker_module_type_defined('status_dat')
        if (not got_status_dat_module):
            data = {'object_cache_file': self.object_cache_file, 'status_file': self.status_file, 'module_name': 'Status-Dat-Autogenerated', 'module_type': 'status_dat'}
            mod = Module(data)
            mod.status_update_interval = getattr(self, 'status_update_interval', 15)
            mod_to_add.append(mod)
    if (hasattr(self, 'log_file') and (self.log_file != '')):
        got_simple_log_module = self.got_broker_module_type_defined('simple_log')
        if (not got_simple_log_module):
            data = {'module_type': 'simple_log', 'path': self.log_file, 'archive_path': self.log_archive_path, 'module_name': 'Simple-log-Autogenerated'}
            mod = Module(data)
            mod_to_add.append(mod)
    if self.use_syslog:
        got_syslog_module = self.got_broker_module_type_defined('syslog')
        if (not got_syslog_module):
            data = {'module_type': 'syslog', 'module_name': 'Syslog-Autogenerated'}
            mod = Module(data)
            mod_to_add.append(mod)
    if (self.service_perfdata_file != ''):
        got_service_perfdata_module = self.got_broker_module_type_defined('service_perfdata')
        if (not got_service_perfdata_module):
            data = {'module_type': 'service_perfdata', 'module_name': 'Service-Perfdata-Autogenerated', 'path': self.service_perfdata_file, 'mode': self.service_perfdata_file_mode, 'template': self.service_perfdata_file_template}
            mod = Module(data)
            mod_to_add.append(mod)
    if ((self.state_retention_file != '') and (self.retention_update_interval != 0)):
        got_retention_file_module = self.got_scheduler_module_type_defined('nagios_retention_file')
        if (not got_retention_file_module):
            data = {'module_type': 'nagios_retention_file', 'module_name': 'Nagios-Retention-File-Autogenerated', 'path': self.state_retention_file}
            mod = Module(data)
            mod_to_add_to_schedulers.append(mod)
    if (self.host_perfdata_file != ''):
        got_host_perfdata_module = self.got_broker_module_type_defined('host_perfdata')
        if (not got_host_perfdata_module):
            data = {'module_type': 'host_perfdata', 'module_name': 'Host-Perfdata-Autogenerated', 'path': self.host_perfdata_file, 'mode': self.host_perfdata_file_mode, 'template': self.host_perfdata_file_template}
            mod = Module(data)
            mod_to_add.append(mod)
    if (mod_to_add != []):
        logger.warning('I    autogenerated    some    Broker    modules,    please    look    at    your    configuration')
        for m in mod_to_add:
            logger.warning('The    module    %s    is    autogenerated', m.module_name)
            for b in self.brokers:
                b.modules.append(m)
    if (mod_to_add_to_schedulers != []):
        logger.warning('I    autogenerated    some    Scheduler    modules,    please    look    at    your    configuration')
        for m in mod_to_add_to_schedulers:
            logger.warning('The    module    %s    is    autogenerated', m.module_name)
            for b in self.schedulers:
                b.modules.append(m)
