Ejemplo n.º 1
0
 def reload_config(self, _):
     """Handle a request to reload configuration."""
     self.logger.info('request to reload configuration')
     new_config_file = os.getenv('FAUCET_CONFIG', self.config_file)
     if config_changed(self.config_file, new_config_file,
                       self.config_hashes):
         self.logger.info('configuration %s changed', new_config_file)
         self._load_configs(new_config_file)
     else:
         self.logger.info('configuration is unchanged, not reloading')
     # pylint: disable=no-member
     self.metrics.faucet_config_reload_requests.inc()
Ejemplo n.º 2
0
 def reload_config(self, _):
     """Handle a request to reload configuration."""
     self.logger.info('request to reload configuration')
     new_config_file = self.config_file
     if config_changed(self.config_file, new_config_file,
                       self.config_hashes):
         self.logger.info('configuration %s changed, analyzing differences',
                          new_config_file)
         self._load_configs(new_config_file)
     else:
         self.logger.info('configuration is unchanged, not reloading')
     self.metrics.faucet_config_reload_requests.inc()  # pylint: disable=no-member
Ejemplo n.º 3
0
 def content_changed(self, new_config_file):
     """Return True if config file content actually changed."""
     return config_changed(self.config_file, new_config_file,
                           self.config_hashes)
Ejemplo n.º 4
0
 def content_changed(self, new_config_file):
     """Return True if config file content actually changed."""
     return config_changed(self.config_file, new_config_file, self.config_hashes)