def setUp(self):
        super(TestFwaasL3AgentRpcCallback, self).setUp()

        self.conf = cfg.ConfigOpts()
        self.conf.register_opts(base_config.core_opts)
        self.conf.register_opts(l3_config.OPTS)
        self.conf.register_opts(ha.OPTS)
        agent_config.register_use_namespaces_opts_helper(self.conf)
        self.conf.register_opts(firewall_agent_api.FWaaSOpts, 'fwaas')
        self.api = FWaasAgent(self.conf)
        self.api.fwaas_driver = test_firewall_agent_api.NoopFwaasDriver()
        self.adminContext = context.get_admin_context()
        self.router_id = str(uuid.uuid4())
        self.agent_conf = mock.Mock()
        self.agent_conf.use_namespaces = True
        self.ri_kwargs = {'router': {'id': self.router_id,
                                     'tenant_id': str(uuid.uuid4())},
                          'agent_conf': self.agent_conf,
                          'interface_driver': mock.ANY,
                          'use_ipv6': mock.ANY,
                          }
Exemplo n.º 2
0
    def setUp(self):
        super(TestFwaasL3AgentRpcCallback, self).setUp()

        self.conf = cfg.ConfigOpts()
        self.conf.register_opts(base_config.core_opts)
        self.conf.register_opts(l3_config.OPTS)
        self.conf.register_opts(firewall_agent_api.FWaaSOpts, 'fwaas')
        self.api = FWaasAgent(host=None, conf=self.conf)
        self.api.fwaas_driver = test_firewall_agent_api.NoopFwaasDriver()
        self.adminContext = context.get_admin_context()
        self.router_id = uuidutils.generate_uuid()
        self.agent_conf = mock.Mock()
        # For 'tenant_id' and 'project_id' keys
        project_id = uuidutils.generate_uuid()
        self.ri_kwargs = {'router': {'id': self.router_id,
                                     'tenant_id': project_id,
                                     'project_id': project_id},
                          'agent_conf': self.agent_conf,
                          'interface_driver': mock.ANY,
                          'use_ipv6': mock.ANY,
                          }