blob: 8de85e4f7c7310f2ad916edb3665988743da7e08 [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"`
Jonathan Hartf86817b2018-08-17 10:35:54 -070068}
69
70/*
71 XOS vOLT device format
72*/
73type oltDevice struct {
74 Uplink string `json:"uplink"`
Matteo Scandoloa79e6082018-08-21 14:16:47 -070075 Host string `json:"host"`
76 Port int `json:"port"`
Jonathan Hartf86817b2018-08-17 10:35:54 -070077}
78
79type oltDevices struct {
80 OltDevices []*oltDevice `json:"items"`
81}