Merge "Fix L3AgentSchedulerTestJSON failure for dvr routers"

This commit is contained in:
Jenkins 2015-06-11 12:54:18 +00:00 committed by Gerrit Code Review
commit 4209ecfa60

View File

@ -72,15 +72,22 @@ class L3AgentSchedulerTestJSON(base.BaseAdminNetworkTest):
# query and setup steps are only required if the extension is available
# and only if the router's default type is distributed.
if test.is_extension_enabled('dvr', 'network'):
is_dvr_router = cls.admin_client.show_router(
cls.is_dvr_router = cls.admin_client.show_router(
cls.router['id'])['router'].get('distributed', False)
if is_dvr_router:
if cls.is_dvr_router:
cls.network = cls.create_network()
cls.create_subnet(cls.network)
cls.subnet = cls.create_subnet(cls.network)
cls.port = cls.create_port(cls.network)
cls.client.add_router_interface_with_port_id(
cls.router['id'], cls.port['id'])
@classmethod
def resource_cleanup(cls):
if cls.is_dvr_router:
cls.client.remove_router_interface_with_port_id(
cls.router['id'], cls.port['id'])
super(L3AgentSchedulerTestJSON, cls).resource_cleanup()
@test.idempotent_id('b7ce6e89-e837-4ded-9b78-9ed3c9c6a45a')
def test_list_routers_on_l3_agent(self):
self.admin_client.list_routers_on_l3_agent(self.agent['id'])