blob: 62d175fd32de4c72f2afad03e88da173cea0ba05 [file] [log] [blame]
{
"devices": {
{{ range $index, $element := .Devices }}{{ if $index }},
{{ end }}"{{ .Id }}": {
"segmentrouting": {
"name": "device-{{ .ChassisId }}",
"nodeSid": {{ add 100 $index }},
"routerIp": "{{ .Annotations.ManagementAddress }}",
"routerMac": "{{ .Mac }}",
"isEdgeRouter": {{ .IsEdgeRouter }},
"adjacencySids": []
}
}{{ end }}
},
"hosts": {
{{ range $index, $element := .Hosts }}{{ if $index }},
{{ end }}"{{ .Mac }}": {
"ips": ["{{ range $ip := .IpAddresses }}{{ $ip }}{{ end }}"],
"location": "{{ .Location.ElementID }}/{{ .Location.Port }}"
}{{ end }}
},
"ports": {
{{ range $index, $element := .Hosts }}{{ if $index }},
{{ end }}"{{ .Location.ElementID }}/{{ .Location.Port }}": {
"interfaces": [
{
"ips": [ "{{ gateway .IpAddresses }}" ]
}
]
}{{ end }}
},
"links": {},
"apps": {}
}