blob: b28c1f74c83cb0cc9151e87e1661cee057cf428c [file] [log] [blame]
Jonathan Hartf86817b2018-08-17 10:35:54 -07001// Copyright 2018 Open Networking Foundation
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14package main
15
16/*
17 {
18 "id": "PONSIM",
19 "cTag": 333,
20 "sTag": 444,
21 "nasPortId": "PON 1/1/03/1:1.1.1",
22 "circuitId": "foo",
23 "remoteId": "bar"
24 }
25*/
26/*
27 ONOS SADIS subscriber format
28*/
29type sadisSubscriber struct {
Matteo Scandoloa79e6082018-08-21 14:16:47 -070030 ID string `json:"id"`
31 CTag int16 `json:"cTag"`
32 STag int16 `json:"sTag"`
Jonathan Hartf86817b2018-08-17 10:35:54 -070033 NasPortID string `json:"nasPortId"`
34 CircuitID string `json:"circuitId"`
Matteo Scandoloa79e6082018-08-21 14:16:47 -070035 RemoteID string `json:"remoteId"`
Jonathan Hartf86817b2018-08-17 10:35:54 -070036}
37
38/*
39 XOS RCORD subscriber format
40*/
41type subscriber struct {
Matteo Scandoloa79e6082018-08-21 14:16:47 -070042 CTag int16 `json:"c_tag"`
43 STag int16 `json:"s_tag"`
Jonathan Hartf86817b2018-08-17 10:35:54 -070044 OnuSerialNumber string `json:"onu_device"`
Matteo Scandoloa79e6082018-08-21 14:16:47 -070045 NasPortID string `json:"nas_port_id"`
46 CircuitID string `json:"circuit_id"`
47 RemoteID string `json:"remote_id"`
Jonathan Hartf86817b2018-08-17 10:35:54 -070048}
49
50type subscribers struct {
51 Subscribers []*subscriber `json:"items"`
52}
53
54/*
55 {
56 "id" : "10.1.1.1:9191",
57 "hardwareIdentifier" : "de:ad:be:ef:ba:11",
58 "uplinkPort" : 128
59 }
60*/
61/*
62 ONOS SADIS device format
63*/
64type sadisDevice struct {
Matteo Scandoloa79e6082018-08-21 14:16:47 -070065 ID string `json:"id"`
Jonathan Hartf86817b2018-08-17 10:35:54 -070066 HardwareID string `json:"hardwareIdentifier"`
Matteo Scandoloa79e6082018-08-21 14:16:47 -070067 Uplink int `json:"uplinkPort"`
Matteo Scandolo3f330cd2018-08-31 07:29:35 -070068 IPAddress string `json:"ipAddress"`
69 NasID string `json:"nasId"`
Jonathan Hartf86817b2018-08-17 10:35:54 -070070}
71
72/*
73 XOS vOLT device format
74*/
75type oltDevice struct {
Matteo Scandolo5be70a12018-10-16 10:57:57 -070076 Uplink string `json:"uplink"`
77 Host string `json:"host"`
78 Port int `json:"port"`
79 NasID string `json:"nas_id"`
80 SerialNumber string `json:"serial_number"`
Jonathan Hartf86817b2018-08-17 10:35:54 -070081}
82
83type oltDevices struct {
84 OltDevices []*oltDevice `json:"items"`
85}