Ejemplo n.º 1
0
 def run(self):
     LOG.info('Starting V2 consumer...')
     target = messaging.Target(topic=self.topic, server=self.server,
                               fanout=False)
     self.endpoints = [endpoints.Endpoints()]
     self.message_listener = rpc.get_server(
         target, self.endpoints,
         executor='threading',
         access_policy=self.access_policy
     )
     self.message_listener.start()
Ejemplo n.º 2
0
    def setUp(self):
        super(TestEndpoints, self).setUp()

        conf = self.useFixture(oslo_fixture.Config(cfg.CONF))
        conf.config(octavia_plugins='hot_plug_plugin')

        mock_class = mock.create_autospec(controller_worker.ControllerWorker)
        self.worker_patcher = mock.patch('octavia.controller.queue.v2.'
                                         'endpoints.stevedore_driver')
        self.worker_patcher.start().ControllerWorker = mock_class

        self.ep = endpoints.Endpoints()
        self.context = {}
        self.resource_updates = {}
        self.resource_id = 1234
        self.server_group_id = 3456
        self.flavor_id = uuidutils.generate_uuid()
Ejemplo n.º 3
0
 def run(self):
     LOG.info('Starting V2 consumer...')
     target = messaging.Target(topic=self.topic,
                               server=self.server,
                               fanout=False)
     self.endpoints = [endpoints.Endpoints()]
     self.message_listener = rpc.get_server(
         target,
         self.endpoints,
         executor='threading',
         access_policy=self.access_policy)
     self.message_listener.start()
     if constants.AMPHORAV2 in CONF.api_settings.enabled_provider_drivers:
         for e in self.endpoints:
             e.worker.services_controller.run_conductor(
                 'octavia-task-flow-conductor-%s' %
                 uuidutils.generate_uuid())
Ejemplo n.º 4
0
    def setUp(self):
        super(TestEndpoints, self).setUp()

        conf = self.useFixture(oslo_fixture.Config(cfg.CONF))
        conf.config(octavia_plugins='hot_plug_plugin')

        self.worker_patcher = mock.patch('octavia.controller.worker.v2.'
                                         'controller_worker.ControllerWorker')
        self.worker_patcher.start()

        self.ep = endpoints.Endpoints()
        self.context = {}
        self.resource_updates = {}
        self.resource_id = 1234
        self.resource = {constants.ID: self.resource_id}
        self.server_group_id = 3456
        self.listener_dict = {constants.ID: uuidutils.generate_uuid()}
        self.flavor_id = uuidutils.generate_uuid()
        self.availability_zone = uuidutils.generate_uuid()