blob: e0cc5be3ad594256d1259295c24424757a6ce2b2 [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"`
selvamuthukumaran_c4a78f3d2019-05-22 06:13:57 +000054 TechnologyProfileID int `json:"tech_profile_id"`
Jonathan Hartf86817b2018-08-17 10:35:54 -070055}
56
57type subscribers struct {
58 Subscribers []*subscriber `json:"items"`
59}
60
61/*
Matteo Scandolo60676562019-03-15 14:56:25 -070062 XOS BandwidthProfile format
63*/
64type bandwidthprofile struct {
65 Name string `json:"name"`
66 Cir int `json:"cir"`
67 Cbs int `json:"cbs"`
68 Eir int `json:"eir"`
69 Ebs int `json:"ebs"`
70 Air int `json:"air"`
71}
72
73type bandwidthprofiles struct {
74 Profiles []*bandwidthprofile `json:"items"`
75}
76
77/*
Jonathan Hartf86817b2018-08-17 10:35:54 -070078 {
79 "id" : "10.1.1.1:9191",
80 "hardwareIdentifier" : "de:ad:be:ef:ba:11",
81 "uplinkPort" : 128
82 }
83*/
84/*
85 ONOS SADIS device format
86*/
87type sadisDevice struct {
Matteo Scandoloa79e6082018-08-21 14:16:47 -070088 ID string `json:"id"`
Jonathan Hartf86817b2018-08-17 10:35:54 -070089 HardwareID string `json:"hardwareIdentifier"`
Matteo Scandoloa79e6082018-08-21 14:16:47 -070090 Uplink int `json:"uplinkPort"`
Matteo Scandolo3f330cd2018-08-31 07:29:35 -070091 IPAddress string `json:"ipAddress"`
92 NasID string `json:"nasId"`
Jonathan Hartf86817b2018-08-17 10:35:54 -070093}
94
95/*
96 XOS vOLT device format
97*/
98type oltDevice struct {
Matteo Scandolo5be70a12018-10-16 10:57:57 -070099 Uplink string `json:"uplink"`
100 Host string `json:"host"`
101 Port int `json:"port"`
102 NasID string `json:"nas_id"`
103 SerialNumber string `json:"serial_number"`
Jonathan Hartf86817b2018-08-17 10:35:54 -0700104}
105
106type oltDevices struct {
107 OltDevices []*oltDevice `json:"items"`
108}
Matteo Scandolo60676562019-03-15 14:56:25 -0700109
110/*
111 ONOS SADIS bandwidth profile format
112*/
113
114type sadisBandwidthProfile struct {
115 ID string `json:"id"`
116 Cir int `json:"cir"`
117 Cbs int `json:"cbs"`
118 Eir int `json:"eir"`
119 Ebs int `json:"ebs"`
120 Air int `json:"air"`
121}