def reloadConfig(self): # host configuration by main.ini and matched {subnet}.{ip}.ini self.config = configBuilder(self.appDir + os.sep + 'config') isMatched = self.config.buildHostConfig(getSubnet(), getIp()) if not isMatched: self.log('ERROR', 'Config for host not found, execution disabled.') sys.exit(1) self.log('INFO', 'Host ip: %s' % (getCurrentHostIp(),)) self.log('INFO', 'Matched config: %s' % (self.config.hostConfig,))
def appConfigure(self): self.app = application() self.app.setup() self.app.config = configBuilder(self.app.appDir + os.sep + "config") self.app.config.buildHostConfig(getSubnet(), getIp())