blob: e5ccdd3f52f6ff94228d75d030f12b939c7f7893 [file] [log] [blame]
Zack Williams41513bf2018-07-07 20:08:35 -07001/*
2 * Copyright 2017-present Open Networking Foundation
3
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7
8 * http://www.apache.org/licenses/LICENSE-2.0
9
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
Stephane Barbarie35595062018-02-08 08:34:39 -050016package core
17
18import (
19 "context"
20 "github.com/opencord/voltha/ponsim/v2/common"
21 "github.com/opencord/voltha/protos/go/bbf_fiber"
22 "github.com/opencord/voltha/protos/go/voltha"
23 "github.com/sirupsen/logrus"
24)
25
26type XPonSimDevice struct {
27}
28
29/*
30
31 */
32func (d *XPonSimDevice) Start(ctx context.Context) {
33}
34
35/*
36
37 */
38func (d *XPonSimDevice) Stop(ctx context.Context) {
39}
40
41/*
42
43 */
44func (d *XPonSimDevice) CreateInterface(ctx context.Context, config *voltha.InterfaceConfig) {
45 common.Logger().WithFields(logrus.Fields{
46 "context": ctx,
47 "device": d,
48 "interface_type": config.GetInterfaceType(),
49 "data": config,
50 }).Info("create-interface-request")
51}
52
53/*
54
55 */
56func (d *XPonSimDevice) UpdateInterface(ctx context.Context, config *voltha.InterfaceConfig) {
57 common.Logger().WithFields(logrus.Fields{
58 "context": ctx,
59 "device": d,
60 "interface_type": config.GetInterfaceType(),
61 "data": config,
62 }).Info("update-interface-request")
63}
64
65/*
66
67 */
68func (d *XPonSimDevice) RemoveInterface(ctx context.Context, config *voltha.InterfaceConfig) {
69 common.Logger().WithFields(logrus.Fields{
70 "context": ctx,
71 "device": d,
72 "interface_type": config.GetInterfaceType(),
73 "data": config,
74 }).Info("remove-interface-request")
75}
76
77/*
78
79 */
80func (d *XPonSimDevice) CreateTcont(ctx context.Context,
81 config *bbf_fiber.TcontsConfigData,
82 profile *bbf_fiber.TrafficDescriptorProfileData,
83) {
84 common.Logger().WithFields(logrus.Fields{
85 "context": ctx,
86 "device": d,
87 "tcont_config_data": config,
88 "traffic_descriptor_profile_config_data": profile,
89 }).Info("create-tcont-request")
90}
91
92/*
93
94 */
95func (d *XPonSimDevice) UpdateTcont(
96 ctx context.Context,
97 config *bbf_fiber.TcontsConfigData,
98 profile *bbf_fiber.TrafficDescriptorProfileData,
99) {
100 common.Logger().WithFields(logrus.Fields{
101 "context": ctx,
102 "device": d,
103 "tcont_config_data": config,
104 "traffic_descriptor_profile_config_data": profile,
105 }).Info("update-tcont-request")
106}
107
108/*
109
110 */
111func (d *XPonSimDevice) RemoveTcont(
112 ctx context.Context,
113 config *bbf_fiber.TcontsConfigData,
114 profile *bbf_fiber.TrafficDescriptorProfileData,
115) {
116 common.Logger().WithFields(logrus.Fields{
117 "context": ctx,
118 "device": d,
119 "tcont_config_data": config,
120 "traffic_descriptor_profile_config_data": profile,
121 }).Info("remove-tcont-request")
122}
123
124/*
125
126 */
127func (d *XPonSimDevice) CreateGemport(ctx context.Context, config *voltha.InterfaceConfig) {
128 common.Logger().WithFields(logrus.Fields{
129 "context": ctx,
130 "device": d,
131 "interface_type": config.GetInterfaceType(),
132 "data": config,
133 }).Info("create-gemport-request")
134}
135
136/*
137
138 */
139func (d *XPonSimDevice) UpdateGemport(ctx context.Context, config *voltha.InterfaceConfig) {
140 common.Logger().WithFields(logrus.Fields{
141 "context": ctx,
142 "device": d,
143 "interface_type": config.GetInterfaceType(),
144 "data": config,
145 }).Info("update-gemport-request")
146}
147
148/*
149
150 */
151func (d *XPonSimDevice) RemoveGemport(ctx context.Context, config *voltha.InterfaceConfig) {
152 common.Logger().WithFields(logrus.Fields{
153 "context": ctx,
154 "device": d,
155 "interface_type": config.GetInterfaceType(),
156 "data": config,
157 }).Info("remove-gemport-request")
158}
159
160/*
161
162 */
163func (d *XPonSimDevice) CreateMulticastGemport(ctx context.Context, config *voltha.InterfaceConfig) {
164 common.Logger().WithFields(logrus.Fields{
165 "context": ctx,
166 "device": d,
167 "interface_type": config.GetInterfaceType(),
168 "data": config,
169 }).Info("create-multicast-gemport-request")
170}
171
172/*
173
174 */
175func (d *XPonSimDevice) UpdateMulticastGemport(ctx context.Context, config *voltha.InterfaceConfig) {
176 common.Logger().WithFields(logrus.Fields{
177 "context": ctx,
178 "device": d,
179 "interface_type": config.GetInterfaceType(),
180 "data": config,
181 }).Info("update-multicast-gemport-request")
182}
183
184/*
185
186 */
187func (d *XPonSimDevice) RemoveMulticastGemport(ctx context.Context, config *voltha.InterfaceConfig) {
188 common.Logger().WithFields(logrus.Fields{
189 "context": ctx,
190 "device": d,
191 "interface_type": config.GetInterfaceType(),
192 "data": config,
193 }).Info("remove-multicast-gemport-request")
194}
195
196/*
197
198 */
199func (d *XPonSimDevice) CreateMulticastDistributionSet(ctx context.Context, config *voltha.InterfaceConfig) {
200 common.Logger().WithFields(logrus.Fields{
201 "context": ctx,
202 "device": d,
203 "interface_type": config.GetInterfaceType(),
204 "data": config,
205 }).Info("create-multicast-distribution-set-request")
206}
207
208/*
209
210 */
211func (d *XPonSimDevice) UpdateMulticastDistributionSet(ctx context.Context, config *voltha.InterfaceConfig) {
212 common.Logger().WithFields(logrus.Fields{
213 "context": ctx,
214 "device": d,
215 "interface_type": config.GetInterfaceType(),
216 "data": config,
217 }).Info("update-multicast-distribution-set-request")
218}
219
220/*
221
222 */
223func (d *XPonSimDevice) RemoveMulticastDistributionSet(ctx context.Context, config *voltha.InterfaceConfig) {
224 common.Logger().WithFields(logrus.Fields{
225 "context": ctx,
226 "device": d,
227 "interface_type": config.GetInterfaceType(),
228 "data": config,
229 }).Info("remove-multicast-distribution-set-request")
230}