blob: 4e75e10b7e553d5433cec6c70cd856614ec098e6 [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 }}",
Jonathan Harte8f66d12017-08-21 16:05:42 -07007 "ipv4NodeSid": {{ add 100 $index }},
8 "ipv4Loopback": "{{ .Annotations.ManagementAddress }}",
David K. Bainbridgec04fd552016-11-08 18:39:29 -08009 "routerMac": "{{ .Mac }}",
10 "isEdgeRouter": {{ .IsEdgeRouter }},
11 "adjacencySids": []
12 }
13 }{{ end }}
14 },
David K. Bainbridgec04fd552016-11-08 18:39:29 -080015 "ports": {
16 {{ range $index, $element := .Hosts }}{{ if $index }},
Jonathan Hartf5ce31a2018-01-31 15:48:21 -080017 {{ end }}"{{ (index .Locations 0).ElementID }}/{{ (index .Locations 0).Port }}": {
David K. Bainbridgec04fd552016-11-08 18:39:29 -080018 "interfaces": [
19 {
Jonathan Harte8f66d12017-08-21 16:05:42 -070020 "ips": [ "{{ gateway .IpAddresses }}" ],
21 "vlan-untagged" : {{ vlan .IpAddresses }}
David K. Bainbridgec04fd552016-11-08 18:39:29 -080022 }
23 ]
24 }{{ end }}
25 },
Jonathan Harte8f66d12017-08-21 16:05:42 -070026 "apps" : {
27 "org.onosproject.segmentrouting" : {
28 "segmentrouting" : {
29 "vRouterMacs" : [ "a4:23:05:06:01:01" ]
30 }
31 }
32 }
David K. Bainbridgec04fd552016-11-08 18:39:29 -080033}