blob: 5bf12136854684df227e62924d295745876180ef [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 Scandolo60676562019-03-15 14:56:25 -070030 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 UpstreamBandwidthProfile string `json:"upstreamBandwidthProfile"`
37 DownstreamBandwidthProfile string `json:"downstreamBandwidthProfile"`
Jonathan Hartf86817b2018-08-17 10:35:54 -070038}
39
40/*
41 XOS RCORD subscriber format
42*/
43type subscriber struct {
Matteo Scandolo60676562019-03-15 14:56:25 -070044 ID int `json:"id"`
45 CTag int16 `json:"c_tag"`
46 STag int16 `json:"s_tag"`
47 OnuSerialNumber string `json:"onu_device"`
48 NasPortID string `json:"nas_port_id"`
49 CircuitID string `json:"circuit_id"`
50 RemoteID string `json:"remote_id"`
51 UpstreamBandwidthProfile int `json:"upstream_bps_id"`
52 DownstreamBandwidthProfile int `json:"downstream_bps_id"`
Jonathan Hartf86817b2018-08-17 10:35:54 -070053}
54
55type subscribers struct {
56 Subscribers []*subscriber `json:"items"`
57}
58
59/*
Matteo Scandolo60676562019-03-15 14:56:25 -070060 XOS BandwidthProfile format
61*/
62type bandwidthprofile struct {
63 Name string `json:"name"`
64 Cir int `json:"cir"`
65 Cbs int `json:"cbs"`
66 Eir int `json:"eir"`
67 Ebs int `json:"ebs"`
68 Air int `json:"air"`
69}
70
71type bandwidthprofiles struct {
72 Profiles []*bandwidthprofile `json:"items"`
73}
74
75/*
Jonathan Hartf86817b2018-08-17 10:35:54 -070076 {
77 "id" : "10.1.1.1:9191",
78 "hardwareIdentifier" : "de:ad:be:ef:ba:11",
79 "uplinkPort" : 128
80 }
81*/
82/*
83 ONOS SADIS device format
84*/
85type sadisDevice struct {
Matteo Scandoloa79e6082018-08-21 14:16:47 -070086 ID string `json:"id"`
Jonathan Hartf86817b2018-08-17 10:35:54 -070087 HardwareID string `json:"hardwareIdentifier"`
Matteo Scandoloa79e6082018-08-21 14:16:47 -070088 Uplink int `json:"uplinkPort"`
Matteo Scandolo3f330cd2018-08-31 07:29:35 -070089 IPAddress string `json:"ipAddress"`
90 NasID string `json:"nasId"`
Jonathan Hartf86817b2018-08-17 10:35:54 -070091}
92
93/*
94 XOS vOLT device format
95*/
96type oltDevice struct {
Matteo Scandolo5be70a12018-10-16 10:57:57 -070097 Uplink string `json:"uplink"`
98 Host string `json:"host"`
99 Port int `json:"port"`
100 NasID string `json:"nas_id"`
101 SerialNumber string `json:"serial_number"`
Jonathan Hartf86817b2018-08-17 10:35:54 -0700102}
103
104type oltDevices struct {
105 OltDevices []*oltDevice `json:"items"`
106}
Matteo Scandolo60676562019-03-15 14:56:25 -0700107
108/*
109 ONOS SADIS bandwidth profile format
110*/
111
112type sadisBandwidthProfile struct {
113 ID string `json:"id"`
114 Cir int `json:"cir"`
115 Cbs int `json:"cbs"`
116 Eir int `json:"eir"`
117 Ebs int `json:"ebs"`
118 Air int `json:"air"`
119}