Beispiel #1
0
    def run(self):
        qinling_endpoint = keystone_utils.get_qinling_endpoint()
        orchestrator = orchestra_base.load_orchestrator(CONF, qinling_endpoint)
        db_api.setup_db()

        topic = CONF.engine.topic
        server = CONF.engine.host
        transport = messaging.get_rpc_transport(CONF)
        target = messaging.Target(topic=topic, server=server, fanout=False)
        endpoint = engine.DefaultEngine(orchestrator, qinling_endpoint)
        access_policy = dispatcher.DefaultRPCAccessPolicy
        self.server = messaging.get_rpc_server(
            transport,
            target, [endpoint],
            executor='threading',
            access_policy=access_policy,
            serializer=rpc.ContextSerializer(
                messaging.serializer.JsonPayloadSerializer()))

        LOG.info('Starting function mapping periodic task...')
        periodics.start_function_mapping_handler(endpoint)

        LOG.info('Starting engine...')
        self.server.start()
Beispiel #2
0
    def __init__(self, *args, **kwargs):
        self.type = 'webhook'
        self.engine_client = rpc.get_engine_client()
        self.qinling_endpoint = keystone_utils.get_qinling_endpoint()

        super(WebhooksController, self).__init__(*args, **kwargs)