def _attach_dummy_intf_rtr(self, tenant_id, tenant_name, rtr_id):
serv_obj = self.get_service_obj(tenant_id)<EOL>fw_dict = serv_obj.get_fw_dict()<EOL>fw_id = fw_dict.get('<STR_LIT>')<EOL>rtr_nwk = fw_id[<NUM_LIT:0>:<NUM_LIT:4>] + fw_const.DUMMY_SERVICE_NWK + (<EOL>fw_id[len(fw_id) - <NUM_LIT:4>:])<EOL>net_id, subnet_id = self.os_helper.create_network(<EOL>rtr_nwk, tenant_id, self.servicedummy_ip_subnet)<EOL>if net_id is None or subnet_id is None:<EOL><INDENT>return None, None<EOL><DEDENT>net_dict = {}<EOL>net_dict['<STR_LIT:name>'] = rtr_nwk<EOL>self.store_net_db(tenant_id, net_id, net_dict, '<STR_LIT>')<EOL>subnet_lst = set()<EOL>subnet_lst.add(subnet_id)<EOL>if rtr_id is None:<EOL><INDENT>self.os_helper.delete_network(rtr_nwk, tenant_id, subnet_id,<EOL>net_id)<EOL>return None, None<EOL><DEDENT>ret = self.os_helper.add_intf_router(rtr_id, tenant_id, subnet_lst)<EOL>if not ret:<EOL><INDENT>self.os_helper.delete_network(rtr_nwk, tenant_id, subnet_id,<EOL>net_id)<EOL>return None, None<EOL><DEDENT>return net_id, subnet_id<EOL>
Function to create a dummy router and interface.