Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 1 | // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. |
| 2 | // source: api/legacy/bbsim.proto |
| 3 | |
| 4 | /* |
| 5 | Package legacy is a reverse proxy. |
| 6 | |
| 7 | It translates gRPC into RESTful JSON APIs. |
| 8 | */ |
| 9 | package legacy |
| 10 | |
| 11 | import ( |
| 12 | "context" |
| 13 | "io" |
| 14 | "net/http" |
| 15 | |
| 16 | "github.com/golang/protobuf/descriptor" |
| 17 | "github.com/golang/protobuf/proto" |
| 18 | "github.com/grpc-ecosystem/grpc-gateway/runtime" |
| 19 | "github.com/grpc-ecosystem/grpc-gateway/utilities" |
| 20 | "google.golang.org/grpc" |
| 21 | "google.golang.org/grpc/codes" |
| 22 | "google.golang.org/grpc/grpclog" |
| 23 | "google.golang.org/grpc/status" |
| 24 | ) |
| 25 | |
| 26 | // Suppress "imported and not used" errors |
| 27 | var _ codes.Code |
| 28 | var _ io.Reader |
| 29 | var _ status.Status |
| 30 | var _ = runtime.String |
| 31 | var _ = utilities.NewDoubleArray |
| 32 | var _ = descriptor.ForMessage |
| 33 | |
| 34 | func request_BBSimService_OLTStatus_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 35 | var protoReq Empty |
| 36 | var metadata runtime.ServerMetadata |
| 37 | |
| 38 | msg, err := client.OLTStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| 39 | return msg, metadata, err |
| 40 | |
| 41 | } |
| 42 | |
| 43 | func local_request_BBSimService_OLTStatus_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 44 | var protoReq Empty |
| 45 | var metadata runtime.ServerMetadata |
| 46 | |
| 47 | msg, err := server.OLTStatus(ctx, &protoReq) |
| 48 | return msg, metadata, err |
| 49 | |
| 50 | } |
| 51 | |
| 52 | func request_BBSimService_OLTStatus_1(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 53 | var protoReq Empty |
| 54 | var metadata runtime.ServerMetadata |
| 55 | |
| 56 | msg, err := client.OLTStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| 57 | return msg, metadata, err |
| 58 | |
| 59 | } |
| 60 | |
| 61 | func local_request_BBSimService_OLTStatus_1(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 62 | var protoReq Empty |
| 63 | var metadata runtime.ServerMetadata |
| 64 | |
| 65 | msg, err := server.OLTStatus(ctx, &protoReq) |
| 66 | return msg, metadata, err |
| 67 | |
| 68 | } |
| 69 | |
| 70 | var ( |
| 71 | 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}} |
| 72 | ) |
| 73 | |
| 74 | func request_BBSimService_PortStatus_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 75 | var protoReq PortInfo |
| 76 | var metadata runtime.ServerMetadata |
| 77 | |
| 78 | var ( |
| 79 | val string |
| 80 | ok bool |
| 81 | err error |
| 82 | _ = err |
| 83 | ) |
| 84 | |
| 85 | val, ok = pathParams["port_type"] |
| 86 | if !ok { |
| 87 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_type") |
| 88 | } |
| 89 | |
| 90 | protoReq.PortType, err = runtime.String(val) |
| 91 | |
| 92 | if err != nil { |
| 93 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_type", err) |
| 94 | } |
| 95 | |
| 96 | val, ok = pathParams["port_id"] |
| 97 | if !ok { |
| 98 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id") |
| 99 | } |
| 100 | |
| 101 | protoReq.PortId, err = runtime.Uint32(val) |
| 102 | |
| 103 | if err != nil { |
| 104 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) |
| 105 | } |
| 106 | |
| 107 | if err := req.ParseForm(); err != nil { |
| 108 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 109 | } |
| 110 | if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_PortStatus_0); err != nil { |
| 111 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 112 | } |
| 113 | |
| 114 | msg, err := client.PortStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| 115 | return msg, metadata, err |
| 116 | |
| 117 | } |
| 118 | |
| 119 | func local_request_BBSimService_PortStatus_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 120 | var protoReq PortInfo |
| 121 | var metadata runtime.ServerMetadata |
| 122 | |
| 123 | var ( |
| 124 | val string |
| 125 | ok bool |
| 126 | err error |
| 127 | _ = err |
| 128 | ) |
| 129 | |
| 130 | val, ok = pathParams["port_type"] |
| 131 | if !ok { |
| 132 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_type") |
| 133 | } |
| 134 | |
| 135 | protoReq.PortType, err = runtime.String(val) |
| 136 | |
| 137 | if err != nil { |
| 138 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_type", err) |
| 139 | } |
| 140 | |
| 141 | val, ok = pathParams["port_id"] |
| 142 | if !ok { |
| 143 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id") |
| 144 | } |
| 145 | |
| 146 | protoReq.PortId, err = runtime.Uint32(val) |
| 147 | |
| 148 | if err != nil { |
| 149 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) |
| 150 | } |
| 151 | |
| 152 | if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BBSimService_PortStatus_0); err != nil { |
| 153 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 154 | } |
| 155 | |
| 156 | msg, err := server.PortStatus(ctx, &protoReq) |
| 157 | return msg, metadata, err |
| 158 | |
| 159 | } |
| 160 | |
| 161 | var ( |
| 162 | filter_BBSimService_ONUStatus_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} |
| 163 | ) |
| 164 | |
| 165 | func request_BBSimService_ONUStatus_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 166 | var protoReq ONURequest |
| 167 | var metadata runtime.ServerMetadata |
| 168 | |
| 169 | if err := req.ParseForm(); err != nil { |
| 170 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 171 | } |
| 172 | if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_ONUStatus_0); err != nil { |
| 173 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 174 | } |
| 175 | |
| 176 | msg, err := client.ONUStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| 177 | return msg, metadata, err |
| 178 | |
| 179 | } |
| 180 | |
| 181 | func local_request_BBSimService_ONUStatus_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 182 | var protoReq ONURequest |
| 183 | var metadata runtime.ServerMetadata |
| 184 | |
| 185 | if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BBSimService_ONUStatus_0); err != nil { |
| 186 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 187 | } |
| 188 | |
| 189 | msg, err := server.ONUStatus(ctx, &protoReq) |
| 190 | return msg, metadata, err |
| 191 | |
| 192 | } |
| 193 | |
| 194 | var ( |
| 195 | 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}} |
| 196 | ) |
| 197 | |
| 198 | func request_BBSimService_ONUStatus_1(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 199 | var protoReq ONURequest |
| 200 | var metadata runtime.ServerMetadata |
| 201 | |
| 202 | var ( |
| 203 | val string |
| 204 | ok bool |
| 205 | err error |
| 206 | _ = err |
| 207 | ) |
| 208 | |
| 209 | val, ok = pathParams["onu.onu_serial"] |
| 210 | if !ok { |
| 211 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.onu_serial") |
| 212 | } |
| 213 | |
| 214 | err = runtime.PopulateFieldFromPath(&protoReq, "onu.onu_serial", val) |
| 215 | |
| 216 | if err != nil { |
| 217 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.onu_serial", err) |
| 218 | } |
| 219 | |
| 220 | if err := req.ParseForm(); err != nil { |
| 221 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 222 | } |
| 223 | if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_ONUStatus_1); err != nil { |
| 224 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 225 | } |
| 226 | |
| 227 | msg, err := client.ONUStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| 228 | return msg, metadata, err |
| 229 | |
| 230 | } |
| 231 | |
| 232 | func local_request_BBSimService_ONUStatus_1(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 233 | var protoReq ONURequest |
| 234 | var metadata runtime.ServerMetadata |
| 235 | |
| 236 | var ( |
| 237 | val string |
| 238 | ok bool |
| 239 | err error |
| 240 | _ = err |
| 241 | ) |
| 242 | |
| 243 | val, ok = pathParams["onu.onu_serial"] |
| 244 | if !ok { |
| 245 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.onu_serial") |
| 246 | } |
| 247 | |
| 248 | err = runtime.PopulateFieldFromPath(&protoReq, "onu.onu_serial", val) |
| 249 | |
| 250 | if err != nil { |
| 251 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.onu_serial", err) |
| 252 | } |
| 253 | |
| 254 | if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BBSimService_ONUStatus_1); err != nil { |
| 255 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 256 | } |
| 257 | |
| 258 | msg, err := server.ONUStatus(ctx, &protoReq) |
| 259 | return msg, metadata, err |
| 260 | |
| 261 | } |
| 262 | |
| 263 | var ( |
| 264 | 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}} |
| 265 | ) |
| 266 | |
| 267 | func request_BBSimService_ONUStatus_2(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 268 | var protoReq ONURequest |
| 269 | var metadata runtime.ServerMetadata |
| 270 | |
| 271 | var ( |
| 272 | val string |
| 273 | ok bool |
| 274 | err error |
| 275 | _ = err |
| 276 | ) |
| 277 | |
| 278 | val, ok = pathParams["onu.pon_port_id"] |
| 279 | if !ok { |
| 280 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.pon_port_id") |
| 281 | } |
| 282 | |
| 283 | err = runtime.PopulateFieldFromPath(&protoReq, "onu.pon_port_id", val) |
| 284 | |
| 285 | if err != nil { |
| 286 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.pon_port_id", err) |
| 287 | } |
| 288 | |
| 289 | val, ok = pathParams["onu.onu_id"] |
| 290 | if !ok { |
| 291 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.onu_id") |
| 292 | } |
| 293 | |
| 294 | err = runtime.PopulateFieldFromPath(&protoReq, "onu.onu_id", val) |
| 295 | |
| 296 | if err != nil { |
| 297 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.onu_id", err) |
| 298 | } |
| 299 | |
| 300 | if err := req.ParseForm(); err != nil { |
| 301 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 302 | } |
| 303 | if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_ONUStatus_2); err != nil { |
| 304 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 305 | } |
| 306 | |
| 307 | msg, err := client.ONUStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| 308 | return msg, metadata, err |
| 309 | |
| 310 | } |
| 311 | |
| 312 | func local_request_BBSimService_ONUStatus_2(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 313 | var protoReq ONURequest |
| 314 | var metadata runtime.ServerMetadata |
| 315 | |
| 316 | var ( |
| 317 | val string |
| 318 | ok bool |
| 319 | err error |
| 320 | _ = err |
| 321 | ) |
| 322 | |
| 323 | val, ok = pathParams["onu.pon_port_id"] |
| 324 | if !ok { |
| 325 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.pon_port_id") |
| 326 | } |
| 327 | |
| 328 | err = runtime.PopulateFieldFromPath(&protoReq, "onu.pon_port_id", val) |
| 329 | |
| 330 | if err != nil { |
| 331 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.pon_port_id", err) |
| 332 | } |
| 333 | |
| 334 | val, ok = pathParams["onu.onu_id"] |
| 335 | if !ok { |
| 336 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.onu_id") |
| 337 | } |
| 338 | |
| 339 | err = runtime.PopulateFieldFromPath(&protoReq, "onu.onu_id", val) |
| 340 | |
| 341 | if err != nil { |
| 342 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.onu_id", err) |
| 343 | } |
| 344 | |
| 345 | if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BBSimService_ONUStatus_2); err != nil { |
| 346 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 347 | } |
| 348 | |
| 349 | msg, err := server.ONUStatus(ctx, &protoReq) |
| 350 | return msg, metadata, err |
| 351 | |
| 352 | } |
| 353 | |
| 354 | var ( |
| 355 | 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}} |
| 356 | ) |
| 357 | |
| 358 | func request_BBSimService_ONUStatus_3(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 359 | var protoReq ONURequest |
| 360 | var metadata runtime.ServerMetadata |
| 361 | |
| 362 | var ( |
| 363 | val string |
| 364 | ok bool |
| 365 | err error |
| 366 | _ = err |
| 367 | ) |
| 368 | |
| 369 | val, ok = pathParams["onu.pon_port_id"] |
| 370 | if !ok { |
| 371 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.pon_port_id") |
| 372 | } |
| 373 | |
| 374 | err = runtime.PopulateFieldFromPath(&protoReq, "onu.pon_port_id", val) |
| 375 | |
| 376 | if err != nil { |
| 377 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.pon_port_id", err) |
| 378 | } |
| 379 | |
| 380 | if err := req.ParseForm(); err != nil { |
| 381 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 382 | } |
| 383 | if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_ONUStatus_3); err != nil { |
| 384 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 385 | } |
| 386 | |
| 387 | msg, err := client.ONUStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| 388 | return msg, metadata, err |
| 389 | |
| 390 | } |
| 391 | |
| 392 | func local_request_BBSimService_ONUStatus_3(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 393 | var protoReq ONURequest |
| 394 | var metadata runtime.ServerMetadata |
| 395 | |
| 396 | var ( |
| 397 | val string |
| 398 | ok bool |
| 399 | err error |
| 400 | _ = err |
| 401 | ) |
| 402 | |
| 403 | val, ok = pathParams["onu.pon_port_id"] |
| 404 | if !ok { |
| 405 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.pon_port_id") |
| 406 | } |
| 407 | |
| 408 | err = runtime.PopulateFieldFromPath(&protoReq, "onu.pon_port_id", val) |
| 409 | |
| 410 | if err != nil { |
| 411 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.pon_port_id", err) |
| 412 | } |
| 413 | |
| 414 | if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BBSimService_ONUStatus_3); err != nil { |
| 415 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 416 | } |
| 417 | |
| 418 | msg, err := server.ONUStatus(ctx, &protoReq) |
| 419 | return msg, metadata, err |
| 420 | |
| 421 | } |
| 422 | |
| 423 | var ( |
| 424 | filter_BBSimService_ONUActivate_0 = &utilities.DoubleArray{Encoding: map[string]int{"onus_batch": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} |
| 425 | ) |
| 426 | |
| 427 | func request_BBSimService_ONUActivate_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 428 | var protoReq ONURequest |
| 429 | var metadata runtime.ServerMetadata |
| 430 | |
| 431 | newReader, berr := utilities.IOReaderFactory(req.Body) |
| 432 | if berr != nil { |
| 433 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) |
| 434 | } |
| 435 | if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.OnusBatch); err != nil && err != io.EOF { |
| 436 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 437 | } |
| 438 | |
| 439 | if err := req.ParseForm(); err != nil { |
| 440 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 441 | } |
| 442 | if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_ONUActivate_0); err != nil { |
| 443 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 444 | } |
| 445 | |
| 446 | msg, err := client.ONUActivate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| 447 | return msg, metadata, err |
| 448 | |
| 449 | } |
| 450 | |
| 451 | func local_request_BBSimService_ONUActivate_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 452 | var protoReq ONURequest |
| 453 | var metadata runtime.ServerMetadata |
| 454 | |
| 455 | newReader, berr := utilities.IOReaderFactory(req.Body) |
| 456 | if berr != nil { |
| 457 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) |
| 458 | } |
| 459 | if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.OnusBatch); err != nil && err != io.EOF { |
| 460 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 461 | } |
| 462 | |
| 463 | if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BBSimService_ONUActivate_0); err != nil { |
| 464 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 465 | } |
| 466 | |
| 467 | msg, err := server.ONUActivate(ctx, &protoReq) |
| 468 | return msg, metadata, err |
| 469 | |
| 470 | } |
| 471 | |
| 472 | var ( |
| 473 | 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}} |
| 474 | ) |
| 475 | |
| 476 | func request_BBSimService_ONUActivate_1(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 477 | var protoReq ONURequest |
| 478 | var metadata runtime.ServerMetadata |
| 479 | |
| 480 | var ( |
| 481 | val string |
| 482 | ok bool |
| 483 | err error |
| 484 | _ = err |
| 485 | ) |
| 486 | |
| 487 | val, ok = pathParams["onu.pon_port_id"] |
| 488 | if !ok { |
| 489 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.pon_port_id") |
| 490 | } |
| 491 | |
| 492 | err = runtime.PopulateFieldFromPath(&protoReq, "onu.pon_port_id", val) |
| 493 | |
| 494 | if err != nil { |
| 495 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.pon_port_id", err) |
| 496 | } |
| 497 | |
| 498 | if err := req.ParseForm(); err != nil { |
| 499 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 500 | } |
| 501 | if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_ONUActivate_1); err != nil { |
| 502 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 503 | } |
| 504 | |
| 505 | msg, err := client.ONUActivate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| 506 | return msg, metadata, err |
| 507 | |
| 508 | } |
| 509 | |
| 510 | func local_request_BBSimService_ONUActivate_1(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 511 | var protoReq ONURequest |
| 512 | var metadata runtime.ServerMetadata |
| 513 | |
| 514 | var ( |
| 515 | val string |
| 516 | ok bool |
| 517 | err error |
| 518 | _ = err |
| 519 | ) |
| 520 | |
| 521 | val, ok = pathParams["onu.pon_port_id"] |
| 522 | if !ok { |
| 523 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.pon_port_id") |
| 524 | } |
| 525 | |
| 526 | err = runtime.PopulateFieldFromPath(&protoReq, "onu.pon_port_id", val) |
| 527 | |
| 528 | if err != nil { |
| 529 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.pon_port_id", err) |
| 530 | } |
| 531 | |
| 532 | if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BBSimService_ONUActivate_1); err != nil { |
| 533 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 534 | } |
| 535 | |
| 536 | msg, err := server.ONUActivate(ctx, &protoReq) |
| 537 | return msg, metadata, err |
| 538 | |
| 539 | } |
| 540 | |
| 541 | var ( |
| 542 | 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}} |
| 543 | ) |
| 544 | |
| 545 | func request_BBSimService_ONUActivate_2(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 546 | var protoReq ONURequest |
| 547 | var metadata runtime.ServerMetadata |
| 548 | |
| 549 | var ( |
| 550 | val string |
| 551 | ok bool |
| 552 | err error |
| 553 | _ = err |
| 554 | ) |
| 555 | |
| 556 | val, ok = pathParams["onu.pon_port_id"] |
| 557 | if !ok { |
| 558 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.pon_port_id") |
| 559 | } |
| 560 | |
| 561 | err = runtime.PopulateFieldFromPath(&protoReq, "onu.pon_port_id", val) |
| 562 | |
| 563 | if err != nil { |
| 564 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.pon_port_id", err) |
| 565 | } |
| 566 | |
| 567 | val, ok = pathParams["onu.onu_serial"] |
| 568 | if !ok { |
| 569 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.onu_serial") |
| 570 | } |
| 571 | |
| 572 | err = runtime.PopulateFieldFromPath(&protoReq, "onu.onu_serial", val) |
| 573 | |
| 574 | if err != nil { |
| 575 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.onu_serial", err) |
| 576 | } |
| 577 | |
| 578 | if err := req.ParseForm(); err != nil { |
| 579 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 580 | } |
| 581 | if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_ONUActivate_2); err != nil { |
| 582 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 583 | } |
| 584 | |
| 585 | msg, err := client.ONUActivate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| 586 | return msg, metadata, err |
| 587 | |
| 588 | } |
| 589 | |
| 590 | func local_request_BBSimService_ONUActivate_2(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 591 | var protoReq ONURequest |
| 592 | var metadata runtime.ServerMetadata |
| 593 | |
| 594 | var ( |
| 595 | val string |
| 596 | ok bool |
| 597 | err error |
| 598 | _ = err |
| 599 | ) |
| 600 | |
| 601 | val, ok = pathParams["onu.pon_port_id"] |
| 602 | if !ok { |
| 603 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.pon_port_id") |
| 604 | } |
| 605 | |
| 606 | err = runtime.PopulateFieldFromPath(&protoReq, "onu.pon_port_id", val) |
| 607 | |
| 608 | if err != nil { |
| 609 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.pon_port_id", err) |
| 610 | } |
| 611 | |
| 612 | val, ok = pathParams["onu.onu_serial"] |
| 613 | if !ok { |
| 614 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.onu_serial") |
| 615 | } |
| 616 | |
| 617 | err = runtime.PopulateFieldFromPath(&protoReq, "onu.onu_serial", val) |
| 618 | |
| 619 | if err != nil { |
| 620 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.onu_serial", err) |
| 621 | } |
| 622 | |
| 623 | if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BBSimService_ONUActivate_2); err != nil { |
| 624 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 625 | } |
| 626 | |
| 627 | msg, err := server.ONUActivate(ctx, &protoReq) |
| 628 | return msg, metadata, err |
| 629 | |
| 630 | } |
| 631 | |
| 632 | var ( |
| 633 | filter_BBSimService_ONUDeactivate_0 = &utilities.DoubleArray{Encoding: map[string]int{"onus_batch": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} |
| 634 | ) |
| 635 | |
| 636 | func request_BBSimService_ONUDeactivate_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 637 | var protoReq ONURequest |
| 638 | var metadata runtime.ServerMetadata |
| 639 | |
| 640 | newReader, berr := utilities.IOReaderFactory(req.Body) |
| 641 | if berr != nil { |
| 642 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) |
| 643 | } |
| 644 | if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.OnusBatch); err != nil && err != io.EOF { |
| 645 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 646 | } |
| 647 | |
| 648 | if err := req.ParseForm(); err != nil { |
| 649 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 650 | } |
| 651 | if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_ONUDeactivate_0); err != nil { |
| 652 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 653 | } |
| 654 | |
| 655 | msg, err := client.ONUDeactivate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| 656 | return msg, metadata, err |
| 657 | |
| 658 | } |
| 659 | |
| 660 | func local_request_BBSimService_ONUDeactivate_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 661 | var protoReq ONURequest |
| 662 | var metadata runtime.ServerMetadata |
| 663 | |
| 664 | newReader, berr := utilities.IOReaderFactory(req.Body) |
| 665 | if berr != nil { |
| 666 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) |
| 667 | } |
| 668 | if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.OnusBatch); err != nil && err != io.EOF { |
| 669 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 670 | } |
| 671 | |
| 672 | if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BBSimService_ONUDeactivate_0); err != nil { |
| 673 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 674 | } |
| 675 | |
| 676 | msg, err := server.ONUDeactivate(ctx, &protoReq) |
| 677 | return msg, metadata, err |
| 678 | |
| 679 | } |
| 680 | |
| 681 | var ( |
| 682 | 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}} |
| 683 | ) |
| 684 | |
| 685 | func request_BBSimService_ONUDeactivate_1(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 686 | var protoReq ONURequest |
| 687 | var metadata runtime.ServerMetadata |
| 688 | |
| 689 | var ( |
| 690 | val string |
| 691 | ok bool |
| 692 | err error |
| 693 | _ = err |
| 694 | ) |
| 695 | |
| 696 | val, ok = pathParams["onu.onu_serial"] |
| 697 | if !ok { |
| 698 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.onu_serial") |
| 699 | } |
| 700 | |
| 701 | err = runtime.PopulateFieldFromPath(&protoReq, "onu.onu_serial", val) |
| 702 | |
| 703 | if err != nil { |
| 704 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.onu_serial", err) |
| 705 | } |
| 706 | |
| 707 | if err := req.ParseForm(); err != nil { |
| 708 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 709 | } |
| 710 | if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_ONUDeactivate_1); err != nil { |
| 711 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 712 | } |
| 713 | |
| 714 | msg, err := client.ONUDeactivate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| 715 | return msg, metadata, err |
| 716 | |
| 717 | } |
| 718 | |
| 719 | func local_request_BBSimService_ONUDeactivate_1(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 720 | var protoReq ONURequest |
| 721 | var metadata runtime.ServerMetadata |
| 722 | |
| 723 | var ( |
| 724 | val string |
| 725 | ok bool |
| 726 | err error |
| 727 | _ = err |
| 728 | ) |
| 729 | |
| 730 | val, ok = pathParams["onu.onu_serial"] |
| 731 | if !ok { |
| 732 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.onu_serial") |
| 733 | } |
| 734 | |
| 735 | err = runtime.PopulateFieldFromPath(&protoReq, "onu.onu_serial", val) |
| 736 | |
| 737 | if err != nil { |
| 738 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.onu_serial", err) |
| 739 | } |
| 740 | |
| 741 | if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BBSimService_ONUDeactivate_1); err != nil { |
| 742 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 743 | } |
| 744 | |
| 745 | msg, err := server.ONUDeactivate(ctx, &protoReq) |
| 746 | return msg, metadata, err |
| 747 | |
| 748 | } |
| 749 | |
| 750 | var ( |
| 751 | 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}} |
| 752 | ) |
| 753 | |
| 754 | func request_BBSimService_ONUDeactivate_2(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 755 | var protoReq ONURequest |
| 756 | var metadata runtime.ServerMetadata |
| 757 | |
| 758 | var ( |
| 759 | val string |
| 760 | ok bool |
| 761 | err error |
| 762 | _ = err |
| 763 | ) |
| 764 | |
| 765 | val, ok = pathParams["onu.pon_port_id"] |
| 766 | if !ok { |
| 767 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.pon_port_id") |
| 768 | } |
| 769 | |
| 770 | err = runtime.PopulateFieldFromPath(&protoReq, "onu.pon_port_id", val) |
| 771 | |
| 772 | if err != nil { |
| 773 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.pon_port_id", err) |
| 774 | } |
| 775 | |
| 776 | if err := req.ParseForm(); err != nil { |
| 777 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 778 | } |
| 779 | if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_ONUDeactivate_2); err != nil { |
| 780 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 781 | } |
| 782 | |
| 783 | msg, err := client.ONUDeactivate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| 784 | return msg, metadata, err |
| 785 | |
| 786 | } |
| 787 | |
| 788 | func local_request_BBSimService_ONUDeactivate_2(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 789 | var protoReq ONURequest |
| 790 | var metadata runtime.ServerMetadata |
| 791 | |
| 792 | var ( |
| 793 | val string |
| 794 | ok bool |
| 795 | err error |
| 796 | _ = err |
| 797 | ) |
| 798 | |
| 799 | val, ok = pathParams["onu.pon_port_id"] |
| 800 | if !ok { |
| 801 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.pon_port_id") |
| 802 | } |
| 803 | |
| 804 | err = runtime.PopulateFieldFromPath(&protoReq, "onu.pon_port_id", val) |
| 805 | |
| 806 | if err != nil { |
| 807 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.pon_port_id", err) |
| 808 | } |
| 809 | |
| 810 | if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BBSimService_ONUDeactivate_2); err != nil { |
| 811 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 812 | } |
| 813 | |
| 814 | msg, err := server.ONUDeactivate(ctx, &protoReq) |
| 815 | return msg, metadata, err |
| 816 | |
| 817 | } |
| 818 | |
| 819 | var ( |
| 820 | 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}} |
| 821 | ) |
| 822 | |
| 823 | func request_BBSimService_ONUDeactivate_3(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 824 | var protoReq ONURequest |
| 825 | var metadata runtime.ServerMetadata |
| 826 | |
| 827 | var ( |
| 828 | val string |
| 829 | ok bool |
| 830 | err error |
| 831 | _ = err |
| 832 | ) |
| 833 | |
| 834 | val, ok = pathParams["onu.pon_port_id"] |
| 835 | if !ok { |
| 836 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.pon_port_id") |
| 837 | } |
| 838 | |
| 839 | err = runtime.PopulateFieldFromPath(&protoReq, "onu.pon_port_id", val) |
| 840 | |
| 841 | if err != nil { |
| 842 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.pon_port_id", err) |
| 843 | } |
| 844 | |
| 845 | val, ok = pathParams["onu.onu_id"] |
| 846 | if !ok { |
| 847 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.onu_id") |
| 848 | } |
| 849 | |
| 850 | err = runtime.PopulateFieldFromPath(&protoReq, "onu.onu_id", val) |
| 851 | |
| 852 | if err != nil { |
| 853 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.onu_id", err) |
| 854 | } |
| 855 | |
| 856 | if err := req.ParseForm(); err != nil { |
| 857 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 858 | } |
| 859 | if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_ONUDeactivate_3); err != nil { |
| 860 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 861 | } |
| 862 | |
| 863 | msg, err := client.ONUDeactivate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| 864 | return msg, metadata, err |
| 865 | |
| 866 | } |
| 867 | |
| 868 | func local_request_BBSimService_ONUDeactivate_3(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 869 | var protoReq ONURequest |
| 870 | var metadata runtime.ServerMetadata |
| 871 | |
| 872 | var ( |
| 873 | val string |
| 874 | ok bool |
| 875 | err error |
| 876 | _ = err |
| 877 | ) |
| 878 | |
| 879 | val, ok = pathParams["onu.pon_port_id"] |
| 880 | if !ok { |
| 881 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.pon_port_id") |
| 882 | } |
| 883 | |
| 884 | err = runtime.PopulateFieldFromPath(&protoReq, "onu.pon_port_id", val) |
| 885 | |
| 886 | if err != nil { |
| 887 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.pon_port_id", err) |
| 888 | } |
| 889 | |
| 890 | val, ok = pathParams["onu.onu_id"] |
| 891 | if !ok { |
| 892 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.onu_id") |
| 893 | } |
| 894 | |
| 895 | err = runtime.PopulateFieldFromPath(&protoReq, "onu.onu_id", val) |
| 896 | |
| 897 | if err != nil { |
| 898 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.onu_id", err) |
| 899 | } |
| 900 | |
| 901 | if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BBSimService_ONUDeactivate_3); err != nil { |
| 902 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 903 | } |
| 904 | |
| 905 | msg, err := server.ONUDeactivate(ctx, &protoReq) |
| 906 | return msg, metadata, err |
| 907 | |
| 908 | } |
| 909 | |
| 910 | func request_BBSimService_GenerateONUAlarm_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 911 | var protoReq ONUAlarmRequest |
| 912 | var metadata runtime.ServerMetadata |
| 913 | |
| 914 | var ( |
| 915 | val string |
| 916 | ok bool |
| 917 | err error |
| 918 | _ = err |
| 919 | ) |
| 920 | |
| 921 | val, ok = pathParams["onu_serial"] |
| 922 | if !ok { |
| 923 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu_serial") |
| 924 | } |
| 925 | |
| 926 | protoReq.OnuSerial, err = runtime.String(val) |
| 927 | |
| 928 | if err != nil { |
| 929 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu_serial", err) |
| 930 | } |
| 931 | |
| 932 | val, ok = pathParams["alarm_type"] |
| 933 | if !ok { |
| 934 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "alarm_type") |
| 935 | } |
| 936 | |
| 937 | protoReq.AlarmType, err = runtime.String(val) |
| 938 | |
| 939 | if err != nil { |
| 940 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "alarm_type", err) |
| 941 | } |
| 942 | |
| 943 | val, ok = pathParams["status"] |
| 944 | if !ok { |
| 945 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "status") |
| 946 | } |
| 947 | |
| 948 | protoReq.Status, err = runtime.String(val) |
| 949 | |
| 950 | if err != nil { |
| 951 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "status", err) |
| 952 | } |
| 953 | |
| 954 | msg, err := client.GenerateONUAlarm(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| 955 | return msg, metadata, err |
| 956 | |
| 957 | } |
| 958 | |
| 959 | func local_request_BBSimService_GenerateONUAlarm_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 960 | var protoReq ONUAlarmRequest |
| 961 | var metadata runtime.ServerMetadata |
| 962 | |
| 963 | var ( |
| 964 | val string |
| 965 | ok bool |
| 966 | err error |
| 967 | _ = err |
| 968 | ) |
| 969 | |
| 970 | val, ok = pathParams["onu_serial"] |
| 971 | if !ok { |
| 972 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu_serial") |
| 973 | } |
| 974 | |
| 975 | protoReq.OnuSerial, err = runtime.String(val) |
| 976 | |
| 977 | if err != nil { |
| 978 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu_serial", err) |
| 979 | } |
| 980 | |
| 981 | val, ok = pathParams["alarm_type"] |
| 982 | if !ok { |
| 983 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "alarm_type") |
| 984 | } |
| 985 | |
| 986 | protoReq.AlarmType, err = runtime.String(val) |
| 987 | |
| 988 | if err != nil { |
| 989 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "alarm_type", err) |
| 990 | } |
| 991 | |
| 992 | val, ok = pathParams["status"] |
| 993 | if !ok { |
| 994 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "status") |
| 995 | } |
| 996 | |
| 997 | protoReq.Status, err = runtime.String(val) |
| 998 | |
| 999 | if err != nil { |
| 1000 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "status", err) |
| 1001 | } |
| 1002 | |
| 1003 | msg, err := server.GenerateONUAlarm(ctx, &protoReq) |
| 1004 | return msg, metadata, err |
| 1005 | |
| 1006 | } |
| 1007 | |
| 1008 | func request_BBSimService_GenerateOLTAlarm_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 1009 | var protoReq OLTAlarmRequest |
| 1010 | var metadata runtime.ServerMetadata |
| 1011 | |
| 1012 | var ( |
| 1013 | val string |
| 1014 | ok bool |
| 1015 | err error |
| 1016 | _ = err |
| 1017 | ) |
| 1018 | |
| 1019 | val, ok = pathParams["port_type"] |
| 1020 | if !ok { |
| 1021 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_type") |
| 1022 | } |
| 1023 | |
| 1024 | protoReq.PortType, err = runtime.String(val) |
| 1025 | |
| 1026 | if err != nil { |
| 1027 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_type", err) |
| 1028 | } |
| 1029 | |
| 1030 | val, ok = pathParams["port_id"] |
| 1031 | if !ok { |
| 1032 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id") |
| 1033 | } |
| 1034 | |
| 1035 | protoReq.PortId, err = runtime.Uint32(val) |
| 1036 | |
| 1037 | if err != nil { |
| 1038 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) |
| 1039 | } |
| 1040 | |
| 1041 | val, ok = pathParams["status"] |
| 1042 | if !ok { |
| 1043 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "status") |
| 1044 | } |
| 1045 | |
| 1046 | protoReq.Status, err = runtime.String(val) |
| 1047 | |
| 1048 | if err != nil { |
| 1049 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "status", err) |
| 1050 | } |
| 1051 | |
| 1052 | msg, err := client.GenerateOLTAlarm(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| 1053 | return msg, metadata, err |
| 1054 | |
| 1055 | } |
| 1056 | |
| 1057 | func local_request_BBSimService_GenerateOLTAlarm_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 1058 | var protoReq OLTAlarmRequest |
| 1059 | var metadata runtime.ServerMetadata |
| 1060 | |
| 1061 | var ( |
| 1062 | val string |
| 1063 | ok bool |
| 1064 | err error |
| 1065 | _ = err |
| 1066 | ) |
| 1067 | |
| 1068 | val, ok = pathParams["port_type"] |
| 1069 | if !ok { |
| 1070 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_type") |
| 1071 | } |
| 1072 | |
| 1073 | protoReq.PortType, err = runtime.String(val) |
| 1074 | |
| 1075 | if err != nil { |
| 1076 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_type", err) |
| 1077 | } |
| 1078 | |
| 1079 | val, ok = pathParams["port_id"] |
| 1080 | if !ok { |
| 1081 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id") |
| 1082 | } |
| 1083 | |
| 1084 | protoReq.PortId, err = runtime.Uint32(val) |
| 1085 | |
| 1086 | if err != nil { |
| 1087 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) |
| 1088 | } |
| 1089 | |
| 1090 | val, ok = pathParams["status"] |
| 1091 | if !ok { |
| 1092 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "status") |
| 1093 | } |
| 1094 | |
| 1095 | protoReq.Status, err = runtime.String(val) |
| 1096 | |
| 1097 | if err != nil { |
| 1098 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "status", err) |
| 1099 | } |
| 1100 | |
| 1101 | msg, err := server.GenerateOLTAlarm(ctx, &protoReq) |
| 1102 | return msg, metadata, err |
| 1103 | |
| 1104 | } |
| 1105 | |
| 1106 | var ( |
| 1107 | 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}} |
| 1108 | ) |
| 1109 | |
| 1110 | func request_BBSimService_PerformDeviceAction_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 1111 | var protoReq DeviceAction |
| 1112 | var metadata runtime.ServerMetadata |
| 1113 | |
| 1114 | var ( |
| 1115 | val string |
| 1116 | ok bool |
| 1117 | err error |
| 1118 | _ = err |
| 1119 | ) |
| 1120 | |
| 1121 | val, ok = pathParams["device_type"] |
| 1122 | if !ok { |
| 1123 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "device_type") |
| 1124 | } |
| 1125 | |
| 1126 | protoReq.DeviceType, err = runtime.String(val) |
| 1127 | |
| 1128 | if err != nil { |
| 1129 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "device_type", err) |
| 1130 | } |
| 1131 | |
| 1132 | val, ok = pathParams["action"] |
| 1133 | if !ok { |
| 1134 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "action") |
| 1135 | } |
| 1136 | |
| 1137 | protoReq.Action, err = runtime.String(val) |
| 1138 | |
| 1139 | if err != nil { |
| 1140 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "action", err) |
| 1141 | } |
| 1142 | |
| 1143 | if err := req.ParseForm(); err != nil { |
| 1144 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 1145 | } |
| 1146 | if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_PerformDeviceAction_0); err != nil { |
| 1147 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 1148 | } |
| 1149 | |
| 1150 | msg, err := client.PerformDeviceAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| 1151 | return msg, metadata, err |
| 1152 | |
| 1153 | } |
| 1154 | |
| 1155 | func local_request_BBSimService_PerformDeviceAction_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 1156 | var protoReq DeviceAction |
| 1157 | var metadata runtime.ServerMetadata |
| 1158 | |
| 1159 | var ( |
| 1160 | val string |
| 1161 | ok bool |
| 1162 | err error |
| 1163 | _ = err |
| 1164 | ) |
| 1165 | |
| 1166 | val, ok = pathParams["device_type"] |
| 1167 | if !ok { |
| 1168 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "device_type") |
| 1169 | } |
| 1170 | |
| 1171 | protoReq.DeviceType, err = runtime.String(val) |
| 1172 | |
| 1173 | if err != nil { |
| 1174 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "device_type", err) |
| 1175 | } |
| 1176 | |
| 1177 | val, ok = pathParams["action"] |
| 1178 | if !ok { |
| 1179 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "action") |
| 1180 | } |
| 1181 | |
| 1182 | protoReq.Action, err = runtime.String(val) |
| 1183 | |
| 1184 | if err != nil { |
| 1185 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "action", err) |
| 1186 | } |
| 1187 | |
| 1188 | if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BBSimService_PerformDeviceAction_0); err != nil { |
| 1189 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 1190 | } |
| 1191 | |
| 1192 | msg, err := server.PerformDeviceAction(ctx, &protoReq) |
| 1193 | return msg, metadata, err |
| 1194 | |
| 1195 | } |
| 1196 | |
| 1197 | func request_BBSimService_PerformDeviceAction_1(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 1198 | var protoReq DeviceAction |
| 1199 | var metadata runtime.ServerMetadata |
| 1200 | |
| 1201 | var ( |
| 1202 | val string |
| 1203 | ok bool |
| 1204 | err error |
| 1205 | _ = err |
| 1206 | ) |
| 1207 | |
| 1208 | val, ok = pathParams["device_type"] |
| 1209 | if !ok { |
| 1210 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "device_type") |
| 1211 | } |
| 1212 | |
| 1213 | protoReq.DeviceType, err = runtime.String(val) |
| 1214 | |
| 1215 | if err != nil { |
| 1216 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "device_type", err) |
| 1217 | } |
| 1218 | |
| 1219 | val, ok = pathParams["serial_number"] |
| 1220 | if !ok { |
| 1221 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "serial_number") |
| 1222 | } |
| 1223 | |
| 1224 | protoReq.SerialNumber, err = runtime.String(val) |
| 1225 | |
| 1226 | if err != nil { |
| 1227 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "serial_number", err) |
| 1228 | } |
| 1229 | |
| 1230 | val, ok = pathParams["action"] |
| 1231 | if !ok { |
| 1232 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "action") |
| 1233 | } |
| 1234 | |
| 1235 | protoReq.Action, err = runtime.String(val) |
| 1236 | |
| 1237 | if err != nil { |
| 1238 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "action", err) |
| 1239 | } |
| 1240 | |
| 1241 | msg, err := client.PerformDeviceAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| 1242 | return msg, metadata, err |
| 1243 | |
| 1244 | } |
| 1245 | |
| 1246 | func local_request_BBSimService_PerformDeviceAction_1(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 1247 | var protoReq DeviceAction |
| 1248 | var metadata runtime.ServerMetadata |
| 1249 | |
| 1250 | var ( |
| 1251 | val string |
| 1252 | ok bool |
| 1253 | err error |
| 1254 | _ = err |
| 1255 | ) |
| 1256 | |
| 1257 | val, ok = pathParams["device_type"] |
| 1258 | if !ok { |
| 1259 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "device_type") |
| 1260 | } |
| 1261 | |
| 1262 | protoReq.DeviceType, err = runtime.String(val) |
| 1263 | |
| 1264 | if err != nil { |
| 1265 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "device_type", err) |
| 1266 | } |
| 1267 | |
| 1268 | val, ok = pathParams["serial_number"] |
| 1269 | if !ok { |
| 1270 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "serial_number") |
| 1271 | } |
| 1272 | |
| 1273 | protoReq.SerialNumber, err = runtime.String(val) |
| 1274 | |
| 1275 | if err != nil { |
| 1276 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "serial_number", err) |
| 1277 | } |
| 1278 | |
| 1279 | val, ok = pathParams["action"] |
| 1280 | if !ok { |
| 1281 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "action") |
| 1282 | } |
| 1283 | |
| 1284 | protoReq.Action, err = runtime.String(val) |
| 1285 | |
| 1286 | if err != nil { |
| 1287 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "action", err) |
| 1288 | } |
| 1289 | |
| 1290 | msg, err := server.PerformDeviceAction(ctx, &protoReq) |
| 1291 | return msg, metadata, err |
| 1292 | |
| 1293 | } |
| 1294 | |
| 1295 | var ( |
| 1296 | filter_BBSimService_GetFlows_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} |
| 1297 | ) |
| 1298 | |
| 1299 | func request_BBSimService_GetFlows_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 1300 | var protoReq ONUInfo |
| 1301 | var metadata runtime.ServerMetadata |
| 1302 | |
| 1303 | if err := req.ParseForm(); err != nil { |
| 1304 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 1305 | } |
| 1306 | if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_GetFlows_0); err != nil { |
| 1307 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 1308 | } |
| 1309 | |
| 1310 | msg, err := client.GetFlows(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| 1311 | return msg, metadata, err |
| 1312 | |
| 1313 | } |
| 1314 | |
| 1315 | func local_request_BBSimService_GetFlows_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 1316 | var protoReq ONUInfo |
| 1317 | var metadata runtime.ServerMetadata |
| 1318 | |
| 1319 | if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BBSimService_GetFlows_0); err != nil { |
| 1320 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 1321 | } |
| 1322 | |
| 1323 | msg, err := server.GetFlows(ctx, &protoReq) |
| 1324 | return msg, metadata, err |
| 1325 | |
| 1326 | } |
| 1327 | |
| 1328 | var ( |
| 1329 | filter_BBSimService_GetFlows_1 = &utilities.DoubleArray{Encoding: map[string]int{"onu_serial": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} |
| 1330 | ) |
| 1331 | |
| 1332 | func request_BBSimService_GetFlows_1(ctx context.Context, marshaler runtime.Marshaler, client BBSimServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 1333 | var protoReq ONUInfo |
| 1334 | var metadata runtime.ServerMetadata |
| 1335 | |
| 1336 | var ( |
| 1337 | val string |
| 1338 | ok bool |
| 1339 | err error |
| 1340 | _ = err |
| 1341 | ) |
| 1342 | |
| 1343 | val, ok = pathParams["onu_serial"] |
| 1344 | if !ok { |
| 1345 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu_serial") |
| 1346 | } |
| 1347 | |
| 1348 | protoReq.OnuSerial, err = runtime.String(val) |
| 1349 | |
| 1350 | if err != nil { |
| 1351 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu_serial", err) |
| 1352 | } |
| 1353 | |
| 1354 | if err := req.ParseForm(); err != nil { |
| 1355 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 1356 | } |
| 1357 | if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_GetFlows_1); err != nil { |
| 1358 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 1359 | } |
| 1360 | |
| 1361 | msg, err := client.GetFlows(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| 1362 | return msg, metadata, err |
| 1363 | |
| 1364 | } |
| 1365 | |
| 1366 | func local_request_BBSimService_GetFlows_1(ctx context.Context, marshaler runtime.Marshaler, server BBSimServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 1367 | var protoReq ONUInfo |
| 1368 | var metadata runtime.ServerMetadata |
| 1369 | |
| 1370 | var ( |
| 1371 | val string |
| 1372 | ok bool |
| 1373 | err error |
| 1374 | _ = err |
| 1375 | ) |
| 1376 | |
| 1377 | val, ok = pathParams["onu_serial"] |
| 1378 | if !ok { |
| 1379 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu_serial") |
| 1380 | } |
| 1381 | |
| 1382 | protoReq.OnuSerial, err = runtime.String(val) |
| 1383 | |
| 1384 | if err != nil { |
| 1385 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu_serial", err) |
| 1386 | } |
| 1387 | |
| 1388 | if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BBSimService_GetFlows_1); err != nil { |
| 1389 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 1390 | } |
| 1391 | |
| 1392 | msg, err := server.GetFlows(ctx, &protoReq) |
| 1393 | return msg, metadata, err |
| 1394 | |
| 1395 | } |
| 1396 | |
| 1397 | // RegisterBBSimServiceHandlerServer registers the http handlers for service BBSimService to "mux". |
| 1398 | // UnaryRPC :call BBSimServiceServer directly. |
| 1399 | // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. |
| 1400 | func RegisterBBSimServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BBSimServiceServer) error { |
| 1401 | |
| 1402 | mux.Handle("GET", pattern_BBSimService_OLTStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 1403 | ctx, cancel := context.WithCancel(req.Context()) |
| 1404 | defer cancel() |
| 1405 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 1406 | rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) |
| 1407 | if err != nil { |
| 1408 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1409 | return |
| 1410 | } |
| 1411 | resp, md, err := local_request_BBSimService_OLTStatus_0(rctx, inboundMarshaler, server, req, pathParams) |
| 1412 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 1413 | if err != nil { |
| 1414 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1415 | return |
| 1416 | } |
| 1417 | |
| 1418 | forward_BBSimService_OLTStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 1419 | |
| 1420 | }) |
| 1421 | |
| 1422 | mux.Handle("GET", pattern_BBSimService_OLTStatus_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 1423 | ctx, cancel := context.WithCancel(req.Context()) |
| 1424 | defer cancel() |
| 1425 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 1426 | rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) |
| 1427 | if err != nil { |
| 1428 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1429 | return |
| 1430 | } |
| 1431 | resp, md, err := local_request_BBSimService_OLTStatus_1(rctx, inboundMarshaler, server, req, pathParams) |
| 1432 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 1433 | if err != nil { |
| 1434 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1435 | return |
| 1436 | } |
| 1437 | |
| 1438 | forward_BBSimService_OLTStatus_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 1439 | |
| 1440 | }) |
| 1441 | |
| 1442 | mux.Handle("GET", pattern_BBSimService_PortStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 1443 | ctx, cancel := context.WithCancel(req.Context()) |
| 1444 | defer cancel() |
| 1445 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 1446 | rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) |
| 1447 | if err != nil { |
| 1448 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1449 | return |
| 1450 | } |
| 1451 | resp, md, err := local_request_BBSimService_PortStatus_0(rctx, inboundMarshaler, server, req, pathParams) |
| 1452 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 1453 | if err != nil { |
| 1454 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1455 | return |
| 1456 | } |
| 1457 | |
| 1458 | forward_BBSimService_PortStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 1459 | |
| 1460 | }) |
| 1461 | |
| 1462 | mux.Handle("GET", pattern_BBSimService_ONUStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 1463 | ctx, cancel := context.WithCancel(req.Context()) |
| 1464 | defer cancel() |
| 1465 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 1466 | rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) |
| 1467 | if err != nil { |
| 1468 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1469 | return |
| 1470 | } |
| 1471 | resp, md, err := local_request_BBSimService_ONUStatus_0(rctx, inboundMarshaler, server, req, pathParams) |
| 1472 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 1473 | if err != nil { |
| 1474 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1475 | return |
| 1476 | } |
| 1477 | |
| 1478 | forward_BBSimService_ONUStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 1479 | |
| 1480 | }) |
| 1481 | |
| 1482 | mux.Handle("GET", pattern_BBSimService_ONUStatus_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 1483 | ctx, cancel := context.WithCancel(req.Context()) |
| 1484 | defer cancel() |
| 1485 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 1486 | rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) |
| 1487 | if err != nil { |
| 1488 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1489 | return |
| 1490 | } |
| 1491 | resp, md, err := local_request_BBSimService_ONUStatus_1(rctx, inboundMarshaler, server, req, pathParams) |
| 1492 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 1493 | if err != nil { |
| 1494 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1495 | return |
| 1496 | } |
| 1497 | |
| 1498 | forward_BBSimService_ONUStatus_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 1499 | |
| 1500 | }) |
| 1501 | |
| 1502 | mux.Handle("GET", pattern_BBSimService_ONUStatus_2, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 1503 | ctx, cancel := context.WithCancel(req.Context()) |
| 1504 | defer cancel() |
| 1505 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 1506 | rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) |
| 1507 | if err != nil { |
| 1508 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1509 | return |
| 1510 | } |
| 1511 | resp, md, err := local_request_BBSimService_ONUStatus_2(rctx, inboundMarshaler, server, req, pathParams) |
| 1512 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 1513 | if err != nil { |
| 1514 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1515 | return |
| 1516 | } |
| 1517 | |
| 1518 | forward_BBSimService_ONUStatus_2(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 1519 | |
| 1520 | }) |
| 1521 | |
| 1522 | mux.Handle("GET", pattern_BBSimService_ONUStatus_3, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 1523 | ctx, cancel := context.WithCancel(req.Context()) |
| 1524 | defer cancel() |
| 1525 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 1526 | rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) |
| 1527 | if err != nil { |
| 1528 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1529 | return |
| 1530 | } |
| 1531 | resp, md, err := local_request_BBSimService_ONUStatus_3(rctx, inboundMarshaler, server, req, pathParams) |
| 1532 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 1533 | if err != nil { |
| 1534 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1535 | return |
| 1536 | } |
| 1537 | |
| 1538 | forward_BBSimService_ONUStatus_3(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 1539 | |
| 1540 | }) |
| 1541 | |
| 1542 | mux.Handle("POST", pattern_BBSimService_ONUActivate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 1543 | ctx, cancel := context.WithCancel(req.Context()) |
| 1544 | defer cancel() |
| 1545 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 1546 | rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) |
| 1547 | if err != nil { |
| 1548 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1549 | return |
| 1550 | } |
| 1551 | resp, md, err := local_request_BBSimService_ONUActivate_0(rctx, inboundMarshaler, server, req, pathParams) |
| 1552 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 1553 | if err != nil { |
| 1554 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1555 | return |
| 1556 | } |
| 1557 | |
| 1558 | forward_BBSimService_ONUActivate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 1559 | |
| 1560 | }) |
| 1561 | |
| 1562 | mux.Handle("POST", pattern_BBSimService_ONUActivate_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 1563 | ctx, cancel := context.WithCancel(req.Context()) |
| 1564 | defer cancel() |
| 1565 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 1566 | rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) |
| 1567 | if err != nil { |
| 1568 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1569 | return |
| 1570 | } |
| 1571 | resp, md, err := local_request_BBSimService_ONUActivate_1(rctx, inboundMarshaler, server, req, pathParams) |
| 1572 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 1573 | if err != nil { |
| 1574 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1575 | return |
| 1576 | } |
| 1577 | |
| 1578 | forward_BBSimService_ONUActivate_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 1579 | |
| 1580 | }) |
| 1581 | |
| 1582 | mux.Handle("POST", pattern_BBSimService_ONUActivate_2, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 1583 | ctx, cancel := context.WithCancel(req.Context()) |
| 1584 | defer cancel() |
| 1585 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 1586 | rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) |
| 1587 | if err != nil { |
| 1588 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1589 | return |
| 1590 | } |
| 1591 | resp, md, err := local_request_BBSimService_ONUActivate_2(rctx, inboundMarshaler, server, req, pathParams) |
| 1592 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 1593 | if err != nil { |
| 1594 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1595 | return |
| 1596 | } |
| 1597 | |
| 1598 | forward_BBSimService_ONUActivate_2(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 1599 | |
| 1600 | }) |
| 1601 | |
| 1602 | mux.Handle("DELETE", pattern_BBSimService_ONUDeactivate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 1603 | ctx, cancel := context.WithCancel(req.Context()) |
| 1604 | defer cancel() |
| 1605 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 1606 | rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) |
| 1607 | if err != nil { |
| 1608 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1609 | return |
| 1610 | } |
| 1611 | resp, md, err := local_request_BBSimService_ONUDeactivate_0(rctx, inboundMarshaler, server, req, pathParams) |
| 1612 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 1613 | if err != nil { |
| 1614 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1615 | return |
| 1616 | } |
| 1617 | |
| 1618 | forward_BBSimService_ONUDeactivate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 1619 | |
| 1620 | }) |
| 1621 | |
| 1622 | mux.Handle("DELETE", pattern_BBSimService_ONUDeactivate_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 1623 | ctx, cancel := context.WithCancel(req.Context()) |
| 1624 | defer cancel() |
| 1625 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 1626 | rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) |
| 1627 | if err != nil { |
| 1628 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1629 | return |
| 1630 | } |
| 1631 | resp, md, err := local_request_BBSimService_ONUDeactivate_1(rctx, inboundMarshaler, server, req, pathParams) |
| 1632 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 1633 | if err != nil { |
| 1634 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1635 | return |
| 1636 | } |
| 1637 | |
| 1638 | forward_BBSimService_ONUDeactivate_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 1639 | |
| 1640 | }) |
| 1641 | |
| 1642 | mux.Handle("DELETE", pattern_BBSimService_ONUDeactivate_2, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 1643 | ctx, cancel := context.WithCancel(req.Context()) |
| 1644 | defer cancel() |
| 1645 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 1646 | rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) |
| 1647 | if err != nil { |
| 1648 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1649 | return |
| 1650 | } |
| 1651 | resp, md, err := local_request_BBSimService_ONUDeactivate_2(rctx, inboundMarshaler, server, req, pathParams) |
| 1652 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 1653 | if err != nil { |
| 1654 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1655 | return |
| 1656 | } |
| 1657 | |
| 1658 | forward_BBSimService_ONUDeactivate_2(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 1659 | |
| 1660 | }) |
| 1661 | |
| 1662 | mux.Handle("DELETE", pattern_BBSimService_ONUDeactivate_3, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 1663 | ctx, cancel := context.WithCancel(req.Context()) |
| 1664 | defer cancel() |
| 1665 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 1666 | rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) |
| 1667 | if err != nil { |
| 1668 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1669 | return |
| 1670 | } |
| 1671 | resp, md, err := local_request_BBSimService_ONUDeactivate_3(rctx, inboundMarshaler, server, req, pathParams) |
| 1672 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 1673 | if err != nil { |
| 1674 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1675 | return |
| 1676 | } |
| 1677 | |
| 1678 | forward_BBSimService_ONUDeactivate_3(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 1679 | |
| 1680 | }) |
| 1681 | |
| 1682 | mux.Handle("POST", pattern_BBSimService_GenerateONUAlarm_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 1683 | ctx, cancel := context.WithCancel(req.Context()) |
| 1684 | defer cancel() |
| 1685 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 1686 | rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) |
| 1687 | if err != nil { |
| 1688 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1689 | return |
| 1690 | } |
| 1691 | resp, md, err := local_request_BBSimService_GenerateONUAlarm_0(rctx, inboundMarshaler, server, req, pathParams) |
| 1692 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 1693 | if err != nil { |
| 1694 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1695 | return |
| 1696 | } |
| 1697 | |
| 1698 | forward_BBSimService_GenerateONUAlarm_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 1699 | |
| 1700 | }) |
| 1701 | |
| 1702 | mux.Handle("POST", pattern_BBSimService_GenerateOLTAlarm_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 1703 | ctx, cancel := context.WithCancel(req.Context()) |
| 1704 | defer cancel() |
| 1705 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 1706 | rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) |
| 1707 | if err != nil { |
| 1708 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1709 | return |
| 1710 | } |
| 1711 | resp, md, err := local_request_BBSimService_GenerateOLTAlarm_0(rctx, inboundMarshaler, server, req, pathParams) |
| 1712 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 1713 | if err != nil { |
| 1714 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1715 | return |
| 1716 | } |
| 1717 | |
| 1718 | forward_BBSimService_GenerateOLTAlarm_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 1719 | |
| 1720 | }) |
| 1721 | |
| 1722 | mux.Handle("PATCH", pattern_BBSimService_PerformDeviceAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 1723 | ctx, cancel := context.WithCancel(req.Context()) |
| 1724 | defer cancel() |
| 1725 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 1726 | rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) |
| 1727 | if err != nil { |
| 1728 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1729 | return |
| 1730 | } |
| 1731 | resp, md, err := local_request_BBSimService_PerformDeviceAction_0(rctx, inboundMarshaler, server, req, pathParams) |
| 1732 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 1733 | if err != nil { |
| 1734 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1735 | return |
| 1736 | } |
| 1737 | |
| 1738 | forward_BBSimService_PerformDeviceAction_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 1739 | |
| 1740 | }) |
| 1741 | |
| 1742 | mux.Handle("PATCH", pattern_BBSimService_PerformDeviceAction_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 1743 | ctx, cancel := context.WithCancel(req.Context()) |
| 1744 | defer cancel() |
| 1745 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 1746 | rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) |
| 1747 | if err != nil { |
| 1748 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1749 | return |
| 1750 | } |
| 1751 | resp, md, err := local_request_BBSimService_PerformDeviceAction_1(rctx, inboundMarshaler, server, req, pathParams) |
| 1752 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 1753 | if err != nil { |
| 1754 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1755 | return |
| 1756 | } |
| 1757 | |
| 1758 | forward_BBSimService_PerformDeviceAction_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 1759 | |
| 1760 | }) |
| 1761 | |
| 1762 | mux.Handle("GET", pattern_BBSimService_GetFlows_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 1763 | ctx, cancel := context.WithCancel(req.Context()) |
| 1764 | defer cancel() |
| 1765 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 1766 | rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) |
| 1767 | if err != nil { |
| 1768 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1769 | return |
| 1770 | } |
| 1771 | resp, md, err := local_request_BBSimService_GetFlows_0(rctx, inboundMarshaler, server, req, pathParams) |
| 1772 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 1773 | if err != nil { |
| 1774 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1775 | return |
| 1776 | } |
| 1777 | |
| 1778 | forward_BBSimService_GetFlows_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 1779 | |
| 1780 | }) |
| 1781 | |
| 1782 | mux.Handle("GET", pattern_BBSimService_GetFlows_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 1783 | ctx, cancel := context.WithCancel(req.Context()) |
| 1784 | defer cancel() |
| 1785 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 1786 | rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) |
| 1787 | if err != nil { |
| 1788 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1789 | return |
| 1790 | } |
| 1791 | resp, md, err := local_request_BBSimService_GetFlows_1(rctx, inboundMarshaler, server, req, pathParams) |
| 1792 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 1793 | if err != nil { |
| 1794 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1795 | return |
| 1796 | } |
| 1797 | |
| 1798 | forward_BBSimService_GetFlows_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 1799 | |
| 1800 | }) |
| 1801 | |
| 1802 | return nil |
| 1803 | } |
| 1804 | |
| 1805 | // RegisterBBSimServiceHandlerFromEndpoint is same as RegisterBBSimServiceHandler but |
| 1806 | // automatically dials to "endpoint" and closes the connection when "ctx" gets done. |
| 1807 | func RegisterBBSimServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { |
| 1808 | conn, err := grpc.Dial(endpoint, opts...) |
| 1809 | if err != nil { |
| 1810 | return err |
| 1811 | } |
| 1812 | defer func() { |
| 1813 | if err != nil { |
| 1814 | if cerr := conn.Close(); cerr != nil { |
| 1815 | grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) |
| 1816 | } |
| 1817 | return |
| 1818 | } |
| 1819 | go func() { |
| 1820 | <-ctx.Done() |
| 1821 | if cerr := conn.Close(); cerr != nil { |
| 1822 | grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) |
| 1823 | } |
| 1824 | }() |
| 1825 | }() |
| 1826 | |
| 1827 | return RegisterBBSimServiceHandler(ctx, mux, conn) |
| 1828 | } |
| 1829 | |
| 1830 | // RegisterBBSimServiceHandler registers the http handlers for service BBSimService to "mux". |
| 1831 | // The handlers forward requests to the grpc endpoint over "conn". |
| 1832 | func RegisterBBSimServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { |
| 1833 | return RegisterBBSimServiceHandlerClient(ctx, mux, NewBBSimServiceClient(conn)) |
| 1834 | } |
| 1835 | |
| 1836 | // RegisterBBSimServiceHandlerClient registers the http handlers for service BBSimService |
| 1837 | // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BBSimServiceClient". |
| 1838 | // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BBSimServiceClient" |
| 1839 | // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in |
| 1840 | // "BBSimServiceClient" to call the correct interceptors. |
| 1841 | func RegisterBBSimServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BBSimServiceClient) error { |
| 1842 | |
| 1843 | mux.Handle("GET", pattern_BBSimService_OLTStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 1844 | ctx, cancel := context.WithCancel(req.Context()) |
| 1845 | defer cancel() |
| 1846 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 1847 | rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| 1848 | if err != nil { |
| 1849 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1850 | return |
| 1851 | } |
| 1852 | resp, md, err := request_BBSimService_OLTStatus_0(rctx, inboundMarshaler, client, req, pathParams) |
| 1853 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 1854 | if err != nil { |
| 1855 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1856 | return |
| 1857 | } |
| 1858 | |
| 1859 | forward_BBSimService_OLTStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 1860 | |
| 1861 | }) |
| 1862 | |
| 1863 | mux.Handle("GET", pattern_BBSimService_OLTStatus_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 1864 | ctx, cancel := context.WithCancel(req.Context()) |
| 1865 | defer cancel() |
| 1866 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 1867 | rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| 1868 | if err != nil { |
| 1869 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1870 | return |
| 1871 | } |
| 1872 | resp, md, err := request_BBSimService_OLTStatus_1(rctx, inboundMarshaler, client, req, pathParams) |
| 1873 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 1874 | if err != nil { |
| 1875 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1876 | return |
| 1877 | } |
| 1878 | |
| 1879 | forward_BBSimService_OLTStatus_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 1880 | |
| 1881 | }) |
| 1882 | |
| 1883 | mux.Handle("GET", pattern_BBSimService_PortStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 1884 | ctx, cancel := context.WithCancel(req.Context()) |
| 1885 | defer cancel() |
| 1886 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 1887 | rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| 1888 | if err != nil { |
| 1889 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1890 | return |
| 1891 | } |
| 1892 | resp, md, err := request_BBSimService_PortStatus_0(rctx, inboundMarshaler, client, req, pathParams) |
| 1893 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 1894 | if err != nil { |
| 1895 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1896 | return |
| 1897 | } |
| 1898 | |
| 1899 | forward_BBSimService_PortStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 1900 | |
| 1901 | }) |
| 1902 | |
| 1903 | mux.Handle("GET", pattern_BBSimService_ONUStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 1904 | ctx, cancel := context.WithCancel(req.Context()) |
| 1905 | defer cancel() |
| 1906 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 1907 | rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| 1908 | if err != nil { |
| 1909 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1910 | return |
| 1911 | } |
| 1912 | resp, md, err := request_BBSimService_ONUStatus_0(rctx, inboundMarshaler, client, req, pathParams) |
| 1913 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 1914 | if err != nil { |
| 1915 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1916 | return |
| 1917 | } |
| 1918 | |
| 1919 | forward_BBSimService_ONUStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 1920 | |
| 1921 | }) |
| 1922 | |
| 1923 | mux.Handle("GET", pattern_BBSimService_ONUStatus_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 1924 | ctx, cancel := context.WithCancel(req.Context()) |
| 1925 | defer cancel() |
| 1926 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 1927 | rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| 1928 | if err != nil { |
| 1929 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1930 | return |
| 1931 | } |
| 1932 | resp, md, err := request_BBSimService_ONUStatus_1(rctx, inboundMarshaler, client, req, pathParams) |
| 1933 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 1934 | if err != nil { |
| 1935 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1936 | return |
| 1937 | } |
| 1938 | |
| 1939 | forward_BBSimService_ONUStatus_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 1940 | |
| 1941 | }) |
| 1942 | |
| 1943 | mux.Handle("GET", pattern_BBSimService_ONUStatus_2, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 1944 | ctx, cancel := context.WithCancel(req.Context()) |
| 1945 | defer cancel() |
| 1946 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 1947 | rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| 1948 | if err != nil { |
| 1949 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1950 | return |
| 1951 | } |
| 1952 | resp, md, err := request_BBSimService_ONUStatus_2(rctx, inboundMarshaler, client, req, pathParams) |
| 1953 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 1954 | if err != nil { |
| 1955 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1956 | return |
| 1957 | } |
| 1958 | |
| 1959 | forward_BBSimService_ONUStatus_2(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 1960 | |
| 1961 | }) |
| 1962 | |
| 1963 | mux.Handle("GET", pattern_BBSimService_ONUStatus_3, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 1964 | ctx, cancel := context.WithCancel(req.Context()) |
| 1965 | defer cancel() |
| 1966 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 1967 | rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| 1968 | if err != nil { |
| 1969 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1970 | return |
| 1971 | } |
| 1972 | resp, md, err := request_BBSimService_ONUStatus_3(rctx, inboundMarshaler, client, req, pathParams) |
| 1973 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 1974 | if err != nil { |
| 1975 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1976 | return |
| 1977 | } |
| 1978 | |
| 1979 | forward_BBSimService_ONUStatus_3(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 1980 | |
| 1981 | }) |
| 1982 | |
| 1983 | mux.Handle("POST", pattern_BBSimService_ONUActivate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 1984 | ctx, cancel := context.WithCancel(req.Context()) |
| 1985 | defer cancel() |
| 1986 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 1987 | rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| 1988 | if err != nil { |
| 1989 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1990 | return |
| 1991 | } |
| 1992 | resp, md, err := request_BBSimService_ONUActivate_0(rctx, inboundMarshaler, client, req, pathParams) |
| 1993 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 1994 | if err != nil { |
| 1995 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 1996 | return |
| 1997 | } |
| 1998 | |
| 1999 | forward_BBSimService_ONUActivate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 2000 | |
| 2001 | }) |
| 2002 | |
| 2003 | mux.Handle("POST", pattern_BBSimService_ONUActivate_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 2004 | ctx, cancel := context.WithCancel(req.Context()) |
| 2005 | defer cancel() |
| 2006 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 2007 | rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| 2008 | if err != nil { |
| 2009 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 2010 | return |
| 2011 | } |
| 2012 | resp, md, err := request_BBSimService_ONUActivate_1(rctx, inboundMarshaler, client, req, pathParams) |
| 2013 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 2014 | if err != nil { |
| 2015 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 2016 | return |
| 2017 | } |
| 2018 | |
| 2019 | forward_BBSimService_ONUActivate_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 2020 | |
| 2021 | }) |
| 2022 | |
| 2023 | mux.Handle("POST", pattern_BBSimService_ONUActivate_2, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 2024 | ctx, cancel := context.WithCancel(req.Context()) |
| 2025 | defer cancel() |
| 2026 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 2027 | rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| 2028 | if err != nil { |
| 2029 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 2030 | return |
| 2031 | } |
| 2032 | resp, md, err := request_BBSimService_ONUActivate_2(rctx, inboundMarshaler, client, req, pathParams) |
| 2033 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 2034 | if err != nil { |
| 2035 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 2036 | return |
| 2037 | } |
| 2038 | |
| 2039 | forward_BBSimService_ONUActivate_2(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 2040 | |
| 2041 | }) |
| 2042 | |
| 2043 | mux.Handle("DELETE", pattern_BBSimService_ONUDeactivate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 2044 | ctx, cancel := context.WithCancel(req.Context()) |
| 2045 | defer cancel() |
| 2046 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 2047 | rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| 2048 | if err != nil { |
| 2049 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 2050 | return |
| 2051 | } |
| 2052 | resp, md, err := request_BBSimService_ONUDeactivate_0(rctx, inboundMarshaler, client, req, pathParams) |
| 2053 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 2054 | if err != nil { |
| 2055 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 2056 | return |
| 2057 | } |
| 2058 | |
| 2059 | forward_BBSimService_ONUDeactivate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 2060 | |
| 2061 | }) |
| 2062 | |
| 2063 | mux.Handle("DELETE", pattern_BBSimService_ONUDeactivate_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 2064 | ctx, cancel := context.WithCancel(req.Context()) |
| 2065 | defer cancel() |
| 2066 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 2067 | rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| 2068 | if err != nil { |
| 2069 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 2070 | return |
| 2071 | } |
| 2072 | resp, md, err := request_BBSimService_ONUDeactivate_1(rctx, inboundMarshaler, client, req, pathParams) |
| 2073 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 2074 | if err != nil { |
| 2075 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 2076 | return |
| 2077 | } |
| 2078 | |
| 2079 | forward_BBSimService_ONUDeactivate_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 2080 | |
| 2081 | }) |
| 2082 | |
| 2083 | mux.Handle("DELETE", pattern_BBSimService_ONUDeactivate_2, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 2084 | ctx, cancel := context.WithCancel(req.Context()) |
| 2085 | defer cancel() |
| 2086 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 2087 | rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| 2088 | if err != nil { |
| 2089 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 2090 | return |
| 2091 | } |
| 2092 | resp, md, err := request_BBSimService_ONUDeactivate_2(rctx, inboundMarshaler, client, req, pathParams) |
| 2093 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 2094 | if err != nil { |
| 2095 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 2096 | return |
| 2097 | } |
| 2098 | |
| 2099 | forward_BBSimService_ONUDeactivate_2(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 2100 | |
| 2101 | }) |
| 2102 | |
| 2103 | mux.Handle("DELETE", pattern_BBSimService_ONUDeactivate_3, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 2104 | ctx, cancel := context.WithCancel(req.Context()) |
| 2105 | defer cancel() |
| 2106 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 2107 | rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| 2108 | if err != nil { |
| 2109 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 2110 | return |
| 2111 | } |
| 2112 | resp, md, err := request_BBSimService_ONUDeactivate_3(rctx, inboundMarshaler, client, req, pathParams) |
| 2113 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 2114 | if err != nil { |
| 2115 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 2116 | return |
| 2117 | } |
| 2118 | |
| 2119 | forward_BBSimService_ONUDeactivate_3(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 2120 | |
| 2121 | }) |
| 2122 | |
| 2123 | mux.Handle("POST", pattern_BBSimService_GenerateONUAlarm_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 2124 | ctx, cancel := context.WithCancel(req.Context()) |
| 2125 | defer cancel() |
| 2126 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 2127 | rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| 2128 | if err != nil { |
| 2129 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 2130 | return |
| 2131 | } |
| 2132 | resp, md, err := request_BBSimService_GenerateONUAlarm_0(rctx, inboundMarshaler, client, req, pathParams) |
| 2133 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 2134 | if err != nil { |
| 2135 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 2136 | return |
| 2137 | } |
| 2138 | |
| 2139 | forward_BBSimService_GenerateONUAlarm_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 2140 | |
| 2141 | }) |
| 2142 | |
| 2143 | mux.Handle("POST", pattern_BBSimService_GenerateOLTAlarm_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 2144 | ctx, cancel := context.WithCancel(req.Context()) |
| 2145 | defer cancel() |
| 2146 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 2147 | rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| 2148 | if err != nil { |
| 2149 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 2150 | return |
| 2151 | } |
| 2152 | resp, md, err := request_BBSimService_GenerateOLTAlarm_0(rctx, inboundMarshaler, client, req, pathParams) |
| 2153 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 2154 | if err != nil { |
| 2155 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 2156 | return |
| 2157 | } |
| 2158 | |
| 2159 | forward_BBSimService_GenerateOLTAlarm_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 2160 | |
| 2161 | }) |
| 2162 | |
| 2163 | mux.Handle("PATCH", pattern_BBSimService_PerformDeviceAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 2164 | ctx, cancel := context.WithCancel(req.Context()) |
| 2165 | defer cancel() |
| 2166 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 2167 | rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| 2168 | if err != nil { |
| 2169 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 2170 | return |
| 2171 | } |
| 2172 | resp, md, err := request_BBSimService_PerformDeviceAction_0(rctx, inboundMarshaler, client, req, pathParams) |
| 2173 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 2174 | if err != nil { |
| 2175 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 2176 | return |
| 2177 | } |
| 2178 | |
| 2179 | forward_BBSimService_PerformDeviceAction_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 2180 | |
| 2181 | }) |
| 2182 | |
| 2183 | mux.Handle("PATCH", pattern_BBSimService_PerformDeviceAction_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 2184 | ctx, cancel := context.WithCancel(req.Context()) |
| 2185 | defer cancel() |
| 2186 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 2187 | rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| 2188 | if err != nil { |
| 2189 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 2190 | return |
| 2191 | } |
| 2192 | resp, md, err := request_BBSimService_PerformDeviceAction_1(rctx, inboundMarshaler, client, req, pathParams) |
| 2193 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 2194 | if err != nil { |
| 2195 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 2196 | return |
| 2197 | } |
| 2198 | |
| 2199 | forward_BBSimService_PerformDeviceAction_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 2200 | |
| 2201 | }) |
| 2202 | |
| 2203 | mux.Handle("GET", pattern_BBSimService_GetFlows_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 2204 | ctx, cancel := context.WithCancel(req.Context()) |
| 2205 | defer cancel() |
| 2206 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 2207 | rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| 2208 | if err != nil { |
| 2209 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 2210 | return |
| 2211 | } |
| 2212 | resp, md, err := request_BBSimService_GetFlows_0(rctx, inboundMarshaler, client, req, pathParams) |
| 2213 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 2214 | if err != nil { |
| 2215 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 2216 | return |
| 2217 | } |
| 2218 | |
| 2219 | forward_BBSimService_GetFlows_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 2220 | |
| 2221 | }) |
| 2222 | |
| 2223 | mux.Handle("GET", pattern_BBSimService_GetFlows_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 2224 | ctx, cancel := context.WithCancel(req.Context()) |
| 2225 | defer cancel() |
| 2226 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 2227 | rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| 2228 | if err != nil { |
| 2229 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 2230 | return |
| 2231 | } |
| 2232 | resp, md, err := request_BBSimService_GetFlows_1(rctx, inboundMarshaler, client, req, pathParams) |
| 2233 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 2234 | if err != nil { |
| 2235 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 2236 | return |
| 2237 | } |
| 2238 | |
| 2239 | forward_BBSimService_GetFlows_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 2240 | |
| 2241 | }) |
| 2242 | |
| 2243 | return nil |
| 2244 | } |
| 2245 | |
| 2246 | var ( |
| 2247 | pattern_BBSimService_OLTStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v0", "olt"}, "", runtime.AssumeColonVerbOpt(true))) |
| 2248 | |
| 2249 | pattern_BBSimService_OLTStatus_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v0", "olt", "status"}, "", runtime.AssumeColonVerbOpt(true))) |
| 2250 | |
| 2251 | 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))) |
| 2252 | |
| 2253 | pattern_BBSimService_ONUStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v0", "olt", "onus"}, "", runtime.AssumeColonVerbOpt(true))) |
| 2254 | |
| 2255 | 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))) |
| 2256 | |
| 2257 | 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))) |
| 2258 | |
| 2259 | 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))) |
| 2260 | |
| 2261 | pattern_BBSimService_ONUActivate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v0", "olt", "onus"}, "", runtime.AssumeColonVerbOpt(true))) |
| 2262 | |
| 2263 | 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))) |
| 2264 | |
| 2265 | 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))) |
| 2266 | |
| 2267 | pattern_BBSimService_ONUDeactivate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v0", "olt", "onus"}, "", runtime.AssumeColonVerbOpt(true))) |
| 2268 | |
| 2269 | 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))) |
| 2270 | |
| 2271 | 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))) |
| 2272 | |
| 2273 | 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))) |
| 2274 | |
| 2275 | 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))) |
| 2276 | |
| 2277 | 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))) |
| 2278 | |
| 2279 | 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))) |
| 2280 | |
| 2281 | 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))) |
| 2282 | |
| 2283 | pattern_BBSimService_GetFlows_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v0", "olt", "flows"}, "", runtime.AssumeColonVerbOpt(true))) |
| 2284 | |
| 2285 | 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))) |
| 2286 | ) |
| 2287 | |
| 2288 | var ( |
| 2289 | forward_BBSimService_OLTStatus_0 = runtime.ForwardResponseMessage |
| 2290 | |
| 2291 | forward_BBSimService_OLTStatus_1 = runtime.ForwardResponseMessage |
| 2292 | |
| 2293 | forward_BBSimService_PortStatus_0 = runtime.ForwardResponseMessage |
| 2294 | |
| 2295 | forward_BBSimService_ONUStatus_0 = runtime.ForwardResponseMessage |
| 2296 | |
| 2297 | forward_BBSimService_ONUStatus_1 = runtime.ForwardResponseMessage |
| 2298 | |
| 2299 | forward_BBSimService_ONUStatus_2 = runtime.ForwardResponseMessage |
| 2300 | |
| 2301 | forward_BBSimService_ONUStatus_3 = runtime.ForwardResponseMessage |
| 2302 | |
| 2303 | forward_BBSimService_ONUActivate_0 = runtime.ForwardResponseMessage |
| 2304 | |
| 2305 | forward_BBSimService_ONUActivate_1 = runtime.ForwardResponseMessage |
| 2306 | |
| 2307 | forward_BBSimService_ONUActivate_2 = runtime.ForwardResponseMessage |
| 2308 | |
| 2309 | forward_BBSimService_ONUDeactivate_0 = runtime.ForwardResponseMessage |
| 2310 | |
| 2311 | forward_BBSimService_ONUDeactivate_1 = runtime.ForwardResponseMessage |
| 2312 | |
| 2313 | forward_BBSimService_ONUDeactivate_2 = runtime.ForwardResponseMessage |
| 2314 | |
| 2315 | forward_BBSimService_ONUDeactivate_3 = runtime.ForwardResponseMessage |
| 2316 | |
| 2317 | forward_BBSimService_GenerateONUAlarm_0 = runtime.ForwardResponseMessage |
| 2318 | |
| 2319 | forward_BBSimService_GenerateOLTAlarm_0 = runtime.ForwardResponseMessage |
| 2320 | |
| 2321 | forward_BBSimService_PerformDeviceAction_0 = runtime.ForwardResponseMessage |
| 2322 | |
| 2323 | forward_BBSimService_PerformDeviceAction_1 = runtime.ForwardResponseMessage |
| 2324 | |
| 2325 | forward_BBSimService_GetFlows_0 = runtime.ForwardResponseMessage |
| 2326 | |
| 2327 | forward_BBSimService_GetFlows_1 = runtime.ForwardResponseMessage |
| 2328 | ) |