David K. Bainbridge | c04fd55 | 2016-11-08 18:39:29 -0800 | [diff] [blame] | 1 | { |
| 2 | "devices": { |
| 3 | {{ range $index, $element := .Devices }}{{ if $index }}, |
| 4 | {{ end }}"{{ .Id }}": { |
| 5 | "segmentrouting": { |
| 6 | "name": "device-{{ .ChassisId }}", |
Jonathan Hart | e8f66d1 | 2017-08-21 16:05:42 -0700 | [diff] [blame] | 7 | "ipv4NodeSid": {{ add 100 $index }}, |
| 8 | "ipv4Loopback": "{{ .Annotations.ManagementAddress }}", |
David K. Bainbridge | c04fd55 | 2016-11-08 18:39:29 -0800 | [diff] [blame] | 9 | "routerMac": "{{ .Mac }}", |
| 10 | "isEdgeRouter": {{ .IsEdgeRouter }}, |
| 11 | "adjacencySids": [] |
| 12 | } |
| 13 | }{{ end }} |
| 14 | }, |
David K. Bainbridge | c04fd55 | 2016-11-08 18:39:29 -0800 | [diff] [blame] | 15 | "ports": { |
| 16 | {{ range $index, $element := .Hosts }}{{ if $index }}, |
Jonathan Hart | f5ce31a | 2018-01-31 15:48:21 -0800 | [diff] [blame] | 17 | {{ end }}"{{ (index .Locations 0).ElementID }}/{{ (index .Locations 0).Port }}": { |
David K. Bainbridge | c04fd55 | 2016-11-08 18:39:29 -0800 | [diff] [blame] | 18 | "interfaces": [ |
| 19 | { |
Jonathan Hart | e8f66d1 | 2017-08-21 16:05:42 -0700 | [diff] [blame] | 20 | "ips": [ "{{ gateway .IpAddresses }}" ], |
| 21 | "vlan-untagged" : {{ vlan .IpAddresses }} |
David K. Bainbridge | c04fd55 | 2016-11-08 18:39:29 -0800 | [diff] [blame] | 22 | } |
| 23 | ] |
| 24 | }{{ end }} |
| 25 | }, |
Jonathan Hart | e8f66d1 | 2017-08-21 16:05:42 -0700 | [diff] [blame] | 26 | "apps" : { |
| 27 | "org.onosproject.segmentrouting" : { |
| 28 | "segmentrouting" : { |
| 29 | "vRouterMacs" : [ "a4:23:05:06:01:01" ] |
| 30 | } |
| 31 | } |
| 32 | } |
David K. Bainbridge | c04fd55 | 2016-11-08 18:39:29 -0800 | [diff] [blame] | 33 | } |