| {{ range $index, $element := .Devices }}{{ if $index }}, |
| "name": "device-{{ .ChassisId }}", |
| "nodeSid": {{ add 100 $index }}, |
| "routerIp": "{{ .Annotations.ManagementAddress }}", |
| "routerMac": "{{ .Mac }}", |
| "isEdgeRouter": {{ .IsEdgeRouter }}, |
| {{ range $index, $element := .Hosts }}{{ if $index }}, |
| {{ end }}"{{ .Mac }}/-1": { |
| "ips": ["{{ range $ip := .IpAddresses }}{{ $ip }}{{ end }}"], |
| "location": "{{ .Location.ElementID }}/{{ .Location.Port }}" |
| {{ range $index, $element := .Hosts }}{{ if $index }}, |
| {{ end }}"{{ .Location.ElementID }}/{{ .Location.Port }}": { |
| "ips": [ "{{ gateway .IpAddresses }}" ] |