def get_network_by_tenant(self, tenant_id):
ret_net_lst = []<EOL>try:<EOL><INDENT>net_list = self.neutronclient.list_networks(body={})<EOL>for net in net_list.get('<STR_LIT>'):<EOL><INDENT>if net.get('<STR_LIT>') == tenant_id:<EOL><INDENT>ret_net_lst.append(net)<EOL><DEDENT><DEDENT><DEDENT>except Exception as exc:<EOL><INDENT>LOG.error("<STR_LIT>"<EOL>"<STR_LIT>",<EOL>{'<STR_LIT>': tenant_id, '<STR_LIT>': str(exc)})<EOL><DEDENT>return ret_net_lst<EOL>
Returns the network of a given tenant.