Avoid constructing a RouterInfo object to get namespace name

Constructing a RouterInfo object just for a string concatenation is
inefficient and adds more dependence on the class which needs
refactoring.

Change-Id: Ibaf369d6ebe9285a0c845802def59bfa26ac0fd5
This commit is contained in:
Carl Baldwin 2014-10-10 05:12:43 +00:00
parent 9f95984437
commit b2b8ccde07
1 changed files with 2 additions and 1 deletions

View File

@ -335,8 +335,9 @@ class TestFwaasL3AgentRpcCallback(base.BaseTestCase):
def _prepare_router_data(self, use_namespaces):
router = {'id': str(uuid.uuid4()), 'tenant_id': str(uuid.uuid4())}
ns = "ns-" + router['id']
return l3_agent.RouterInfo(router['id'], self.conf.root_helper,
use_namespaces, router=router)
use_namespaces, router=router, ns_name=ns)
def _get_router_info_list_with_namespace_helper(self,
router_use_namespaces):