def prepare_service(argv=None): """Sets global config from config file and sets up logging.""" argv = argv or [] config_options.init(argv[1:]) log.set_defaults() config_options.setup_logging(cfg.CONF) rpc.init()
def prepare_service(argv=None): """Sets global config from config file and sets up logging.""" argv = argv or [] config.init(argv[1:]) log.set_defaults() config.setup_logging(cfg.CONF) rpc.init()
def setUp(self): super(TestRpc, self).setUp() self.addCleanup(rpc.cleanup) self.messaging_conf = messaging_conffixture.ConfFixture(cfg.CONF) self.messaging_conf.transport_url = 'fake:/' self.useFixture(self.messaging_conf) self.useFixture(fixtures.MonkeyPatch( 'octavia.common.rpc.create_transport', self._fake_create_transport)) with mock.patch('octavia.common.rpc.get_transport_url') as mock_gtu: mock_gtu.return_value = None rpc.init()
def _prepare_service(argv=None): argv = sys.argv or [] config.init(argv[1:]) logging.set_defaults() config.setup_logging(cfg.CONF) rpc.init()