| {{ 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 $idx_ip, $ip := .IpAddresses }}{{if $idx_ip}},{{end}}{{ $ip }}{{ end }}"], |
| "location": "{{ .Location.ElementID }}/{{ .Location.Port }}" |
| {{ range $index, $element := .Hosts }}{{ if $index }}, |
| {{ end }}"{{ .Location.ElementID }}/{{ .Location.Port }}": { |
| "ips": [ "{{ gateway .IpAddresses }}" ] |