blob: 2885e5b824e6dcc8170c14210cedbc29c250a402 [file] [log] [blame]
David K. Bainbridgec04fd552016-11-08 18:39:29 -08001{
2 "devices": {
3 {{ range $index, $element := .Devices }}{{ if $index }},
4 {{ end }}"{{ .Id }}": {
5 "segmentrouting": {
6 "name": "device-{{ .ChassisId }}",
7 "nodeSid": {{ add 100 $index }},
8 "routerIp": "{{ .Annotations.ManagementAddress }}",
9 "routerMac": "{{ .Mac }}",
10 "isEdgeRouter": {{ .IsEdgeRouter }},
11 "adjacencySids": []
12 }
13 }{{ end }}
14 },
15 "hosts": {
16 {{ range $index, $element := .Hosts }}{{ if $index }},
David K. Bainbridge40d484c2016-12-12 15:14:22 -080017 {{ end }}"{{ .Mac }}/-1": {
David K. Bainbridgec04fd552016-11-08 18:39:29 -080018 "ips": ["{{ range $ip := .IpAddresses }}{{ $ip }}{{ end }}"],
19 "location": "{{ .Location.ElementID }}/{{ .Location.Port }}"
20 }{{ end }}
21 },
22 "ports": {
23 {{ range $index, $element := .Hosts }}{{ if $index }},
24 {{ end }}"{{ .Location.ElementID }}/{{ .Location.Port }}": {
25 "interfaces": [
26 {
27 "ips": [ "{{ gateway .IpAddresses }}" ]
28 }
29 ]
30 }{{ end }}
31 },
32 "links": {},
33 "apps": {}
34}