blob: ba78ee232937fb688fafd16532fd54fc8f411558 [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"`
Matteo Scandolo04428fd2019-04-17 14:22:30 -070038 TechnologyProfileID int `json:"technologyProfileId"`
Jonathan Hartf86817b2018-08-17 10:35:54 -070039}
40
41/*
42 XOS RCORD subscriber format
43*/
44type subscriber struct {
Matteo Scandolo60676562019-03-15 14:56:25 -070045 ID int `json:"id"`
46 CTag int16 `json:"c_tag"`
47 STag int16 `json:"s_tag"`
48 OnuSerialNumber string `json:"onu_device"`
49 NasPortID string `json:"nas_port_id"`
50 CircuitID string `json:"circuit_id"`
51 RemoteID string `json:"remote_id"`
52 UpstreamBandwidthProfile int `json:"upstream_bps_id"`
53 DownstreamBandwidthProfile int `json:"downstream_bps_id"`
Jonathan Hartf86817b2018-08-17 10:35:54 -070054}
55
56type subscribers struct {
57 Subscribers []*subscriber `json:"items"`
58}
59
60/*
Matteo Scandolo60676562019-03-15 14:56:25 -070061 XOS BandwidthProfile format
62*/
63type bandwidthprofile struct {
64 Name string `json:"name"`
65 Cir int `json:"cir"`
66 Cbs int `json:"cbs"`
67 Eir int `json:"eir"`
68 Ebs int `json:"ebs"`
69 Air int `json:"air"`
70}
71
72type bandwidthprofiles struct {
73 Profiles []*bandwidthprofile `json:"items"`
74}
75
76/*
Jonathan Hartf86817b2018-08-17 10:35:54 -070077 {
78 "id" : "10.1.1.1:9191",
79 "hardwareIdentifier" : "de:ad:be:ef:ba:11",
80 "uplinkPort" : 128
81 }
82*/
83/*
84 ONOS SADIS device format
85*/
86type sadisDevice struct {
Matteo Scandoloa79e6082018-08-21 14:16:47 -070087 ID string `json:"id"`
Jonathan Hartf86817b2018-08-17 10:35:54 -070088 HardwareID string `json:"hardwareIdentifier"`
Matteo Scandoloa79e6082018-08-21 14:16:47 -070089 Uplink int `json:"uplinkPort"`
Matteo Scandolo3f330cd2018-08-31 07:29:35 -070090 IPAddress string `json:"ipAddress"`
91 NasID string `json:"nasId"`
Jonathan Hartf86817b2018-08-17 10:35:54 -070092}
93
94/*
95 XOS vOLT device format
96*/
97type oltDevice struct {
Matteo Scandolo5be70a12018-10-16 10:57:57 -070098 Uplink string `json:"uplink"`
99 Host string `json:"host"`
100 Port int `json:"port"`
101 NasID string `json:"nas_id"`
102 SerialNumber string `json:"serial_number"`
Jonathan Hartf86817b2018-08-17 10:35:54 -0700103}
104
105type oltDevices struct {
106 OltDevices []*oltDevice `json:"items"`
107}
Matteo Scandolo60676562019-03-15 14:56:25 -0700108
109/*
110 ONOS SADIS bandwidth profile format
111*/
112
113type sadisBandwidthProfile struct {
114 ID string `json:"id"`
115 Cir int `json:"cir"`
116 Cbs int `json:"cbs"`
117 Eir int `json:"eir"`
118 Ebs int `json:"ebs"`
119 Air int `json:"air"`
120}