From: Jenkins Date: Mon, 30 Mar 2015 23:49:29 +0000 (+0000) Subject: Merge "Move final remnants of router processing to router classes" X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=c4f59fe0f5ec3cb8736dfcdefb71106802eae2c2;p=openstack-build%2Fneutron-build.git Merge "Move final remnants of router processing to router classes" --- c4f59fe0f5ec3cb8736dfcdefb71106802eae2c2 diff --cc neutron/tests/functional/agent/test_l3_agent.py index 9671a17de,07d435b0d..3f990563b --- a/neutron/tests/functional/agent/test_l3_agent.py +++ b/neutron/tests/functional/agent/test_l3_agent.py @@@ -429,17 -418,10 +429,17 @@@ class L3AgentTestCase(L3AgentTestFramew existing_fip = '19.4.4.2' new_fip = '19.4.4.3' self._add_fip(router, new_fip) - router.router['gw_port']['subnet']['gateway_ip'] = '19.4.4.5' - router.router['gw_port']['fixed_ips'][0]['ip_address'] = '19.4.4.10' + subnet_id = _uuid() + fixed_ips = [{'ip_address': '19.4.4.10', + 'prefixlen': 24, + 'subnet_id': subnet_id}] + subnets = [{'id': subnet_id, + 'cidr': '19.4.4.0/24', + 'gateway_ip': '19.4.4.5'}] + router.router['gw_port']['subnets'] = subnets + router.router['gw_port']['fixed_ips'] = fixed_ips - self.agent.process_router(router) + router.process(self.agent) # Get the updated configuration and assert that both FIPs are in, # and that the GW IP address was updated. diff --cc neutron/tests/unit/test_l3_agent.py index 6e233845a,0c0c7bb21..ae71eb355 --- a/neutron/tests/unit/test_l3_agent.py +++ b/neutron/tests/unit/test_l3_agent.py @@@ -1157,13 -1039,13 +1157,13 @@@ class TestBasicRouterOperations(BasicRo router_append_interface(router) # Reassign the router object to RouterInfo ri.router = router - agent.process_router(ri) - # send_arp is called both times process_router is called + ri.process(agent) + # send_arp is called both times process is called self.assertEqual(self.send_arp.call_count, 2) - def test_process_ipv6_only_gw(self): + def _test_process_ipv6_only_or_dual_stack_gw(self, dual_stack=False): agent = l3_agent.L3NATAgent(HOSTNAME, self.conf) - router = prepare_router_data(ip_version=6) + router = prepare_router_data(ip_version=6, dual_stack=dual_stack) # Get NAT rules without the gw_port gw_port = router['gw_port'] router['gw_port'] = None