blob: 0e807b616d791a0b491f25749a902c5410c6da8c [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 {
30 ID string `json:"id"`
31 CTag int16 `json:"cTag"`
32 STag int16 `json:"sTag"`
33 NasPortID string `json:"nasPortId"`
34 CircuitID string `json:"circuitId"`
35 RemoteID string `json:"remoteId"`
36}
37
38/*
39 XOS RCORD subscriber format
40*/
41type subscriber struct {
42 CTag int16 `json:"c_tag"`
43 STag int16 `json:"s_tag"`
44 OnuSerialNumber string `json:"onu_device"`
45 NasPortID string `json:"nas_port_id"`
46 CircuitID string `json:"circuit_id"`
47}
48
49type subscribers struct {
50 Subscribers []*subscriber `json:"items"`
51}
52
53/*
54 {
55 "id" : "10.1.1.1:9191",
56 "hardwareIdentifier" : "de:ad:be:ef:ba:11",
57 "uplinkPort" : 128
58 }
59*/
60/*
61 ONOS SADIS device format
62*/
63type sadisDevice struct {
64 ID string `json:"id"`
65 HardwareID string `json:"hardwareIdentifier"`
66 Uplink int `json:"uplinkPort"`
67}
68
69/*
70 XOS vOLT device format
71*/
72type oltDevice struct {
73 Uplink string `json:"uplink"`
74 Host string `json:"host"`
75 Port int `json:"port"`
76}
77
78type oltDevices struct {
79 OltDevices []*oltDevice `json:"items"`
80}