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:
parent
9f95984437
commit
b2b8ccde07
|
@ -335,8 +335,9 @@ class TestFwaasL3AgentRpcCallback(base.BaseTestCase):
|
||||||
|
|
||||||
def _prepare_router_data(self, use_namespaces):
|
def _prepare_router_data(self, use_namespaces):
|
||||||
router = {'id': str(uuid.uuid4()), 'tenant_id': str(uuid.uuid4())}
|
router = {'id': str(uuid.uuid4()), 'tenant_id': str(uuid.uuid4())}
|
||||||
|
ns = "ns-" + router['id']
|
||||||
return l3_agent.RouterInfo(router['id'], self.conf.root_helper,
|
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,
|
def _get_router_info_list_with_namespace_helper(self,
|
||||||
router_use_namespaces):
|
router_use_namespaces):
|
||||||
|
|
Loading…
Reference in New Issue