blob: 3c3cc317892dbf30e6e9f65cd74eba6de6cb9f50 [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 }},
17 {{ end }}"{{ .Location.ElementID }}/{{ .Location.Port }}": {
18 "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}