def _add_links_node(parent_elem, aggregate, slice_urn, available):
    
    links_elem = et.SubElement(parent_elem, LINKS_TAG)

    if slice_urn:
        # TODO: don't know what particular links are in the slice (yet).
        return links_elem
    
    # Only available links are known
    links = aggregate.get_raw_topology()
    
    for s_dp, s_p, d_dp, d_p in links:
        et.SubElement(
            links_elem, LINK_TAG, {
                SRC_URN: _port_to_urn(s_dp, s_p),
                DST_URN: _port_to_urn(d_dp, d_p),
            },
        )
    return links_elem
Add the links tag and all the links
dataset/ETHPy150Open fp7-ofelia/ocf/expedient/src/python/plugins/openflow/plugin/gapi/rspec.py/_add_links_node