apiVersion: core.eda.nokia.com/v1
kind: TopoLink
metadata:
  name: {{ name }}
  namespace: {{ namespace }}
{% if labels is defined and labels %}
  labels:
{% for k, v in labels.items() %}
    {{ k }}: {{ v | default('') }}
{% endfor %}
{% endif %}
spec:
  links:
{% for link in links %}
  - local:
      node: {{ link.local.node }}
      interface: {{ link.local.interface }}
      interfaceResource: {{ link.local.interfaceResource }}
    remote:
      node: {{ link.remote.node }}
      interface: {{ link.remote.interface }}
      interfaceResource: {{ link.remote.interfaceResource }}
    speed: {{ link.speed }}
    type: {{ link.type }}
{% endfor %}
