blob: aa7d64ade6903493b9b1e158f4bf8760a6b572f8 [file] [log] [blame]
Stephane Barbarie35595062018-02-08 08:34:39 -05001package core
2
3import (
4 "context"
5 "github.com/opencord/voltha/ponsim/v2/common"
6 "github.com/opencord/voltha/protos/go/bbf_fiber"
7 "github.com/opencord/voltha/protos/go/voltha"
8 "github.com/sirupsen/logrus"
9)
10
11type XPonSimDevice struct {
12}
13
14/*
15
16 */
17func (d *XPonSimDevice) Start(ctx context.Context) {
18}
19
20/*
21
22 */
23func (d *XPonSimDevice) Stop(ctx context.Context) {
24}
25
26/*
27
28 */
29func (d *XPonSimDevice) CreateInterface(ctx context.Context, config *voltha.InterfaceConfig) {
30 common.Logger().WithFields(logrus.Fields{
31 "context": ctx,
32 "device": d,
33 "interface_type": config.GetInterfaceType(),
34 "data": config,
35 }).Info("create-interface-request")
36}
37
38/*
39
40 */
41func (d *XPonSimDevice) UpdateInterface(ctx context.Context, config *voltha.InterfaceConfig) {
42 common.Logger().WithFields(logrus.Fields{
43 "context": ctx,
44 "device": d,
45 "interface_type": config.GetInterfaceType(),
46 "data": config,
47 }).Info("update-interface-request")
48}
49
50/*
51
52 */
53func (d *XPonSimDevice) RemoveInterface(ctx context.Context, config *voltha.InterfaceConfig) {
54 common.Logger().WithFields(logrus.Fields{
55 "context": ctx,
56 "device": d,
57 "interface_type": config.GetInterfaceType(),
58 "data": config,
59 }).Info("remove-interface-request")
60}
61
62/*
63
64 */
65func (d *XPonSimDevice) CreateTcont(ctx context.Context,
66 config *bbf_fiber.TcontsConfigData,
67 profile *bbf_fiber.TrafficDescriptorProfileData,
68) {
69 common.Logger().WithFields(logrus.Fields{
70 "context": ctx,
71 "device": d,
72 "tcont_config_data": config,
73 "traffic_descriptor_profile_config_data": profile,
74 }).Info("create-tcont-request")
75}
76
77/*
78
79 */
80func (d *XPonSimDevice) UpdateTcont(
81 ctx context.Context,
82 config *bbf_fiber.TcontsConfigData,
83 profile *bbf_fiber.TrafficDescriptorProfileData,
84) {
85 common.Logger().WithFields(logrus.Fields{
86 "context": ctx,
87 "device": d,
88 "tcont_config_data": config,
89 "traffic_descriptor_profile_config_data": profile,
90 }).Info("update-tcont-request")
91}
92
93/*
94
95 */
96func (d *XPonSimDevice) RemoveTcont(
97 ctx context.Context,
98 config *bbf_fiber.TcontsConfigData,
99 profile *bbf_fiber.TrafficDescriptorProfileData,
100) {
101 common.Logger().WithFields(logrus.Fields{
102 "context": ctx,
103 "device": d,
104 "tcont_config_data": config,
105 "traffic_descriptor_profile_config_data": profile,
106 }).Info("remove-tcont-request")
107}
108
109/*
110
111 */
112func (d *XPonSimDevice) CreateGemport(ctx context.Context, config *voltha.InterfaceConfig) {
113 common.Logger().WithFields(logrus.Fields{
114 "context": ctx,
115 "device": d,
116 "interface_type": config.GetInterfaceType(),
117 "data": config,
118 }).Info("create-gemport-request")
119}
120
121/*
122
123 */
124func (d *XPonSimDevice) UpdateGemport(ctx context.Context, config *voltha.InterfaceConfig) {
125 common.Logger().WithFields(logrus.Fields{
126 "context": ctx,
127 "device": d,
128 "interface_type": config.GetInterfaceType(),
129 "data": config,
130 }).Info("update-gemport-request")
131}
132
133/*
134
135 */
136func (d *XPonSimDevice) RemoveGemport(ctx context.Context, config *voltha.InterfaceConfig) {
137 common.Logger().WithFields(logrus.Fields{
138 "context": ctx,
139 "device": d,
140 "interface_type": config.GetInterfaceType(),
141 "data": config,
142 }).Info("remove-gemport-request")
143}
144
145/*
146
147 */
148func (d *XPonSimDevice) CreateMulticastGemport(ctx context.Context, config *voltha.InterfaceConfig) {
149 common.Logger().WithFields(logrus.Fields{
150 "context": ctx,
151 "device": d,
152 "interface_type": config.GetInterfaceType(),
153 "data": config,
154 }).Info("create-multicast-gemport-request")
155}
156
157/*
158
159 */
160func (d *XPonSimDevice) UpdateMulticastGemport(ctx context.Context, config *voltha.InterfaceConfig) {
161 common.Logger().WithFields(logrus.Fields{
162 "context": ctx,
163 "device": d,
164 "interface_type": config.GetInterfaceType(),
165 "data": config,
166 }).Info("update-multicast-gemport-request")
167}
168
169/*
170
171 */
172func (d *XPonSimDevice) RemoveMulticastGemport(ctx context.Context, config *voltha.InterfaceConfig) {
173 common.Logger().WithFields(logrus.Fields{
174 "context": ctx,
175 "device": d,
176 "interface_type": config.GetInterfaceType(),
177 "data": config,
178 }).Info("remove-multicast-gemport-request")
179}
180
181/*
182
183 */
184func (d *XPonSimDevice) CreateMulticastDistributionSet(ctx context.Context, config *voltha.InterfaceConfig) {
185 common.Logger().WithFields(logrus.Fields{
186 "context": ctx,
187 "device": d,
188 "interface_type": config.GetInterfaceType(),
189 "data": config,
190 }).Info("create-multicast-distribution-set-request")
191}
192
193/*
194
195 */
196func (d *XPonSimDevice) UpdateMulticastDistributionSet(ctx context.Context, config *voltha.InterfaceConfig) {
197 common.Logger().WithFields(logrus.Fields{
198 "context": ctx,
199 "device": d,
200 "interface_type": config.GetInterfaceType(),
201 "data": config,
202 }).Info("update-multicast-distribution-set-request")
203}
204
205/*
206
207 */
208func (d *XPonSimDevice) RemoveMulticastDistributionSet(ctx context.Context, config *voltha.InterfaceConfig) {
209 common.Logger().WithFields(logrus.Fields{
210 "context": ctx,
211 "device": d,
212 "interface_type": config.GetInterfaceType(),
213 "data": config,
214 }).Info("remove-multicast-distribution-set-request")
215}