Esempio n. 1
0
 def setUp(self):
     cfg.CONF.set_override(
         'service_plugins',
         ['neutron.services.l3_router.l3_router_plugin.L3RouterPlugin'])
     super(TestRouterController, self).setUp()
     plugin = manager.NeutronManager.get_plugin()
     ctx = context.get_admin_context()
     service_plugins = manager.NeutronManager.get_service_plugins()
     l3_plugin = service_plugins[constants.L3_ROUTER_NAT]
     network_id = pecan_utils.create_network(ctx, plugin)['id']
     self.subnet = pecan_utils.create_subnet(ctx, plugin, network_id)
     self.router = pecan_utils.create_router(ctx, l3_plugin)
Esempio n. 2
0
 def setUp(self):
     cfg.CONF.set_override(
         'service_plugins',
         ['neutron.services.l3_router.l3_router_plugin.L3RouterPlugin',
          'neutron.services.flavors.flavors_plugin.FlavorsPlugin'])
     super(TestRouterController, self).setUp()
     plugin = directory.get_plugin()
     ctx = context.get_admin_context()
     l3_plugin = directory.get_plugin(n_const.L3)
     network_id = pecan_utils.create_network(ctx, plugin)['id']
     self.subnet = pecan_utils.create_subnet(ctx, plugin, network_id)
     self.router = pecan_utils.create_router(ctx, l3_plugin)
Esempio n. 3
0
 def setUp(self):
     cfg.CONF.set_override(
         'service_plugins',
         ['neutron.services.l3_router.l3_router_plugin.L3RouterPlugin'])
     super(TestRouterController, self).setUp()
     plugin = manager.NeutronManager.get_plugin()
     ctx = context.get_admin_context()
     service_plugins = manager.NeutronManager.get_service_plugins()
     l3_plugin = service_plugins[constants.L3_ROUTER_NAT]
     network_id = pecan_utils.create_network(ctx, plugin)['id']
     self.subnet = pecan_utils.create_subnet(ctx, plugin, network_id)
     self.router = pecan_utils.create_router(ctx, l3_plugin)
Esempio n. 4
0
 def setUp(self):
     cfg.CONF.set_override(
         'service_plugins',
         ['neutron.services.l3_router.l3_router_plugin.L3RouterPlugin',
          'neutron.services.flavors.flavors_plugin.FlavorsPlugin'])
     super(TestRouterController, self).setUp()
     plugin = directory.get_plugin()
     ctx = context.get_admin_context()
     l3_plugin = directory.get_plugin(n_const.L3)
     network_id = pecan_utils.create_network(ctx, plugin)['id']
     self.subnet = pecan_utils.create_subnet(ctx, plugin, network_id)
     self.router = pecan_utils.create_router(ctx, l3_plugin)
Esempio n. 5
0
 def setUp(self):
     cfg.CONF.set_override(
         'service_plugins',
         ['neutron.services.l3_router.l3_router_plugin.L3RouterPlugin',
          'neutron.services.flavors.flavors_plugin.FlavorsPlugin'])
     super(TestL3AgentShimControllers, self).setUp()
     policy.init()
     policy._ENFORCER.set_rules(
         oslo_policy.Rules.from_dict(
             {'get_l3-agents': 'role:admin',
              'get_l3-routers': 'role:admin'}),
         overwrite=False)
     ctx = context.get_admin_context()
     l3_plugin = directory.get_plugin(n_const.L3)
     self.router = pecan_utils.create_router(ctx, l3_plugin)
     self.agent = helpers.register_l3_agent()
     # NOTE(blogan): Not sending notifications because this test is for
     # testing the shim controllers
     l3_plugin.agent_notifiers[n_const.AGENT_TYPE_L3] = None
Esempio n. 6
0
 def setUp(self):
     cfg.CONF.set_override(
         'service_plugins',
         ['neutron.services.l3_router.l3_router_plugin.L3RouterPlugin'])
     super(TestL3AgentShimControllers, self).setUp()
     policy.init()
     policy._ENFORCER.set_rules(
         oslo_policy.Rules.from_dict(
             {'get_l3-agents': 'role:admin',
              'get_l3-routers': 'role:admin'}),
         overwrite=False)
     ctx = context.get_admin_context()
     service_plugins = manager.NeutronManager.get_service_plugins()
     l3_plugin = service_plugins[constants.L3_ROUTER_NAT]
     self.router = pecan_utils.create_router(ctx, l3_plugin)
     self.agent = helpers.register_l3_agent()
     # NOTE(blogan): Not sending notifications because this test is for
     # testing the shim controllers
     l3_plugin.agent_notifiers[n_const.AGENT_TYPE_L3] = None