blob: c3667c0d17837f2a52c0251509a07793b54a10bc [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
2// source: api/legacy/bbsim.proto
3
4/*
5Package legacy is a reverse proxy.
6
7It translates gRPC into RESTful JSON APIs.
8*/
9package legacy
10
11import (
12 "context"
13 "io"
14 "net/http"
15
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070016 "github.com/golang/protobuf/proto"
17 "github.com/grpc-ecosystem/grpc-gateway/runtime"
18 "github.com/grpc-ecosystem/grpc-gateway/utilities"
19 "google.golang.org/grpc"
20 "google.golang.org/grpc/codes"
21 "google.golang.org/grpc/grpclog"
22 "google.golang.org/grpc/status"
23)
24
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070025var _ codes.Code
26var _ io.Reader
27var _ status.Status
28var _ = runtime.String
29var _ = utilities.NewDoubleArray
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070030
31func request_BBSimService_OLTStatus_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
32 var protoReq Empty
33 var metadata runtime.ServerMetadata
34
35 msg, err := client.OLTStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
36 return msg, metadata, err
37
38}
39
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070040func request_BBSimService_OLTStatus_1(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
41 var protoReq Empty
42 var metadata runtime.ServerMetadata
43
44 msg, err := client.OLTStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
45 return msg, metadata, err
46
47}
48
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070049var (
50 filter_BBSimService_PortStatus_0 = &utilities.DoubleArray{Encoding: map[string]int{"port_type": 0, "port_id": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}}
51)
52
53func request_BBSimService_PortStatus_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
54 var protoReq PortInfo
55 var metadata runtime.ServerMetadata
56
57 var (
58 val string
59 ok bool
60 err error
61 _ = err
62 )
63
64 val, ok = pathParams["port_type"]
65 if !ok {
66 return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_type")
67 }
68
69 protoReq.PortType, err = runtime.String(val)
70
71 if err != nil {
72 return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_type", err)
73 }
74
75 val, ok = pathParams["port_id"]
76 if !ok {
77 return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id")
78 }
79
80 protoReq.PortId, err = runtime.Uint32(val)
81
82 if err != nil {
83 return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err)
84 }
85
86 if err := req.ParseForm(); err != nil {
87 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
88 }
89 if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_PortStatus_0); err != nil {
90 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
91 }
92
93 msg, err := client.PortStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
94 return msg, metadata, err
95
96}
97
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070098var (
99 filter_BBSimService_ONUStatus_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
100)
101
102func request_BBSimService_ONUStatus_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
103 var protoReq ONURequest
104 var metadata runtime.ServerMetadata
105
106 if err := req.ParseForm(); err != nil {
107 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
108 }
109 if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_ONUStatus_0); err != nil {
110 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
111 }
112
113 msg, err := client.ONUStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
114 return msg, metadata, err
115
116}
117
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700118var (
119 filter_BBSimService_ONUStatus_1 = &utilities.DoubleArray{Encoding: map[string]int{"onu": 0, "onu_serial": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}}
120)
121
122func request_BBSimService_ONUStatus_1(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
123 var protoReq ONURequest
124 var metadata runtime.ServerMetadata
125
126 var (
127 val string
128 ok bool
129 err error
130 _ = err
131 )
132
133 val, ok = pathParams["onu.onu_serial"]
134 if !ok {
135 return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.onu_serial")
136 }
137
138 err = runtime.PopulateFieldFromPath(&protoReq, "onu.onu_serial", val)
139
140 if err != nil {
141 return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.onu_serial", err)
142 }
143
144 if err := req.ParseForm(); err != nil {
145 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
146 }
147 if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_ONUStatus_1); err != nil {
148 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
149 }
150
151 msg, err := client.ONUStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
152 return msg, metadata, err
153
154}
155
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700156var (
157 filter_BBSimService_ONUStatus_2 = &utilities.DoubleArray{Encoding: map[string]int{"onu": 0, "pon_port_id": 1, "onu_id": 2}, Base: []int{1, 1, 1, 2, 0, 0}, Check: []int{0, 1, 2, 2, 3, 4}}
158)
159
160func request_BBSimService_ONUStatus_2(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
161 var protoReq ONURequest
162 var metadata runtime.ServerMetadata
163
164 var (
165 val string
166 ok bool
167 err error
168 _ = err
169 )
170
171 val, ok = pathParams["onu.pon_port_id"]
172 if !ok {
173 return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.pon_port_id")
174 }
175
176 err = runtime.PopulateFieldFromPath(&protoReq, "onu.pon_port_id", val)
177
178 if err != nil {
179 return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.pon_port_id", err)
180 }
181
182 val, ok = pathParams["onu.onu_id"]
183 if !ok {
184 return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.onu_id")
185 }
186
187 err = runtime.PopulateFieldFromPath(&protoReq, "onu.onu_id", val)
188
189 if err != nil {
190 return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.onu_id", err)
191 }
192
193 if err := req.ParseForm(); err != nil {
194 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
195 }
196 if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_ONUStatus_2); err != nil {
197 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
198 }
199
200 msg, err := client.ONUStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
201 return msg, metadata, err
202
203}
204
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700205var (
206 filter_BBSimService_ONUStatus_3 = &utilities.DoubleArray{Encoding: map[string]int{"onu": 0, "pon_port_id": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}}
207)
208
209func request_BBSimService_ONUStatus_3(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
210 var protoReq ONURequest
211 var metadata runtime.ServerMetadata
212
213 var (
214 val string
215 ok bool
216 err error
217 _ = err
218 )
219
220 val, ok = pathParams["onu.pon_port_id"]
221 if !ok {
222 return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.pon_port_id")
223 }
224
225 err = runtime.PopulateFieldFromPath(&protoReq, "onu.pon_port_id", val)
226
227 if err != nil {
228 return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.pon_port_id", err)
229 }
230
231 if err := req.ParseForm(); err != nil {
232 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
233 }
234 if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_ONUStatus_3); err != nil {
235 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
236 }
237
238 msg, err := client.ONUStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
239 return msg, metadata, err
240
241}
242
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700243var (
244 filter_BBSimService_ONUActivate_0 = &utilities.DoubleArray{Encoding: map[string]int{"onus_batch": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
245)
246
247func request_BBSimService_ONUActivate_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
248 var protoReq ONURequest
249 var metadata runtime.ServerMetadata
250
251 newReader, berr := utilities.IOReaderFactory(req.Body)
252 if berr != nil {
253 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
254 }
255 if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.OnusBatch); err != nil && err != io.EOF {
256 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
257 }
258
259 if err := req.ParseForm(); err != nil {
260 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
261 }
262 if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_ONUActivate_0); err != nil {
263 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
264 }
265
266 msg, err := client.ONUActivate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
267 return msg, metadata, err
268
269}
270
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700271var (
272 filter_BBSimService_ONUActivate_1 = &utilities.DoubleArray{Encoding: map[string]int{"onu": 0, "pon_port_id": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}}
273)
274
275func request_BBSimService_ONUActivate_1(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
276 var protoReq ONURequest
277 var metadata runtime.ServerMetadata
278
279 var (
280 val string
281 ok bool
282 err error
283 _ = err
284 )
285
286 val, ok = pathParams["onu.pon_port_id"]
287 if !ok {
288 return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.pon_port_id")
289 }
290
291 err = runtime.PopulateFieldFromPath(&protoReq, "onu.pon_port_id", val)
292
293 if err != nil {
294 return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.pon_port_id", err)
295 }
296
297 if err := req.ParseForm(); err != nil {
298 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
299 }
300 if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_ONUActivate_1); err != nil {
301 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
302 }
303
304 msg, err := client.ONUActivate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
305 return msg, metadata, err
306
307}
308
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700309var (
310 filter_BBSimService_ONUActivate_2 = &utilities.DoubleArray{Encoding: map[string]int{"onu": 0, "pon_port_id": 1, "onu_serial": 2}, Base: []int{1, 1, 1, 2, 0, 0}, Check: []int{0, 1, 2, 2, 3, 4}}
311)
312
313func request_BBSimService_ONUActivate_2(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
314 var protoReq ONURequest
315 var metadata runtime.ServerMetadata
316
317 var (
318 val string
319 ok bool
320 err error
321 _ = err
322 )
323
324 val, ok = pathParams["onu.pon_port_id"]
325 if !ok {
326 return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.pon_port_id")
327 }
328
329 err = runtime.PopulateFieldFromPath(&protoReq, "onu.pon_port_id", val)
330
331 if err != nil {
332 return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.pon_port_id", err)
333 }
334
335 val, ok = pathParams["onu.onu_serial"]
336 if !ok {
337 return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.onu_serial")
338 }
339
340 err = runtime.PopulateFieldFromPath(&protoReq, "onu.onu_serial", val)
341
342 if err != nil {
343 return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.onu_serial", err)
344 }
345
346 if err := req.ParseForm(); err != nil {
347 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
348 }
349 if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_ONUActivate_2); err != nil {
350 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
351 }
352
353 msg, err := client.ONUActivate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
354 return msg, metadata, err
355
356}
357
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700358var (
359 filter_BBSimService_ONUDeactivate_0 = &utilities.DoubleArray{Encoding: map[string]int{"onus_batch": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
360)
361
362func request_BBSimService_ONUDeactivate_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
363 var protoReq ONURequest
364 var metadata runtime.ServerMetadata
365
366 newReader, berr := utilities.IOReaderFactory(req.Body)
367 if berr != nil {
368 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
369 }
370 if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.OnusBatch); err != nil && err != io.EOF {
371 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
372 }
373
374 if err := req.ParseForm(); err != nil {
375 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
376 }
377 if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_ONUDeactivate_0); err != nil {
378 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
379 }
380
381 msg, err := client.ONUDeactivate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
382 return msg, metadata, err
383
384}
385
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700386var (
387 filter_BBSimService_ONUDeactivate_1 = &utilities.DoubleArray{Encoding: map[string]int{"onu": 0, "onu_serial": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}}
388)
389
390func request_BBSimService_ONUDeactivate_1(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
391 var protoReq ONURequest
392 var metadata runtime.ServerMetadata
393
394 var (
395 val string
396 ok bool
397 err error
398 _ = err
399 )
400
401 val, ok = pathParams["onu.onu_serial"]
402 if !ok {
403 return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.onu_serial")
404 }
405
406 err = runtime.PopulateFieldFromPath(&protoReq, "onu.onu_serial", val)
407
408 if err != nil {
409 return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.onu_serial", err)
410 }
411
412 if err := req.ParseForm(); err != nil {
413 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
414 }
415 if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_ONUDeactivate_1); err != nil {
416 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
417 }
418
419 msg, err := client.ONUDeactivate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
420 return msg, metadata, err
421
422}
423
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700424var (
425 filter_BBSimService_ONUDeactivate_2 = &utilities.DoubleArray{Encoding: map[string]int{"onu": 0, "pon_port_id": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}}
426)
427
428func request_BBSimService_ONUDeactivate_2(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
429 var protoReq ONURequest
430 var metadata runtime.ServerMetadata
431
432 var (
433 val string
434 ok bool
435 err error
436 _ = err
437 )
438
439 val, ok = pathParams["onu.pon_port_id"]
440 if !ok {
441 return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.pon_port_id")
442 }
443
444 err = runtime.PopulateFieldFromPath(&protoReq, "onu.pon_port_id", val)
445
446 if err != nil {
447 return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.pon_port_id", err)
448 }
449
450 if err := req.ParseForm(); err != nil {
451 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
452 }
453 if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_ONUDeactivate_2); err != nil {
454 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
455 }
456
457 msg, err := client.ONUDeactivate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
458 return msg, metadata, err
459
460}
461
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700462var (
463 filter_BBSimService_ONUDeactivate_3 = &utilities.DoubleArray{Encoding: map[string]int{"onu": 0, "pon_port_id": 1, "onu_id": 2}, Base: []int{1, 1, 1, 2, 0, 0}, Check: []int{0, 1, 2, 2, 3, 4}}
464)
465
466func request_BBSimService_ONUDeactivate_3(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
467 var protoReq ONURequest
468 var metadata runtime.ServerMetadata
469
470 var (
471 val string
472 ok bool
473 err error
474 _ = err
475 )
476
477 val, ok = pathParams["onu.pon_port_id"]
478 if !ok {
479 return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.pon_port_id")
480 }
481
482 err = runtime.PopulateFieldFromPath(&protoReq, "onu.pon_port_id", val)
483
484 if err != nil {
485 return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.pon_port_id", err)
486 }
487
488 val, ok = pathParams["onu.onu_id"]
489 if !ok {
490 return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.onu_id")
491 }
492
493 err = runtime.PopulateFieldFromPath(&protoReq, "onu.onu_id", val)
494
495 if err != nil {
496 return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.onu_id", err)
497 }
498
499 if err := req.ParseForm(); err != nil {
500 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
501 }
502 if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_ONUDeactivate_3); err != nil {
503 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
504 }
505
506 msg, err := client.ONUDeactivate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
507 return msg, metadata, err
508
509}
510
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700511func request_BBSimService_GenerateONUAlarm_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
512 var protoReq ONUAlarmRequest
513 var metadata runtime.ServerMetadata
514
515 var (
516 val string
517 ok bool
518 err error
519 _ = err
520 )
521
522 val, ok = pathParams["onu_serial"]
523 if !ok {
524 return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu_serial")
525 }
526
527 protoReq.OnuSerial, err = runtime.String(val)
528
529 if err != nil {
530 return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu_serial", err)
531 }
532
533 val, ok = pathParams["alarm_type"]
534 if !ok {
535 return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "alarm_type")
536 }
537
538 protoReq.AlarmType, err = runtime.String(val)
539
540 if err != nil {
541 return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "alarm_type", err)
542 }
543
544 val, ok = pathParams["status"]
545 if !ok {
546 return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "status")
547 }
548
549 protoReq.Status, err = runtime.String(val)
550
551 if err != nil {
552 return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "status", err)
553 }
554
555 msg, err := client.GenerateONUAlarm(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
556 return msg, metadata, err
557
558}
559
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700560func request_BBSimService_GenerateOLTAlarm_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
561 var protoReq OLTAlarmRequest
562 var metadata runtime.ServerMetadata
563
564 var (
565 val string
566 ok bool
567 err error
568 _ = err
569 )
570
571 val, ok = pathParams["port_type"]
572 if !ok {
573 return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_type")
574 }
575
576 protoReq.PortType, err = runtime.String(val)
577
578 if err != nil {
579 return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_type", err)
580 }
581
582 val, ok = pathParams["port_id"]
583 if !ok {
584 return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id")
585 }
586
587 protoReq.PortId, err = runtime.Uint32(val)
588
589 if err != nil {
590 return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err)
591 }
592
593 val, ok = pathParams["status"]
594 if !ok {
595 return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "status")
596 }
597
598 protoReq.Status, err = runtime.String(val)
599
600 if err != nil {
601 return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "status", err)
602 }
603
604 msg, err := client.GenerateOLTAlarm(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
605 return msg, metadata, err
606
607}
608
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700609var (
610 filter_BBSimService_PerformDeviceAction_0 = &utilities.DoubleArray{Encoding: map[string]int{"device_type": 0, "action": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}}
611)
612
613func request_BBSimService_PerformDeviceAction_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
614 var protoReq DeviceAction
615 var metadata runtime.ServerMetadata
616
617 var (
618 val string
619 ok bool
620 err error
621 _ = err
622 )
623
624 val, ok = pathParams["device_type"]
625 if !ok {
626 return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "device_type")
627 }
628
629 protoReq.DeviceType, err = runtime.String(val)
630
631 if err != nil {
632 return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "device_type", err)
633 }
634
635 val, ok = pathParams["action"]
636 if !ok {
637 return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "action")
638 }
639
640 protoReq.Action, err = runtime.String(val)
641
642 if err != nil {
643 return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "action", err)
644 }
645
646 if err := req.ParseForm(); err != nil {
647 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
648 }
649 if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_PerformDeviceAction_0); err != nil {
650 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
651 }
652
653 msg, err := client.PerformDeviceAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
654 return msg, metadata, err
655
656}
657
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700658func request_BBSimService_PerformDeviceAction_1(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
659 var protoReq DeviceAction
660 var metadata runtime.ServerMetadata
661
662 var (
663 val string
664 ok bool
665 err error
666 _ = err
667 )
668
669 val, ok = pathParams["device_type"]
670 if !ok {
671 return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "device_type")
672 }
673
674 protoReq.DeviceType, err = runtime.String(val)
675
676 if err != nil {
677 return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "device_type", err)
678 }
679
680 val, ok = pathParams["serial_number"]
681 if !ok {
682 return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "serial_number")
683 }
684
685 protoReq.SerialNumber, err = runtime.String(val)
686
687 if err != nil {
688 return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "serial_number", err)
689 }
690
691 val, ok = pathParams["action"]
692 if !ok {
693 return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "action")
694 }
695
696 protoReq.Action, err = runtime.String(val)
697
698 if err != nil {
699 return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "action", err)
700 }
701
702 msg, err := client.PerformDeviceAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
703 return msg, metadata, err
704
705}
706
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700707var (
708 filter_BBSimService_GetFlows_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
709)
710
711func request_BBSimService_GetFlows_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
712 var protoReq ONUInfo
713 var metadata runtime.ServerMetadata
714
715 if err := req.ParseForm(); err != nil {
716 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
717 }
718 if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_GetFlows_0); err != nil {
719 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
720 }
721
722 msg, err := client.GetFlows(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
723 return msg, metadata, err
724
725}
726
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700727var (
728 filter_BBSimService_GetFlows_1 = &utilities.DoubleArray{Encoding: map[string]int{"onu_serial": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
729)
730
731func request_BBSimService_GetFlows_1(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
732 var protoReq ONUInfo
733 var metadata runtime.ServerMetadata
734
735 var (
736 val string
737 ok bool
738 err error
739 _ = err
740 )
741
742 val, ok = pathParams["onu_serial"]
743 if !ok {
744 return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu_serial")
745 }
746
747 protoReq.OnuSerial, err = runtime.String(val)
748
749 if err != nil {
750 return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu_serial", err)
751 }
752
753 if err := req.ParseForm(); err != nil {
754 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
755 }
756 if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_GetFlows_1); err != nil {
757 return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
758 }
759
760 msg, err := client.GetFlows(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
761 return msg, metadata, err
762
763}
764
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700765// RegisterBBSimServiceHandlerFromEndpoint is same as RegisterBBSimServiceHandler but
766// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
767func RegisterBBSimServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
768 conn, err := grpc.Dial(endpoint, opts...)
769 if err != nil {
770 return err
771 }
772 defer func() {
773 if err != nil {
774 if cerr := conn.Close(); cerr != nil {
775 grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
776 }
777 return
778 }
779 go func() {
780 <-ctx.Done()
781 if cerr := conn.Close(); cerr != nil {
782 grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
783 }
784 }()
785 }()
786
787 return RegisterBBSimServiceHandler(ctx, mux, conn)
788}
789
790// RegisterBBSimServiceHandler registers the http handlers for service BBSimService to "mux".
791// The handlers forward requests to the grpc endpoint over "conn".
792func RegisterBBSimServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
793 return RegisterBBSimServiceHandlerClient(ctx, mux, NewBBSimServiceClient(conn))
794}
795
796// RegisterBBSimServiceHandlerClient registers the http handlers for service BBSimService
797// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BBSimServiceClient".
798// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BBSimServiceClient"
799// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
800// "BBSimServiceClient" to call the correct interceptors.
801func RegisterBBSimServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BBSimServiceClient) error {
802
803 mux.Handle("GET", pattern_BBSimService_OLTStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
804 ctx, cancel := context.WithCancel(req.Context())
805 defer cancel()
806 inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
807 rctx, err := runtime.AnnotateContext(ctx, mux, req)
808 if err != nil {
809 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
810 return
811 }
812 resp, md, err := request_BBSimService_OLTStatus_0(rctx, inboundMarshaler, client, req, pathParams)
813 ctx = runtime.NewServerMetadataContext(ctx, md)
814 if err != nil {
815 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
816 return
817 }
818
819 forward_BBSimService_OLTStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
820
821 })
822
823 mux.Handle("GET", pattern_BBSimService_OLTStatus_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
824 ctx, cancel := context.WithCancel(req.Context())
825 defer cancel()
826 inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
827 rctx, err := runtime.AnnotateContext(ctx, mux, req)
828 if err != nil {
829 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
830 return
831 }
832 resp, md, err := request_BBSimService_OLTStatus_1(rctx, inboundMarshaler, client, req, pathParams)
833 ctx = runtime.NewServerMetadataContext(ctx, md)
834 if err != nil {
835 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
836 return
837 }
838
839 forward_BBSimService_OLTStatus_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
840
841 })
842
843 mux.Handle("GET", pattern_BBSimService_PortStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
844 ctx, cancel := context.WithCancel(req.Context())
845 defer cancel()
846 inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
847 rctx, err := runtime.AnnotateContext(ctx, mux, req)
848 if err != nil {
849 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
850 return
851 }
852 resp, md, err := request_BBSimService_PortStatus_0(rctx, inboundMarshaler, client, req, pathParams)
853 ctx = runtime.NewServerMetadataContext(ctx, md)
854 if err != nil {
855 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
856 return
857 }
858
859 forward_BBSimService_PortStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
860
861 })
862
863 mux.Handle("GET", pattern_BBSimService_ONUStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
864 ctx, cancel := context.WithCancel(req.Context())
865 defer cancel()
866 inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
867 rctx, err := runtime.AnnotateContext(ctx, mux, req)
868 if err != nil {
869 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
870 return
871 }
872 resp, md, err := request_BBSimService_ONUStatus_0(rctx, inboundMarshaler, client, req, pathParams)
873 ctx = runtime.NewServerMetadataContext(ctx, md)
874 if err != nil {
875 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
876 return
877 }
878
879 forward_BBSimService_ONUStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
880
881 })
882
883 mux.Handle("GET", pattern_BBSimService_ONUStatus_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
884 ctx, cancel := context.WithCancel(req.Context())
885 defer cancel()
886 inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
887 rctx, err := runtime.AnnotateContext(ctx, mux, req)
888 if err != nil {
889 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
890 return
891 }
892 resp, md, err := request_BBSimService_ONUStatus_1(rctx, inboundMarshaler, client, req, pathParams)
893 ctx = runtime.NewServerMetadataContext(ctx, md)
894 if err != nil {
895 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
896 return
897 }
898
899 forward_BBSimService_ONUStatus_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
900
901 })
902
903 mux.Handle("GET", pattern_BBSimService_ONUStatus_2, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
904 ctx, cancel := context.WithCancel(req.Context())
905 defer cancel()
906 inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
907 rctx, err := runtime.AnnotateContext(ctx, mux, req)
908 if err != nil {
909 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
910 return
911 }
912 resp, md, err := request_BBSimService_ONUStatus_2(rctx, inboundMarshaler, client, req, pathParams)
913 ctx = runtime.NewServerMetadataContext(ctx, md)
914 if err != nil {
915 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
916 return
917 }
918
919 forward_BBSimService_ONUStatus_2(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
920
921 })
922
923 mux.Handle("GET", pattern_BBSimService_ONUStatus_3, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
924 ctx, cancel := context.WithCancel(req.Context())
925 defer cancel()
926 inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
927 rctx, err := runtime.AnnotateContext(ctx, mux, req)
928 if err != nil {
929 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
930 return
931 }
932 resp, md, err := request_BBSimService_ONUStatus_3(rctx, inboundMarshaler, client, req, pathParams)
933 ctx = runtime.NewServerMetadataContext(ctx, md)
934 if err != nil {
935 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
936 return
937 }
938
939 forward_BBSimService_ONUStatus_3(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
940
941 })
942
943 mux.Handle("POST", pattern_BBSimService_ONUActivate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
944 ctx, cancel := context.WithCancel(req.Context())
945 defer cancel()
946 inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
947 rctx, err := runtime.AnnotateContext(ctx, mux, req)
948 if err != nil {
949 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
950 return
951 }
952 resp, md, err := request_BBSimService_ONUActivate_0(rctx, inboundMarshaler, client, req, pathParams)
953 ctx = runtime.NewServerMetadataContext(ctx, md)
954 if err != nil {
955 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
956 return
957 }
958
959 forward_BBSimService_ONUActivate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
960
961 })
962
963 mux.Handle("POST", pattern_BBSimService_ONUActivate_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
964 ctx, cancel := context.WithCancel(req.Context())
965 defer cancel()
966 inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
967 rctx, err := runtime.AnnotateContext(ctx, mux, req)
968 if err != nil {
969 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
970 return
971 }
972 resp, md, err := request_BBSimService_ONUActivate_1(rctx, inboundMarshaler, client, req, pathParams)
973 ctx = runtime.NewServerMetadataContext(ctx, md)
974 if err != nil {
975 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
976 return
977 }
978
979 forward_BBSimService_ONUActivate_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
980
981 })
982
983 mux.Handle("POST", pattern_BBSimService_ONUActivate_2, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
984 ctx, cancel := context.WithCancel(req.Context())
985 defer cancel()
986 inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
987 rctx, err := runtime.AnnotateContext(ctx, mux, req)
988 if err != nil {
989 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
990 return
991 }
992 resp, md, err := request_BBSimService_ONUActivate_2(rctx, inboundMarshaler, client, req, pathParams)
993 ctx = runtime.NewServerMetadataContext(ctx, md)
994 if err != nil {
995 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
996 return
997 }
998
999 forward_BBSimService_ONUActivate_2(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1000
1001 })
1002
1003 mux.Handle("DELETE", pattern_BBSimService_ONUDeactivate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1004 ctx, cancel := context.WithCancel(req.Context())
1005 defer cancel()
1006 inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1007 rctx, err := runtime.AnnotateContext(ctx, mux, req)
1008 if err != nil {
1009 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1010 return
1011 }
1012 resp, md, err := request_BBSimService_ONUDeactivate_0(rctx, inboundMarshaler, client, req, pathParams)
1013 ctx = runtime.NewServerMetadataContext(ctx, md)
1014 if err != nil {
1015 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1016 return
1017 }
1018
1019 forward_BBSimService_ONUDeactivate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1020
1021 })
1022
1023 mux.Handle("DELETE", pattern_BBSimService_ONUDeactivate_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1024 ctx, cancel := context.WithCancel(req.Context())
1025 defer cancel()
1026 inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1027 rctx, err := runtime.AnnotateContext(ctx, mux, req)
1028 if err != nil {
1029 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1030 return
1031 }
1032 resp, md, err := request_BBSimService_ONUDeactivate_1(rctx, inboundMarshaler, client, req, pathParams)
1033 ctx = runtime.NewServerMetadataContext(ctx, md)
1034 if err != nil {
1035 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1036 return
1037 }
1038
1039 forward_BBSimService_ONUDeactivate_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1040
1041 })
1042
1043 mux.Handle("DELETE", pattern_BBSimService_ONUDeactivate_2, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1044 ctx, cancel := context.WithCancel(req.Context())
1045 defer cancel()
1046 inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1047 rctx, err := runtime.AnnotateContext(ctx, mux, req)
1048 if err != nil {
1049 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1050 return
1051 }
1052 resp, md, err := request_BBSimService_ONUDeactivate_2(rctx, inboundMarshaler, client, req, pathParams)
1053 ctx = runtime.NewServerMetadataContext(ctx, md)
1054 if err != nil {
1055 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1056 return
1057 }
1058
1059 forward_BBSimService_ONUDeactivate_2(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1060
1061 })
1062
1063 mux.Handle("DELETE", pattern_BBSimService_ONUDeactivate_3, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1064 ctx, cancel := context.WithCancel(req.Context())
1065 defer cancel()
1066 inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1067 rctx, err := runtime.AnnotateContext(ctx, mux, req)
1068 if err != nil {
1069 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1070 return
1071 }
1072 resp, md, err := request_BBSimService_ONUDeactivate_3(rctx, inboundMarshaler, client, req, pathParams)
1073 ctx = runtime.NewServerMetadataContext(ctx, md)
1074 if err != nil {
1075 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1076 return
1077 }
1078
1079 forward_BBSimService_ONUDeactivate_3(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1080
1081 })
1082
1083 mux.Handle("POST", pattern_BBSimService_GenerateONUAlarm_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1084 ctx, cancel := context.WithCancel(req.Context())
1085 defer cancel()
1086 inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1087 rctx, err := runtime.AnnotateContext(ctx, mux, req)
1088 if err != nil {
1089 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1090 return
1091 }
1092 resp, md, err := request_BBSimService_GenerateONUAlarm_0(rctx, inboundMarshaler, client, req, pathParams)
1093 ctx = runtime.NewServerMetadataContext(ctx, md)
1094 if err != nil {
1095 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1096 return
1097 }
1098
1099 forward_BBSimService_GenerateONUAlarm_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1100
1101 })
1102
1103 mux.Handle("POST", pattern_BBSimService_GenerateOLTAlarm_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1104 ctx, cancel := context.WithCancel(req.Context())
1105 defer cancel()
1106 inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1107 rctx, err := runtime.AnnotateContext(ctx, mux, req)
1108 if err != nil {
1109 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1110 return
1111 }
1112 resp, md, err := request_BBSimService_GenerateOLTAlarm_0(rctx, inboundMarshaler, client, req, pathParams)
1113 ctx = runtime.NewServerMetadataContext(ctx, md)
1114 if err != nil {
1115 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1116 return
1117 }
1118
1119 forward_BBSimService_GenerateOLTAlarm_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1120
1121 })
1122
1123 mux.Handle("PATCH", pattern_BBSimService_PerformDeviceAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1124 ctx, cancel := context.WithCancel(req.Context())
1125 defer cancel()
1126 inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1127 rctx, err := runtime.AnnotateContext(ctx, mux, req)
1128 if err != nil {
1129 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1130 return
1131 }
1132 resp, md, err := request_BBSimService_PerformDeviceAction_0(rctx, inboundMarshaler, client, req, pathParams)
1133 ctx = runtime.NewServerMetadataContext(ctx, md)
1134 if err != nil {
1135 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1136 return
1137 }
1138
1139 forward_BBSimService_PerformDeviceAction_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1140
1141 })
1142
1143 mux.Handle("PATCH", pattern_BBSimService_PerformDeviceAction_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1144 ctx, cancel := context.WithCancel(req.Context())
1145 defer cancel()
1146 inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1147 rctx, err := runtime.AnnotateContext(ctx, mux, req)
1148 if err != nil {
1149 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1150 return
1151 }
1152 resp, md, err := request_BBSimService_PerformDeviceAction_1(rctx, inboundMarshaler, client, req, pathParams)
1153 ctx = runtime.NewServerMetadataContext(ctx, md)
1154 if err != nil {
1155 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1156 return
1157 }
1158
1159 forward_BBSimService_PerformDeviceAction_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1160
1161 })
1162
1163 mux.Handle("GET", pattern_BBSimService_GetFlows_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1164 ctx, cancel := context.WithCancel(req.Context())
1165 defer cancel()
1166 inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1167 rctx, err := runtime.AnnotateContext(ctx, mux, req)
1168 if err != nil {
1169 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1170 return
1171 }
1172 resp, md, err := request_BBSimService_GetFlows_0(rctx, inboundMarshaler, client, req, pathParams)
1173 ctx = runtime.NewServerMetadataContext(ctx, md)
1174 if err != nil {
1175 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1176 return
1177 }
1178
1179 forward_BBSimService_GetFlows_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1180
1181 })
1182
1183 mux.Handle("GET", pattern_BBSimService_GetFlows_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
1184 ctx, cancel := context.WithCancel(req.Context())
1185 defer cancel()
1186 inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
1187 rctx, err := runtime.AnnotateContext(ctx, mux, req)
1188 if err != nil {
1189 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1190 return
1191 }
1192 resp, md, err := request_BBSimService_GetFlows_1(rctx, inboundMarshaler, client, req, pathParams)
1193 ctx = runtime.NewServerMetadataContext(ctx, md)
1194 if err != nil {
1195 runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
1196 return
1197 }
1198
1199 forward_BBSimService_GetFlows_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
1200
1201 })
1202
1203 return nil
1204}
1205
1206var (
1207 pattern_BBSimService_OLTStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v0", "olt"}, "", runtime.AssumeColonVerbOpt(true)))
1208
1209 pattern_BBSimService_OLTStatus_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v0", "olt", "status"}, "", runtime.AssumeColonVerbOpt(true)))
1210
1211 pattern_BBSimService_PortStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"v0", "olt", "ports", "port_type", "port_id", "status"}, "", runtime.AssumeColonVerbOpt(true)))
1212
1213 pattern_BBSimService_ONUStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v0", "olt", "onus"}, "", runtime.AssumeColonVerbOpt(true)))
1214
1215 pattern_BBSimService_ONUStatus_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v0", "olt", "onus", "onu.onu_serial"}, "", runtime.AssumeColonVerbOpt(true)))
1216
1217 pattern_BBSimService_ONUStatus_2 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"v0", "olt", "ports", "onu.pon_port_id", "onus", "onu.onu_id"}, "", runtime.AssumeColonVerbOpt(true)))
1218
1219 pattern_BBSimService_ONUStatus_3 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"v0", "olt", "ports", "onu.pon_port_id", "onus"}, "", runtime.AssumeColonVerbOpt(true)))
1220
1221 pattern_BBSimService_ONUActivate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v0", "olt", "onus"}, "", runtime.AssumeColonVerbOpt(true)))
1222
1223 pattern_BBSimService_ONUActivate_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"v0", "olt", "ports", "onu.pon_port_id", "onus"}, "", runtime.AssumeColonVerbOpt(true)))
1224
1225 pattern_BBSimService_ONUActivate_2 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"v0", "olt", "ports", "onu.pon_port_id", "onus", "onu.onu_serial"}, "", runtime.AssumeColonVerbOpt(true)))
1226
1227 pattern_BBSimService_ONUDeactivate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v0", "olt", "onus"}, "", runtime.AssumeColonVerbOpt(true)))
1228
1229 pattern_BBSimService_ONUDeactivate_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v0", "olt", "onus", "onu.onu_serial"}, "", runtime.AssumeColonVerbOpt(true)))
1230
1231 pattern_BBSimService_ONUDeactivate_2 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"v0", "olt", "ports", "onu.pon_port_id", "onus"}, "", runtime.AssumeColonVerbOpt(true)))
1232
1233 pattern_BBSimService_ONUDeactivate_3 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"v0", "olt", "ports", "onu.pon_port_id", "onus", "onu.onu_id"}, "", runtime.AssumeColonVerbOpt(true)))
1234
1235 pattern_BBSimService_GenerateONUAlarm_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 1, 0, 4, 1, 5, 6}, []string{"v0", "olt", "onus", "onu_serial", "alarms", "alarm_type", "status"}, "", runtime.AssumeColonVerbOpt(true)))
1236
1237 pattern_BBSimService_GenerateOLTAlarm_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4, 2, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"v0", "olt", "ports", "port_type", "port_id", "alarms", "los", "status"}, "", runtime.AssumeColonVerbOpt(true)))
1238
1239 pattern_BBSimService_PerformDeviceAction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2, 1, 0, 4, 1, 5, 2}, []string{"v0", "device_type", "action"}, "", runtime.AssumeColonVerbOpt(true)))
1240
1241 pattern_BBSimService_PerformDeviceAction_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 4}, []string{"v0", "olt", "device_type", "serial_number", "action"}, "", runtime.AssumeColonVerbOpt(true)))
1242
1243 pattern_BBSimService_GetFlows_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v0", "olt", "flows"}, "", runtime.AssumeColonVerbOpt(true)))
1244
1245 pattern_BBSimService_GetFlows_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"v0", "olt", "onu", "onu_serial", "flows"}, "", runtime.AssumeColonVerbOpt(true)))
1246)
1247
1248var (
1249 forward_BBSimService_OLTStatus_0 = runtime.ForwardResponseMessage
1250
1251 forward_BBSimService_OLTStatus_1 = runtime.ForwardResponseMessage
1252
1253 forward_BBSimService_PortStatus_0 = runtime.ForwardResponseMessage
1254
1255 forward_BBSimService_ONUStatus_0 = runtime.ForwardResponseMessage
1256
1257 forward_BBSimService_ONUStatus_1 = runtime.ForwardResponseMessage
1258
1259 forward_BBSimService_ONUStatus_2 = runtime.ForwardResponseMessage
1260
1261 forward_BBSimService_ONUStatus_3 = runtime.ForwardResponseMessage
1262
1263 forward_BBSimService_ONUActivate_0 = runtime.ForwardResponseMessage
1264
1265 forward_BBSimService_ONUActivate_1 = runtime.ForwardResponseMessage
1266
1267 forward_BBSimService_ONUActivate_2 = runtime.ForwardResponseMessage
1268
1269 forward_BBSimService_ONUDeactivate_0 = runtime.ForwardResponseMessage
1270
1271 forward_BBSimService_ONUDeactivate_1 = runtime.ForwardResponseMessage
1272
1273 forward_BBSimService_ONUDeactivate_2 = runtime.ForwardResponseMessage
1274
1275 forward_BBSimService_ONUDeactivate_3 = runtime.ForwardResponseMessage
1276
1277 forward_BBSimService_GenerateONUAlarm_0 = runtime.ForwardResponseMessage
1278
1279 forward_BBSimService_GenerateOLTAlarm_0 = runtime.ForwardResponseMessage
1280
1281 forward_BBSimService_PerformDeviceAction_0 = runtime.ForwardResponseMessage
1282
1283 forward_BBSimService_PerformDeviceAction_1 = runtime.ForwardResponseMessage
1284
1285 forward_BBSimService_GetFlows_0 = runtime.ForwardResponseMessage
1286
1287 forward_BBSimService_GetFlows_1 = runtime.ForwardResponseMessage
1288)