def get_router_id(self, tenant_id, tenant_name):
router_id = None<EOL>if tenant_id in self.tenant_dict:<EOL><INDENT>router_id = self.tenant_dict.get(tenant_id).get('<STR_LIT>')<EOL><DEDENT>if not router_id:<EOL><INDENT>router_list = self.os_helper.get_rtr_by_name(<EOL>'<STR_LIT>' + tenant_name)<EOL>if len(router_list) > <NUM_LIT:0>:<EOL><INDENT>router_id = router_list[<NUM_LIT:0>].get('<STR_LIT:id>')<EOL><DEDENT><DEDENT>return router_id<EOL>
Retrieve the router ID.