def main(): """freezer-agent binary main execution""" backup_args = None try: freezer_config.config(args=sys.argv[1:]) freezer_config.setup_logging() backup_args = freezer_config.get_backup_args() if backup_args.config: # reload logging configuration to force oslo use the new log path if backup_args.log_config_append: CONF.set_override('log_config_append', backup_args.log_config_append) freezer_config.setup_logging() if len(sys.argv) < 2: CONF.print_help() sys.exit(1) freezer_main(backup_args) except Exception as err: quiet = backup_args.quiet if backup_args else False LOG.exception(err) LOG.critical("Run freezer agent process unsuccessfully") return fail(1, err, quiet)
def main(): """freezer-agent binary main execution""" backup_args = None try: freezer_config.config(args=sys.argv[1:]) freezer_config.setup_logging() backup_args = freezer_config.get_backup_args() if backup_args.config: # reload logging configuration to force oslo use the new log path if backup_args.log_config_append: CONF.set_override('log_config_append', backup_args.log_config_append) freezer_config.setup_logging() if len(sys.argv) < 2: CONF.print_help() sys.exit(1) freezer_main(backup_args) except Exception as err: quiet = backup_args.quiet if backup_args else False LOG.exception(err) LOG.critical("End freezer agent process unsuccessfully") return fail(1, err, quiet)
def setUp(self): if six.PY34: super().setUp() else: super(FreezerBaseTestCase, self).setUp() self._config_fixture = self.useFixture(cfg_fixture.Config()) config.config(args=[]) self.addCleanup(CONF.reset)
def main(): """freezer-agent/freezerc binary main execution""" try: freezer_config.config() freezer_config.setup_logging() backup_args = freezer_config.get_backup_args() if len(sys.argv) < 2: CONF.print_help() sys.exit(1) freezer_main(backup_args) except Exception as err: return fail(1, err, backup_args.quiet)
def main(): """freezer-agent binary main execution""" backup_args = None try: freezer_config.config() freezer_config.setup_logging() backup_args = freezer_config.get_backup_args() if len(sys.argv) < 2: CONF.print_help() sys.exit(1) freezer_main(backup_args) except Exception as err: quiet = backup_args.quiet if backup_args else False return fail(1, err, quiet)
def main(): """freezer-agent binary main execution""" backup_args = None try: freezer_config.config() freezer_config.setup_logging() backup_args = freezer_config.get_backup_args() if backup_args.config: # reload logging configuration to force oslo use the new log path freezer_config.setup_logging() if len(sys.argv) < 2: CONF.print_help() sys.exit(1) freezer_main(backup_args) except Exception as err: quiet = backup_args.quiet if backup_args else False return fail(1, err, quiet)
def setUp(self): super(FreezerBaseTestCase, self).setUp() self._config_fixture = self.useFixture(cfg_fixture.Config()) config.config(args=[]) self.addCleanup(CONF.reset)