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/bbsim/bbsim.proto |
| 3 | |
| 4 | /* |
| 5 | Package bbsim is a reverse proxy. |
| 6 | |
| 7 | It translates gRPC into RESTful JSON APIs. |
| 8 | */ |
| 9 | package bbsim |
| 10 | |
| 11 | import ( |
| 12 | "context" |
| 13 | "io" |
| 14 | "net/http" |
| 15 | |
Pragya Arya | 1cbefa4 | 2020-01-13 12:15:29 +0530 | [diff] [blame] | 16 | "github.com/golang/protobuf/descriptor" |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 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 | |
Pragya Arya | 1cbefa4 | 2020-01-13 12:15:29 +0530 | [diff] [blame] | 26 | // Suppress "imported and not used" errors |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 27 | var _ codes.Code |
| 28 | var _ io.Reader |
| 29 | var _ status.Status |
| 30 | var _ = runtime.String |
| 31 | var _ = utilities.NewDoubleArray |
Pragya Arya | 1cbefa4 | 2020-01-13 12:15:29 +0530 | [diff] [blame] | 32 | var _ = descriptor.ForMessage |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 33 | |
| 34 | func request_BBSim_Version_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimClient, 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.Version(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| 39 | return msg, metadata, err |
| 40 | |
| 41 | } |
| 42 | |
Pragya Arya | 1cbefa4 | 2020-01-13 12:15:29 +0530 | [diff] [blame] | 43 | func local_request_BBSim_Version_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServer, 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.Version(ctx, &protoReq) |
| 48 | return msg, metadata, err |
| 49 | |
| 50 | } |
| 51 | |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 52 | func request_BBSim_GetOlt_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimClient, 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.GetOlt(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| 57 | return msg, metadata, err |
| 58 | |
| 59 | } |
| 60 | |
Pragya Arya | 1cbefa4 | 2020-01-13 12:15:29 +0530 | [diff] [blame] | 61 | func local_request_BBSim_GetOlt_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServer, 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.GetOlt(ctx, &protoReq) |
| 66 | return msg, metadata, err |
| 67 | |
| 68 | } |
| 69 | |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 70 | func request_BBSim_GetOlt_1(ctx context.Context, marshaler runtime.Marshaler, client BBSimClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 71 | var protoReq Empty |
| 72 | var metadata runtime.ServerMetadata |
| 73 | |
| 74 | msg, err := client.GetOlt(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| 75 | return msg, metadata, err |
| 76 | |
| 77 | } |
| 78 | |
Pragya Arya | 1cbefa4 | 2020-01-13 12:15:29 +0530 | [diff] [blame] | 79 | func local_request_BBSim_GetOlt_1(ctx context.Context, marshaler runtime.Marshaler, server BBSimServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 80 | var protoReq Empty |
| 81 | var metadata runtime.ServerMetadata |
| 82 | |
| 83 | msg, err := server.GetOlt(ctx, &protoReq) |
| 84 | return msg, metadata, err |
| 85 | |
| 86 | } |
| 87 | |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 88 | func request_BBSim_GetONUs_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 89 | var protoReq Empty |
| 90 | var metadata runtime.ServerMetadata |
| 91 | |
| 92 | msg, err := client.GetONUs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| 93 | return msg, metadata, err |
| 94 | |
| 95 | } |
| 96 | |
Pragya Arya | 1cbefa4 | 2020-01-13 12:15:29 +0530 | [diff] [blame] | 97 | func local_request_BBSim_GetONUs_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 98 | var protoReq Empty |
| 99 | var metadata runtime.ServerMetadata |
| 100 | |
| 101 | msg, err := server.GetONUs(ctx, &protoReq) |
| 102 | return msg, metadata, err |
| 103 | |
| 104 | } |
| 105 | |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 106 | func request_BBSim_GetONU_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 107 | var protoReq ONURequest |
| 108 | var metadata runtime.ServerMetadata |
| 109 | |
| 110 | var ( |
| 111 | val string |
| 112 | ok bool |
| 113 | err error |
| 114 | _ = err |
| 115 | ) |
| 116 | |
| 117 | val, ok = pathParams["SerialNumber"] |
| 118 | if !ok { |
| 119 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "SerialNumber") |
| 120 | } |
| 121 | |
| 122 | protoReq.SerialNumber, err = runtime.String(val) |
| 123 | |
| 124 | if err != nil { |
| 125 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "SerialNumber", err) |
| 126 | } |
| 127 | |
| 128 | msg, err := client.GetONU(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| 129 | return msg, metadata, err |
| 130 | |
| 131 | } |
| 132 | |
Pragya Arya | 1cbefa4 | 2020-01-13 12:15:29 +0530 | [diff] [blame] | 133 | func local_request_BBSim_GetONU_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 134 | var protoReq ONURequest |
| 135 | var metadata runtime.ServerMetadata |
| 136 | |
| 137 | var ( |
| 138 | val string |
| 139 | ok bool |
| 140 | err error |
| 141 | _ = err |
| 142 | ) |
| 143 | |
| 144 | val, ok = pathParams["SerialNumber"] |
| 145 | if !ok { |
| 146 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "SerialNumber") |
| 147 | } |
| 148 | |
| 149 | protoReq.SerialNumber, err = runtime.String(val) |
| 150 | |
| 151 | if err != nil { |
| 152 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "SerialNumber", err) |
| 153 | } |
| 154 | |
| 155 | msg, err := server.GetONU(ctx, &protoReq) |
| 156 | return msg, metadata, err |
| 157 | |
| 158 | } |
| 159 | |
| 160 | func request_BBSim_ShutdownONU_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 161 | var protoReq ONURequest |
| 162 | var metadata runtime.ServerMetadata |
| 163 | |
| 164 | var ( |
| 165 | val string |
| 166 | ok bool |
| 167 | err error |
| 168 | _ = err |
| 169 | ) |
| 170 | |
| 171 | val, ok = pathParams["SerialNumber"] |
| 172 | if !ok { |
| 173 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "SerialNumber") |
| 174 | } |
| 175 | |
| 176 | protoReq.SerialNumber, err = runtime.String(val) |
| 177 | |
| 178 | if err != nil { |
| 179 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "SerialNumber", err) |
| 180 | } |
| 181 | |
| 182 | msg, err := client.ShutdownONU(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| 183 | return msg, metadata, err |
| 184 | |
| 185 | } |
| 186 | |
| 187 | func local_request_BBSim_ShutdownONU_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 188 | var protoReq ONURequest |
| 189 | var metadata runtime.ServerMetadata |
| 190 | |
| 191 | var ( |
| 192 | val string |
| 193 | ok bool |
| 194 | err error |
| 195 | _ = err |
| 196 | ) |
| 197 | |
| 198 | val, ok = pathParams["SerialNumber"] |
| 199 | if !ok { |
| 200 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "SerialNumber") |
| 201 | } |
| 202 | |
| 203 | protoReq.SerialNumber, err = runtime.String(val) |
| 204 | |
| 205 | if err != nil { |
| 206 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "SerialNumber", err) |
| 207 | } |
| 208 | |
| 209 | msg, err := server.ShutdownONU(ctx, &protoReq) |
| 210 | return msg, metadata, err |
| 211 | |
| 212 | } |
| 213 | |
| 214 | func request_BBSim_PoweronONU_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 215 | var protoReq ONURequest |
| 216 | var metadata runtime.ServerMetadata |
| 217 | |
| 218 | var ( |
| 219 | val string |
| 220 | ok bool |
| 221 | err error |
| 222 | _ = err |
| 223 | ) |
| 224 | |
| 225 | val, ok = pathParams["SerialNumber"] |
| 226 | if !ok { |
| 227 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "SerialNumber") |
| 228 | } |
| 229 | |
| 230 | protoReq.SerialNumber, err = runtime.String(val) |
| 231 | |
| 232 | if err != nil { |
| 233 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "SerialNumber", err) |
| 234 | } |
| 235 | |
| 236 | msg, err := client.PoweronONU(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| 237 | return msg, metadata, err |
| 238 | |
| 239 | } |
| 240 | |
| 241 | func local_request_BBSim_PoweronONU_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 242 | var protoReq ONURequest |
| 243 | var metadata runtime.ServerMetadata |
| 244 | |
| 245 | var ( |
| 246 | val string |
| 247 | ok bool |
| 248 | err error |
| 249 | _ = err |
| 250 | ) |
| 251 | |
| 252 | val, ok = pathParams["SerialNumber"] |
| 253 | if !ok { |
| 254 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "SerialNumber") |
| 255 | } |
| 256 | |
| 257 | protoReq.SerialNumber, err = runtime.String(val) |
| 258 | |
| 259 | if err != nil { |
| 260 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "SerialNumber", err) |
| 261 | } |
| 262 | |
| 263 | msg, err := server.PoweronONU(ctx, &protoReq) |
| 264 | return msg, metadata, err |
| 265 | |
| 266 | } |
| 267 | |
Pragya Arya | 694ece0 | 2020-02-07 13:03:47 +0530 | [diff] [blame] | 268 | var ( |
Anand S Katti | 86552f9 | 2020-03-03 21:56:32 +0530 | [diff] [blame^] | 269 | filter_BBSim_SetOnuAlarmIndication_0 = &utilities.DoubleArray{Encoding: map[string]int{"SerialNumber": 0, "AlarmType": 1, "Status": 2}, Base: []int{1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 1, 1, 2, 3, 4}} |
Pragya Arya | 694ece0 | 2020-02-07 13:03:47 +0530 | [diff] [blame] | 270 | ) |
| 271 | |
Anand S Katti | 86552f9 | 2020-03-03 21:56:32 +0530 | [diff] [blame^] | 272 | func request_BBSim_SetOnuAlarmIndication_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 273 | var protoReq ONUAlarmRequest |
Pragya Arya | 694ece0 | 2020-02-07 13:03:47 +0530 | [diff] [blame] | 274 | var metadata runtime.ServerMetadata |
| 275 | |
| 276 | var ( |
| 277 | val string |
| 278 | ok bool |
| 279 | err error |
| 280 | _ = err |
| 281 | ) |
| 282 | |
| 283 | val, ok = pathParams["SerialNumber"] |
| 284 | if !ok { |
| 285 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "SerialNumber") |
| 286 | } |
| 287 | |
| 288 | protoReq.SerialNumber, err = runtime.String(val) |
| 289 | |
| 290 | if err != nil { |
| 291 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "SerialNumber", err) |
| 292 | } |
| 293 | |
| 294 | val, ok = pathParams["AlarmType"] |
| 295 | if !ok { |
| 296 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "AlarmType") |
| 297 | } |
| 298 | |
| 299 | protoReq.AlarmType, err = runtime.String(val) |
| 300 | |
| 301 | if err != nil { |
| 302 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "AlarmType", err) |
| 303 | } |
| 304 | |
| 305 | val, ok = pathParams["Status"] |
| 306 | if !ok { |
| 307 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "Status") |
| 308 | } |
| 309 | |
| 310 | protoReq.Status, err = runtime.String(val) |
| 311 | |
| 312 | if err != nil { |
| 313 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "Status", err) |
| 314 | } |
| 315 | |
| 316 | if err := req.ParseForm(); err != nil { |
| 317 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 318 | } |
Anand S Katti | 86552f9 | 2020-03-03 21:56:32 +0530 | [diff] [blame^] | 319 | if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSim_SetOnuAlarmIndication_0); err != nil { |
Pragya Arya | 694ece0 | 2020-02-07 13:03:47 +0530 | [diff] [blame] | 320 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 321 | } |
| 322 | |
Anand S Katti | 86552f9 | 2020-03-03 21:56:32 +0530 | [diff] [blame^] | 323 | msg, err := client.SetOnuAlarmIndication(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
Pragya Arya | 694ece0 | 2020-02-07 13:03:47 +0530 | [diff] [blame] | 324 | return msg, metadata, err |
| 325 | |
| 326 | } |
| 327 | |
Anand S Katti | 86552f9 | 2020-03-03 21:56:32 +0530 | [diff] [blame^] | 328 | func local_request_BBSim_SetOnuAlarmIndication_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 329 | var protoReq ONUAlarmRequest |
Pragya Arya | 694ece0 | 2020-02-07 13:03:47 +0530 | [diff] [blame] | 330 | var metadata runtime.ServerMetadata |
| 331 | |
| 332 | var ( |
| 333 | val string |
| 334 | ok bool |
| 335 | err error |
| 336 | _ = err |
| 337 | ) |
| 338 | |
| 339 | val, ok = pathParams["SerialNumber"] |
| 340 | if !ok { |
| 341 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "SerialNumber") |
| 342 | } |
| 343 | |
| 344 | protoReq.SerialNumber, err = runtime.String(val) |
| 345 | |
| 346 | if err != nil { |
| 347 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "SerialNumber", err) |
| 348 | } |
| 349 | |
| 350 | val, ok = pathParams["AlarmType"] |
| 351 | if !ok { |
| 352 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "AlarmType") |
| 353 | } |
| 354 | |
| 355 | protoReq.AlarmType, err = runtime.String(val) |
| 356 | |
| 357 | if err != nil { |
| 358 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "AlarmType", err) |
| 359 | } |
| 360 | |
| 361 | val, ok = pathParams["Status"] |
| 362 | if !ok { |
| 363 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "Status") |
| 364 | } |
| 365 | |
| 366 | protoReq.Status, err = runtime.String(val) |
| 367 | |
| 368 | if err != nil { |
| 369 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "Status", err) |
| 370 | } |
| 371 | |
Anand S Katti | 86552f9 | 2020-03-03 21:56:32 +0530 | [diff] [blame^] | 372 | if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_BBSim_SetOnuAlarmIndication_0); err != nil { |
Pragya Arya | 694ece0 | 2020-02-07 13:03:47 +0530 | [diff] [blame] | 373 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| 374 | } |
| 375 | |
Anand S Katti | 86552f9 | 2020-03-03 21:56:32 +0530 | [diff] [blame^] | 376 | msg, err := server.SetOnuAlarmIndication(ctx, &protoReq) |
| 377 | return msg, metadata, err |
| 378 | |
| 379 | } |
| 380 | |
| 381 | func request_BBSim_SetOltAlarmIndication_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 382 | var protoReq OLTAlarmRequest |
| 383 | var metadata runtime.ServerMetadata |
| 384 | |
| 385 | var ( |
| 386 | val string |
| 387 | ok bool |
| 388 | err error |
| 389 | _ = err |
| 390 | ) |
| 391 | |
| 392 | val, ok = pathParams["InterfaceType"] |
| 393 | if !ok { |
| 394 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "InterfaceType") |
| 395 | } |
| 396 | |
| 397 | protoReq.InterfaceType, err = runtime.String(val) |
| 398 | |
| 399 | if err != nil { |
| 400 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "InterfaceType", err) |
| 401 | } |
| 402 | |
| 403 | val, ok = pathParams["InterfaceID"] |
| 404 | if !ok { |
| 405 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "InterfaceID") |
| 406 | } |
| 407 | |
| 408 | protoReq.InterfaceID, err = runtime.Uint32(val) |
| 409 | |
| 410 | if err != nil { |
| 411 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "InterfaceID", err) |
| 412 | } |
| 413 | |
| 414 | val, ok = pathParams["Status"] |
| 415 | if !ok { |
| 416 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "Status") |
| 417 | } |
| 418 | |
| 419 | protoReq.Status, err = runtime.String(val) |
| 420 | |
| 421 | if err != nil { |
| 422 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "Status", err) |
| 423 | } |
| 424 | |
| 425 | msg, err := client.SetOltAlarmIndication(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| 426 | return msg, metadata, err |
| 427 | |
| 428 | } |
| 429 | |
| 430 | func local_request_BBSim_SetOltAlarmIndication_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 431 | var protoReq OLTAlarmRequest |
| 432 | var metadata runtime.ServerMetadata |
| 433 | |
| 434 | var ( |
| 435 | val string |
| 436 | ok bool |
| 437 | err error |
| 438 | _ = err |
| 439 | ) |
| 440 | |
| 441 | val, ok = pathParams["InterfaceType"] |
| 442 | if !ok { |
| 443 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "InterfaceType") |
| 444 | } |
| 445 | |
| 446 | protoReq.InterfaceType, err = runtime.String(val) |
| 447 | |
| 448 | if err != nil { |
| 449 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "InterfaceType", err) |
| 450 | } |
| 451 | |
| 452 | val, ok = pathParams["InterfaceID"] |
| 453 | if !ok { |
| 454 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "InterfaceID") |
| 455 | } |
| 456 | |
| 457 | protoReq.InterfaceID, err = runtime.Uint32(val) |
| 458 | |
| 459 | if err != nil { |
| 460 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "InterfaceID", err) |
| 461 | } |
| 462 | |
| 463 | val, ok = pathParams["Status"] |
| 464 | if !ok { |
| 465 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "Status") |
| 466 | } |
| 467 | |
| 468 | protoReq.Status, err = runtime.String(val) |
| 469 | |
| 470 | if err != nil { |
| 471 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "Status", err) |
| 472 | } |
| 473 | |
| 474 | msg, err := server.SetOltAlarmIndication(ctx, &protoReq) |
Pragya Arya | 694ece0 | 2020-02-07 13:03:47 +0530 | [diff] [blame] | 475 | return msg, metadata, err |
| 476 | |
| 477 | } |
| 478 | |
Anand S Katti | 0954135 | 2020-01-29 15:54:01 +0530 | [diff] [blame] | 479 | func request_BBSim_GetOnuTrafficSchedulers_0(ctx context.Context, marshaler runtime.Marshaler, client BBSimClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 480 | var protoReq ONURequest |
| 481 | var metadata runtime.ServerMetadata |
| 482 | |
| 483 | var ( |
| 484 | val string |
| 485 | ok bool |
| 486 | err error |
| 487 | _ = err |
| 488 | ) |
| 489 | |
| 490 | val, ok = pathParams["SerialNumber"] |
| 491 | if !ok { |
| 492 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "SerialNumber") |
| 493 | } |
| 494 | |
| 495 | protoReq.SerialNumber, err = runtime.String(val) |
| 496 | |
| 497 | if err != nil { |
| 498 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "SerialNumber", err) |
| 499 | } |
| 500 | |
| 501 | msg, err := client.GetOnuTrafficSchedulers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| 502 | return msg, metadata, err |
| 503 | |
| 504 | } |
| 505 | |
| 506 | func local_request_BBSim_GetOnuTrafficSchedulers_0(ctx context.Context, marshaler runtime.Marshaler, server BBSimServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
| 507 | var protoReq ONURequest |
| 508 | var metadata runtime.ServerMetadata |
| 509 | |
| 510 | var ( |
| 511 | val string |
| 512 | ok bool |
| 513 | err error |
| 514 | _ = err |
| 515 | ) |
| 516 | |
| 517 | val, ok = pathParams["SerialNumber"] |
| 518 | if !ok { |
| 519 | return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "SerialNumber") |
| 520 | } |
| 521 | |
| 522 | protoReq.SerialNumber, err = runtime.String(val) |
| 523 | |
| 524 | if err != nil { |
| 525 | return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "SerialNumber", err) |
| 526 | } |
| 527 | |
| 528 | msg, err := server.GetOnuTrafficSchedulers(ctx, &protoReq) |
| 529 | return msg, metadata, err |
| 530 | |
| 531 | } |
| 532 | |
Pragya Arya | 1cbefa4 | 2020-01-13 12:15:29 +0530 | [diff] [blame] | 533 | // RegisterBBSimHandlerServer registers the http handlers for service BBSim to "mux". |
| 534 | // UnaryRPC :call BBSimServer directly. |
| 535 | // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. |
| 536 | func RegisterBBSimHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BBSimServer) error { |
| 537 | |
| 538 | mux.Handle("GET", pattern_BBSim_Version_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 539 | ctx, cancel := context.WithCancel(req.Context()) |
| 540 | defer cancel() |
| 541 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 542 | rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) |
| 543 | if err != nil { |
| 544 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 545 | return |
| 546 | } |
| 547 | resp, md, err := local_request_BBSim_Version_0(rctx, inboundMarshaler, server, req, pathParams) |
| 548 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 549 | if err != nil { |
| 550 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 551 | return |
| 552 | } |
| 553 | |
| 554 | forward_BBSim_Version_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 555 | |
| 556 | }) |
| 557 | |
| 558 | mux.Handle("GET", pattern_BBSim_GetOlt_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 559 | ctx, cancel := context.WithCancel(req.Context()) |
| 560 | defer cancel() |
| 561 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 562 | rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) |
| 563 | if err != nil { |
| 564 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 565 | return |
| 566 | } |
| 567 | resp, md, err := local_request_BBSim_GetOlt_0(rctx, inboundMarshaler, server, req, pathParams) |
| 568 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 569 | if err != nil { |
| 570 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 571 | return |
| 572 | } |
| 573 | |
| 574 | forward_BBSim_GetOlt_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 575 | |
| 576 | }) |
| 577 | |
| 578 | mux.Handle("GET", pattern_BBSim_GetOlt_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 579 | ctx, cancel := context.WithCancel(req.Context()) |
| 580 | defer cancel() |
| 581 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 582 | rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) |
| 583 | if err != nil { |
| 584 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 585 | return |
| 586 | } |
| 587 | resp, md, err := local_request_BBSim_GetOlt_1(rctx, inboundMarshaler, server, req, pathParams) |
| 588 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 589 | if err != nil { |
| 590 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 591 | return |
| 592 | } |
| 593 | |
| 594 | forward_BBSim_GetOlt_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 595 | |
| 596 | }) |
| 597 | |
| 598 | mux.Handle("GET", pattern_BBSim_GetONUs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 599 | ctx, cancel := context.WithCancel(req.Context()) |
| 600 | defer cancel() |
| 601 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 602 | rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) |
| 603 | if err != nil { |
| 604 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 605 | return |
| 606 | } |
| 607 | resp, md, err := local_request_BBSim_GetONUs_0(rctx, inboundMarshaler, server, req, pathParams) |
| 608 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 609 | if err != nil { |
| 610 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 611 | return |
| 612 | } |
| 613 | |
| 614 | forward_BBSim_GetONUs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 615 | |
| 616 | }) |
| 617 | |
| 618 | mux.Handle("GET", pattern_BBSim_GetONU_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 619 | ctx, cancel := context.WithCancel(req.Context()) |
| 620 | defer cancel() |
| 621 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 622 | rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) |
| 623 | if err != nil { |
| 624 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 625 | return |
| 626 | } |
| 627 | resp, md, err := local_request_BBSim_GetONU_0(rctx, inboundMarshaler, server, req, pathParams) |
| 628 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 629 | if err != nil { |
| 630 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 631 | return |
| 632 | } |
| 633 | |
| 634 | forward_BBSim_GetONU_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 635 | |
| 636 | }) |
| 637 | |
| 638 | mux.Handle("DELETE", pattern_BBSim_ShutdownONU_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 639 | ctx, cancel := context.WithCancel(req.Context()) |
| 640 | defer cancel() |
| 641 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 642 | rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) |
| 643 | if err != nil { |
| 644 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 645 | return |
| 646 | } |
| 647 | resp, md, err := local_request_BBSim_ShutdownONU_0(rctx, inboundMarshaler, server, req, pathParams) |
| 648 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 649 | if err != nil { |
| 650 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 651 | return |
| 652 | } |
| 653 | |
| 654 | forward_BBSim_ShutdownONU_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 655 | |
| 656 | }) |
| 657 | |
| 658 | mux.Handle("POST", pattern_BBSim_PoweronONU_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 659 | ctx, cancel := context.WithCancel(req.Context()) |
| 660 | defer cancel() |
| 661 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 662 | rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) |
| 663 | if err != nil { |
| 664 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 665 | return |
| 666 | } |
| 667 | resp, md, err := local_request_BBSim_PoweronONU_0(rctx, inboundMarshaler, server, req, pathParams) |
| 668 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 669 | if err != nil { |
| 670 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 671 | return |
| 672 | } |
| 673 | |
| 674 | forward_BBSim_PoweronONU_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 675 | |
| 676 | }) |
| 677 | |
Anand S Katti | 86552f9 | 2020-03-03 21:56:32 +0530 | [diff] [blame^] | 678 | mux.Handle("POST", pattern_BBSim_SetOnuAlarmIndication_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
Pragya Arya | 694ece0 | 2020-02-07 13:03:47 +0530 | [diff] [blame] | 679 | ctx, cancel := context.WithCancel(req.Context()) |
| 680 | defer cancel() |
| 681 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 682 | rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) |
| 683 | if err != nil { |
| 684 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 685 | return |
| 686 | } |
Anand S Katti | 86552f9 | 2020-03-03 21:56:32 +0530 | [diff] [blame^] | 687 | resp, md, err := local_request_BBSim_SetOnuAlarmIndication_0(rctx, inboundMarshaler, server, req, pathParams) |
Pragya Arya | 694ece0 | 2020-02-07 13:03:47 +0530 | [diff] [blame] | 688 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 689 | if err != nil { |
| 690 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 691 | return |
| 692 | } |
| 693 | |
Anand S Katti | 86552f9 | 2020-03-03 21:56:32 +0530 | [diff] [blame^] | 694 | forward_BBSim_SetOnuAlarmIndication_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 695 | |
| 696 | }) |
| 697 | |
| 698 | mux.Handle("POST", pattern_BBSim_SetOltAlarmIndication_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 699 | ctx, cancel := context.WithCancel(req.Context()) |
| 700 | defer cancel() |
| 701 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 702 | rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) |
| 703 | if err != nil { |
| 704 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 705 | return |
| 706 | } |
| 707 | resp, md, err := local_request_BBSim_SetOltAlarmIndication_0(rctx, inboundMarshaler, server, req, pathParams) |
| 708 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 709 | if err != nil { |
| 710 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 711 | return |
| 712 | } |
| 713 | |
| 714 | forward_BBSim_SetOltAlarmIndication_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
Pragya Arya | 694ece0 | 2020-02-07 13:03:47 +0530 | [diff] [blame] | 715 | |
| 716 | }) |
| 717 | |
Anand S Katti | 0954135 | 2020-01-29 15:54:01 +0530 | [diff] [blame] | 718 | mux.Handle("GET", pattern_BBSim_GetOnuTrafficSchedulers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 719 | ctx, cancel := context.WithCancel(req.Context()) |
| 720 | defer cancel() |
| 721 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 722 | rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) |
| 723 | if err != nil { |
| 724 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 725 | return |
| 726 | } |
| 727 | resp, md, err := local_request_BBSim_GetOnuTrafficSchedulers_0(rctx, inboundMarshaler, server, req, pathParams) |
| 728 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 729 | if err != nil { |
| 730 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 731 | return |
| 732 | } |
| 733 | |
| 734 | forward_BBSim_GetOnuTrafficSchedulers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 735 | |
| 736 | }) |
| 737 | |
Pragya Arya | 1cbefa4 | 2020-01-13 12:15:29 +0530 | [diff] [blame] | 738 | return nil |
| 739 | } |
| 740 | |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 741 | // RegisterBBSimHandlerFromEndpoint is same as RegisterBBSimHandler but |
| 742 | // automatically dials to "endpoint" and closes the connection when "ctx" gets done. |
| 743 | func RegisterBBSimHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { |
| 744 | conn, err := grpc.Dial(endpoint, opts...) |
| 745 | if err != nil { |
| 746 | return err |
| 747 | } |
| 748 | defer func() { |
| 749 | if err != nil { |
| 750 | if cerr := conn.Close(); cerr != nil { |
| 751 | grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) |
| 752 | } |
| 753 | return |
| 754 | } |
| 755 | go func() { |
| 756 | <-ctx.Done() |
| 757 | if cerr := conn.Close(); cerr != nil { |
| 758 | grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) |
| 759 | } |
| 760 | }() |
| 761 | }() |
| 762 | |
| 763 | return RegisterBBSimHandler(ctx, mux, conn) |
| 764 | } |
| 765 | |
| 766 | // RegisterBBSimHandler registers the http handlers for service BBSim to "mux". |
| 767 | // The handlers forward requests to the grpc endpoint over "conn". |
| 768 | func RegisterBBSimHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { |
| 769 | return RegisterBBSimHandlerClient(ctx, mux, NewBBSimClient(conn)) |
| 770 | } |
| 771 | |
| 772 | // RegisterBBSimHandlerClient registers the http handlers for service BBSim |
| 773 | // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BBSimClient". |
| 774 | // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BBSimClient" |
| 775 | // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in |
| 776 | // "BBSimClient" to call the correct interceptors. |
| 777 | func RegisterBBSimHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BBSimClient) error { |
| 778 | |
| 779 | mux.Handle("GET", pattern_BBSim_Version_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 780 | ctx, cancel := context.WithCancel(req.Context()) |
| 781 | defer cancel() |
| 782 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 783 | rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| 784 | if err != nil { |
| 785 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 786 | return |
| 787 | } |
| 788 | resp, md, err := request_BBSim_Version_0(rctx, inboundMarshaler, client, req, pathParams) |
| 789 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 790 | if err != nil { |
| 791 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 792 | return |
| 793 | } |
| 794 | |
| 795 | forward_BBSim_Version_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 796 | |
| 797 | }) |
| 798 | |
| 799 | mux.Handle("GET", pattern_BBSim_GetOlt_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 800 | ctx, cancel := context.WithCancel(req.Context()) |
| 801 | defer cancel() |
| 802 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 803 | rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| 804 | if err != nil { |
| 805 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 806 | return |
| 807 | } |
| 808 | resp, md, err := request_BBSim_GetOlt_0(rctx, inboundMarshaler, client, req, pathParams) |
| 809 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 810 | if err != nil { |
| 811 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 812 | return |
| 813 | } |
| 814 | |
| 815 | forward_BBSim_GetOlt_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 816 | |
| 817 | }) |
| 818 | |
| 819 | mux.Handle("GET", pattern_BBSim_GetOlt_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 820 | ctx, cancel := context.WithCancel(req.Context()) |
| 821 | defer cancel() |
| 822 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 823 | rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| 824 | if err != nil { |
| 825 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 826 | return |
| 827 | } |
| 828 | resp, md, err := request_BBSim_GetOlt_1(rctx, inboundMarshaler, client, req, pathParams) |
| 829 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 830 | if err != nil { |
| 831 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 832 | return |
| 833 | } |
| 834 | |
| 835 | forward_BBSim_GetOlt_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 836 | |
| 837 | }) |
| 838 | |
| 839 | mux.Handle("GET", pattern_BBSim_GetONUs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 840 | ctx, cancel := context.WithCancel(req.Context()) |
| 841 | defer cancel() |
| 842 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 843 | rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| 844 | if err != nil { |
| 845 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 846 | return |
| 847 | } |
| 848 | resp, md, err := request_BBSim_GetONUs_0(rctx, inboundMarshaler, client, req, pathParams) |
| 849 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 850 | if err != nil { |
| 851 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 852 | return |
| 853 | } |
| 854 | |
| 855 | forward_BBSim_GetONUs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 856 | |
| 857 | }) |
| 858 | |
| 859 | mux.Handle("GET", pattern_BBSim_GetONU_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 860 | ctx, cancel := context.WithCancel(req.Context()) |
| 861 | defer cancel() |
| 862 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 863 | rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| 864 | if err != nil { |
| 865 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 866 | return |
| 867 | } |
| 868 | resp, md, err := request_BBSim_GetONU_0(rctx, inboundMarshaler, client, req, pathParams) |
| 869 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 870 | if err != nil { |
| 871 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 872 | return |
| 873 | } |
| 874 | |
| 875 | forward_BBSim_GetONU_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 876 | |
| 877 | }) |
| 878 | |
Pragya Arya | 1cbefa4 | 2020-01-13 12:15:29 +0530 | [diff] [blame] | 879 | mux.Handle("DELETE", pattern_BBSim_ShutdownONU_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 880 | ctx, cancel := context.WithCancel(req.Context()) |
| 881 | defer cancel() |
| 882 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 883 | rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| 884 | if err != nil { |
| 885 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 886 | return |
| 887 | } |
| 888 | resp, md, err := request_BBSim_ShutdownONU_0(rctx, inboundMarshaler, client, req, pathParams) |
| 889 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 890 | if err != nil { |
| 891 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 892 | return |
| 893 | } |
| 894 | |
| 895 | forward_BBSim_ShutdownONU_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 896 | |
| 897 | }) |
| 898 | |
| 899 | mux.Handle("POST", pattern_BBSim_PoweronONU_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 900 | ctx, cancel := context.WithCancel(req.Context()) |
| 901 | defer cancel() |
| 902 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 903 | rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| 904 | if err != nil { |
| 905 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 906 | return |
| 907 | } |
| 908 | resp, md, err := request_BBSim_PoweronONU_0(rctx, inboundMarshaler, client, req, pathParams) |
| 909 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 910 | if err != nil { |
| 911 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 912 | return |
| 913 | } |
| 914 | |
| 915 | forward_BBSim_PoweronONU_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 916 | |
| 917 | }) |
| 918 | |
Anand S Katti | 86552f9 | 2020-03-03 21:56:32 +0530 | [diff] [blame^] | 919 | mux.Handle("POST", pattern_BBSim_SetOnuAlarmIndication_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
Pragya Arya | 694ece0 | 2020-02-07 13:03:47 +0530 | [diff] [blame] | 920 | ctx, cancel := context.WithCancel(req.Context()) |
| 921 | defer cancel() |
| 922 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 923 | rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| 924 | if err != nil { |
| 925 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 926 | return |
| 927 | } |
Anand S Katti | 86552f9 | 2020-03-03 21:56:32 +0530 | [diff] [blame^] | 928 | resp, md, err := request_BBSim_SetOnuAlarmIndication_0(rctx, inboundMarshaler, client, req, pathParams) |
Pragya Arya | 694ece0 | 2020-02-07 13:03:47 +0530 | [diff] [blame] | 929 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 930 | if err != nil { |
| 931 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 932 | return |
| 933 | } |
| 934 | |
Anand S Katti | 86552f9 | 2020-03-03 21:56:32 +0530 | [diff] [blame^] | 935 | forward_BBSim_SetOnuAlarmIndication_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 936 | |
| 937 | }) |
| 938 | |
| 939 | mux.Handle("POST", pattern_BBSim_SetOltAlarmIndication_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 940 | ctx, cancel := context.WithCancel(req.Context()) |
| 941 | defer cancel() |
| 942 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 943 | rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| 944 | if err != nil { |
| 945 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 946 | return |
| 947 | } |
| 948 | resp, md, err := request_BBSim_SetOltAlarmIndication_0(rctx, inboundMarshaler, client, req, pathParams) |
| 949 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 950 | if err != nil { |
| 951 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 952 | return |
| 953 | } |
| 954 | |
| 955 | forward_BBSim_SetOltAlarmIndication_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
Pragya Arya | 694ece0 | 2020-02-07 13:03:47 +0530 | [diff] [blame] | 956 | |
| 957 | }) |
| 958 | |
Anand S Katti | 0954135 | 2020-01-29 15:54:01 +0530 | [diff] [blame] | 959 | mux.Handle("GET", pattern_BBSim_GetOnuTrafficSchedulers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| 960 | ctx, cancel := context.WithCancel(req.Context()) |
| 961 | defer cancel() |
| 962 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| 963 | rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| 964 | if err != nil { |
| 965 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 966 | return |
| 967 | } |
| 968 | resp, md, err := request_BBSim_GetOnuTrafficSchedulers_0(rctx, inboundMarshaler, client, req, pathParams) |
| 969 | ctx = runtime.NewServerMetadataContext(ctx, md) |
| 970 | if err != nil { |
| 971 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| 972 | return |
| 973 | } |
| 974 | |
| 975 | forward_BBSim_GetOnuTrafficSchedulers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| 976 | |
| 977 | }) |
| 978 | |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 979 | return nil |
| 980 | } |
| 981 | |
| 982 | var ( |
| 983 | pattern_BBSim_Version_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "version"}, "", runtime.AssumeColonVerbOpt(true))) |
| 984 | |
| 985 | pattern_BBSim_GetOlt_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "olt"}, "", runtime.AssumeColonVerbOpt(true))) |
| 986 | |
| 987 | pattern_BBSim_GetOlt_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "olt", "status"}, "", runtime.AssumeColonVerbOpt(true))) |
| 988 | |
| 989 | pattern_BBSim_GetONUs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "olt", "onus"}, "", runtime.AssumeColonVerbOpt(true))) |
| 990 | |
| 991 | pattern_BBSim_GetONU_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "olt", "onus", "SerialNumber"}, "", runtime.AssumeColonVerbOpt(true))) |
Pragya Arya | 1cbefa4 | 2020-01-13 12:15:29 +0530 | [diff] [blame] | 992 | |
| 993 | pattern_BBSim_ShutdownONU_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "olt", "onus", "SerialNumber"}, "", runtime.AssumeColonVerbOpt(true))) |
| 994 | |
| 995 | pattern_BBSim_PoweronONU_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "olt", "onus", "SerialNumber"}, "", runtime.AssumeColonVerbOpt(true))) |
Pragya Arya | 694ece0 | 2020-02-07 13:03:47 +0530 | [diff] [blame] | 996 | |
Anand S Katti | 86552f9 | 2020-03-03 21:56:32 +0530 | [diff] [blame^] | 997 | pattern_BBSim_SetOnuAlarmIndication_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{"v1", "olt", "onus", "SerialNumber", "alarms", "AlarmType", "Status"}, "", runtime.AssumeColonVerbOpt(true))) |
| 998 | |
| 999 | pattern_BBSim_SetOltAlarmIndication_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{"v1", "olt", "ports", "InterfaceType", "InterfaceID", "alarms", "los", "Status"}, "", runtime.AssumeColonVerbOpt(true))) |
Anand S Katti | 0954135 | 2020-01-29 15:54:01 +0530 | [diff] [blame] | 1000 | |
| 1001 | pattern_BBSim_GetOnuTrafficSchedulers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"v1", "olt", "onus", "SerialNumber", "trafficschedulers"}, "", runtime.AssumeColonVerbOpt(true))) |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 1002 | ) |
| 1003 | |
| 1004 | var ( |
| 1005 | forward_BBSim_Version_0 = runtime.ForwardResponseMessage |
| 1006 | |
| 1007 | forward_BBSim_GetOlt_0 = runtime.ForwardResponseMessage |
| 1008 | |
| 1009 | forward_BBSim_GetOlt_1 = runtime.ForwardResponseMessage |
| 1010 | |
| 1011 | forward_BBSim_GetONUs_0 = runtime.ForwardResponseMessage |
| 1012 | |
| 1013 | forward_BBSim_GetONU_0 = runtime.ForwardResponseMessage |
Pragya Arya | 1cbefa4 | 2020-01-13 12:15:29 +0530 | [diff] [blame] | 1014 | |
| 1015 | forward_BBSim_ShutdownONU_0 = runtime.ForwardResponseMessage |
| 1016 | |
| 1017 | forward_BBSim_PoweronONU_0 = runtime.ForwardResponseMessage |
Pragya Arya | 694ece0 | 2020-02-07 13:03:47 +0530 | [diff] [blame] | 1018 | |
Anand S Katti | 86552f9 | 2020-03-03 21:56:32 +0530 | [diff] [blame^] | 1019 | forward_BBSim_SetOnuAlarmIndication_0 = runtime.ForwardResponseMessage |
| 1020 | |
| 1021 | forward_BBSim_SetOltAlarmIndication_0 = runtime.ForwardResponseMessage |
Anand S Katti | 0954135 | 2020-01-29 15:54:01 +0530 | [diff] [blame] | 1022 | |
| 1023 | forward_BBSim_GetOnuTrafficSchedulers_0 = runtime.ForwardResponseMessage |
Matteo Scandolo | a6a3aee | 2019-11-26 13:30:14 -0700 | [diff] [blame] | 1024 | ) |