| // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. |
| // source: api/legacy/bbsim.proto |
| |
| /* |
| Package legacy is a reverse proxy. |
| |
| It translates gRPC into RESTful JSON APIs. |
| */ |
| package legacy |
| |
| import ( |
| "context" |
| "io" |
| "net/http" |
| |
| "github.com/golang/protobuf/proto" |
| "github.com/grpc-ecosystem/grpc-gateway/runtime" |
| "github.com/grpc-ecosystem/grpc-gateway/utilities" |
| "google.golang.org/grpc" |
| "google.golang.org/grpc/codes" |
| "google.golang.org/grpc/grpclog" |
| "google.golang.org/grpc/status" |
| ) |
| |
| var _ codes.Code |
| var _ io.Reader |
| var _ status.Status |
| var _ = runtime.String |
| var _ = utilities.NewDoubleArray |
| |
| 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) { |
| var protoReq Empty |
| var metadata runtime.ServerMetadata |
| |
| msg, err := client.OLTStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| return msg, metadata, err |
| |
| } |
| |
| 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) { |
| var protoReq Empty |
| var metadata runtime.ServerMetadata |
| |
| msg, err := client.OLTStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| return msg, metadata, err |
| |
| } |
| |
| var ( |
| 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}} |
| ) |
| |
| 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) { |
| var protoReq PortInfo |
| var metadata runtime.ServerMetadata |
| |
| var ( |
| val string |
| ok bool |
| err error |
| _ = err |
| ) |
| |
| val, ok = pathParams["port_type"] |
| if !ok { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_type") |
| } |
| |
| protoReq.PortType, err = runtime.String(val) |
| |
| if err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_type", err) |
| } |
| |
| val, ok = pathParams["port_id"] |
| if !ok { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id") |
| } |
| |
| protoReq.PortId, err = runtime.Uint32(val) |
| |
| if err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) |
| } |
| |
| if err := req.ParseForm(); err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| } |
| if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_PortStatus_0); err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| } |
| |
| msg, err := client.PortStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| return msg, metadata, err |
| |
| } |
| |
| var ( |
| filter_BBSimService_ONUStatus_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} |
| ) |
| |
| 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) { |
| var protoReq ONURequest |
| var metadata runtime.ServerMetadata |
| |
| if err := req.ParseForm(); err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| } |
| if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_ONUStatus_0); err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| } |
| |
| msg, err := client.ONUStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| return msg, metadata, err |
| |
| } |
| |
| var ( |
| 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}} |
| ) |
| |
| 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) { |
| var protoReq ONURequest |
| var metadata runtime.ServerMetadata |
| |
| var ( |
| val string |
| ok bool |
| err error |
| _ = err |
| ) |
| |
| val, ok = pathParams["onu.onu_serial"] |
| if !ok { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.onu_serial") |
| } |
| |
| err = runtime.PopulateFieldFromPath(&protoReq, "onu.onu_serial", val) |
| |
| if err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.onu_serial", err) |
| } |
| |
| if err := req.ParseForm(); err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| } |
| if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_ONUStatus_1); err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| } |
| |
| msg, err := client.ONUStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| return msg, metadata, err |
| |
| } |
| |
| var ( |
| 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}} |
| ) |
| |
| 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) { |
| var protoReq ONURequest |
| var metadata runtime.ServerMetadata |
| |
| var ( |
| val string |
| ok bool |
| err error |
| _ = err |
| ) |
| |
| val, ok = pathParams["onu.pon_port_id"] |
| if !ok { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.pon_port_id") |
| } |
| |
| err = runtime.PopulateFieldFromPath(&protoReq, "onu.pon_port_id", val) |
| |
| if err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.pon_port_id", err) |
| } |
| |
| val, ok = pathParams["onu.onu_id"] |
| if !ok { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.onu_id") |
| } |
| |
| err = runtime.PopulateFieldFromPath(&protoReq, "onu.onu_id", val) |
| |
| if err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.onu_id", err) |
| } |
| |
| if err := req.ParseForm(); err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| } |
| if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_ONUStatus_2); err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| } |
| |
| msg, err := client.ONUStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| return msg, metadata, err |
| |
| } |
| |
| var ( |
| 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}} |
| ) |
| |
| 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) { |
| var protoReq ONURequest |
| var metadata runtime.ServerMetadata |
| |
| var ( |
| val string |
| ok bool |
| err error |
| _ = err |
| ) |
| |
| val, ok = pathParams["onu.pon_port_id"] |
| if !ok { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.pon_port_id") |
| } |
| |
| err = runtime.PopulateFieldFromPath(&protoReq, "onu.pon_port_id", val) |
| |
| if err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.pon_port_id", err) |
| } |
| |
| if err := req.ParseForm(); err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| } |
| if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_ONUStatus_3); err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| } |
| |
| msg, err := client.ONUStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| return msg, metadata, err |
| |
| } |
| |
| var ( |
| filter_BBSimService_ONUActivate_0 = &utilities.DoubleArray{Encoding: map[string]int{"onus_batch": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} |
| ) |
| |
| 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) { |
| var protoReq ONURequest |
| var metadata runtime.ServerMetadata |
| |
| newReader, berr := utilities.IOReaderFactory(req.Body) |
| if berr != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) |
| } |
| if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.OnusBatch); err != nil && err != io.EOF { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| } |
| |
| if err := req.ParseForm(); err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| } |
| if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_ONUActivate_0); err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| } |
| |
| msg, err := client.ONUActivate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| return msg, metadata, err |
| |
| } |
| |
| var ( |
| 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}} |
| ) |
| |
| 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) { |
| var protoReq ONURequest |
| var metadata runtime.ServerMetadata |
| |
| var ( |
| val string |
| ok bool |
| err error |
| _ = err |
| ) |
| |
| val, ok = pathParams["onu.pon_port_id"] |
| if !ok { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.pon_port_id") |
| } |
| |
| err = runtime.PopulateFieldFromPath(&protoReq, "onu.pon_port_id", val) |
| |
| if err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.pon_port_id", err) |
| } |
| |
| if err := req.ParseForm(); err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| } |
| if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_ONUActivate_1); err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| } |
| |
| msg, err := client.ONUActivate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| return msg, metadata, err |
| |
| } |
| |
| var ( |
| 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}} |
| ) |
| |
| 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) { |
| var protoReq ONURequest |
| var metadata runtime.ServerMetadata |
| |
| var ( |
| val string |
| ok bool |
| err error |
| _ = err |
| ) |
| |
| val, ok = pathParams["onu.pon_port_id"] |
| if !ok { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.pon_port_id") |
| } |
| |
| err = runtime.PopulateFieldFromPath(&protoReq, "onu.pon_port_id", val) |
| |
| if err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.pon_port_id", err) |
| } |
| |
| val, ok = pathParams["onu.onu_serial"] |
| if !ok { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.onu_serial") |
| } |
| |
| err = runtime.PopulateFieldFromPath(&protoReq, "onu.onu_serial", val) |
| |
| if err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.onu_serial", err) |
| } |
| |
| if err := req.ParseForm(); err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| } |
| if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_ONUActivate_2); err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| } |
| |
| msg, err := client.ONUActivate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| return msg, metadata, err |
| |
| } |
| |
| var ( |
| filter_BBSimService_ONUDeactivate_0 = &utilities.DoubleArray{Encoding: map[string]int{"onus_batch": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} |
| ) |
| |
| 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) { |
| var protoReq ONURequest |
| var metadata runtime.ServerMetadata |
| |
| newReader, berr := utilities.IOReaderFactory(req.Body) |
| if berr != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) |
| } |
| if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.OnusBatch); err != nil && err != io.EOF { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| } |
| |
| if err := req.ParseForm(); err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| } |
| if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_ONUDeactivate_0); err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| } |
| |
| msg, err := client.ONUDeactivate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| return msg, metadata, err |
| |
| } |
| |
| var ( |
| 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}} |
| ) |
| |
| 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) { |
| var protoReq ONURequest |
| var metadata runtime.ServerMetadata |
| |
| var ( |
| val string |
| ok bool |
| err error |
| _ = err |
| ) |
| |
| val, ok = pathParams["onu.onu_serial"] |
| if !ok { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.onu_serial") |
| } |
| |
| err = runtime.PopulateFieldFromPath(&protoReq, "onu.onu_serial", val) |
| |
| if err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.onu_serial", err) |
| } |
| |
| if err := req.ParseForm(); err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| } |
| if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_ONUDeactivate_1); err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| } |
| |
| msg, err := client.ONUDeactivate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| return msg, metadata, err |
| |
| } |
| |
| var ( |
| 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}} |
| ) |
| |
| 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) { |
| var protoReq ONURequest |
| var metadata runtime.ServerMetadata |
| |
| var ( |
| val string |
| ok bool |
| err error |
| _ = err |
| ) |
| |
| val, ok = pathParams["onu.pon_port_id"] |
| if !ok { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.pon_port_id") |
| } |
| |
| err = runtime.PopulateFieldFromPath(&protoReq, "onu.pon_port_id", val) |
| |
| if err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.pon_port_id", err) |
| } |
| |
| if err := req.ParseForm(); err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| } |
| if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_ONUDeactivate_2); err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| } |
| |
| msg, err := client.ONUDeactivate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| return msg, metadata, err |
| |
| } |
| |
| var ( |
| 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}} |
| ) |
| |
| 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) { |
| var protoReq ONURequest |
| var metadata runtime.ServerMetadata |
| |
| var ( |
| val string |
| ok bool |
| err error |
| _ = err |
| ) |
| |
| val, ok = pathParams["onu.pon_port_id"] |
| if !ok { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.pon_port_id") |
| } |
| |
| err = runtime.PopulateFieldFromPath(&protoReq, "onu.pon_port_id", val) |
| |
| if err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.pon_port_id", err) |
| } |
| |
| val, ok = pathParams["onu.onu_id"] |
| if !ok { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu.onu_id") |
| } |
| |
| err = runtime.PopulateFieldFromPath(&protoReq, "onu.onu_id", val) |
| |
| if err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu.onu_id", err) |
| } |
| |
| if err := req.ParseForm(); err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| } |
| if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_ONUDeactivate_3); err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| } |
| |
| msg, err := client.ONUDeactivate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| return msg, metadata, err |
| |
| } |
| |
| 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) { |
| var protoReq ONUAlarmRequest |
| var metadata runtime.ServerMetadata |
| |
| var ( |
| val string |
| ok bool |
| err error |
| _ = err |
| ) |
| |
| val, ok = pathParams["onu_serial"] |
| if !ok { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu_serial") |
| } |
| |
| protoReq.OnuSerial, err = runtime.String(val) |
| |
| if err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu_serial", err) |
| } |
| |
| val, ok = pathParams["alarm_type"] |
| if !ok { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "alarm_type") |
| } |
| |
| protoReq.AlarmType, err = runtime.String(val) |
| |
| if err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "alarm_type", err) |
| } |
| |
| val, ok = pathParams["status"] |
| if !ok { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "status") |
| } |
| |
| protoReq.Status, err = runtime.String(val) |
| |
| if err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "status", err) |
| } |
| |
| msg, err := client.GenerateONUAlarm(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| return msg, metadata, err |
| |
| } |
| |
| 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) { |
| var protoReq OLTAlarmRequest |
| var metadata runtime.ServerMetadata |
| |
| var ( |
| val string |
| ok bool |
| err error |
| _ = err |
| ) |
| |
| val, ok = pathParams["port_type"] |
| if !ok { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_type") |
| } |
| |
| protoReq.PortType, err = runtime.String(val) |
| |
| if err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_type", err) |
| } |
| |
| val, ok = pathParams["port_id"] |
| if !ok { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id") |
| } |
| |
| protoReq.PortId, err = runtime.Uint32(val) |
| |
| if err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) |
| } |
| |
| val, ok = pathParams["status"] |
| if !ok { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "status") |
| } |
| |
| protoReq.Status, err = runtime.String(val) |
| |
| if err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "status", err) |
| } |
| |
| msg, err := client.GenerateOLTAlarm(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| return msg, metadata, err |
| |
| } |
| |
| var ( |
| 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}} |
| ) |
| |
| 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) { |
| var protoReq DeviceAction |
| var metadata runtime.ServerMetadata |
| |
| var ( |
| val string |
| ok bool |
| err error |
| _ = err |
| ) |
| |
| val, ok = pathParams["device_type"] |
| if !ok { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "device_type") |
| } |
| |
| protoReq.DeviceType, err = runtime.String(val) |
| |
| if err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "device_type", err) |
| } |
| |
| val, ok = pathParams["action"] |
| if !ok { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "action") |
| } |
| |
| protoReq.Action, err = runtime.String(val) |
| |
| if err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "action", err) |
| } |
| |
| if err := req.ParseForm(); err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| } |
| if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_PerformDeviceAction_0); err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| } |
| |
| msg, err := client.PerformDeviceAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| return msg, metadata, err |
| |
| } |
| |
| 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) { |
| var protoReq DeviceAction |
| var metadata runtime.ServerMetadata |
| |
| var ( |
| val string |
| ok bool |
| err error |
| _ = err |
| ) |
| |
| val, ok = pathParams["device_type"] |
| if !ok { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "device_type") |
| } |
| |
| protoReq.DeviceType, err = runtime.String(val) |
| |
| if err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "device_type", err) |
| } |
| |
| val, ok = pathParams["serial_number"] |
| if !ok { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "serial_number") |
| } |
| |
| protoReq.SerialNumber, err = runtime.String(val) |
| |
| if err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "serial_number", err) |
| } |
| |
| val, ok = pathParams["action"] |
| if !ok { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "action") |
| } |
| |
| protoReq.Action, err = runtime.String(val) |
| |
| if err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "action", err) |
| } |
| |
| msg, err := client.PerformDeviceAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| return msg, metadata, err |
| |
| } |
| |
| var ( |
| filter_BBSimService_GetFlows_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} |
| ) |
| |
| 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) { |
| var protoReq ONUInfo |
| var metadata runtime.ServerMetadata |
| |
| if err := req.ParseForm(); err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| } |
| if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_GetFlows_0); err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| } |
| |
| msg, err := client.GetFlows(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| return msg, metadata, err |
| |
| } |
| |
| var ( |
| filter_BBSimService_GetFlows_1 = &utilities.DoubleArray{Encoding: map[string]int{"onu_serial": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} |
| ) |
| |
| 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) { |
| var protoReq ONUInfo |
| var metadata runtime.ServerMetadata |
| |
| var ( |
| val string |
| ok bool |
| err error |
| _ = err |
| ) |
| |
| val, ok = pathParams["onu_serial"] |
| if !ok { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "onu_serial") |
| } |
| |
| protoReq.OnuSerial, err = runtime.String(val) |
| |
| if err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "onu_serial", err) |
| } |
| |
| if err := req.ParseForm(); err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| } |
| if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_BBSimService_GetFlows_1); err != nil { |
| return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
| } |
| |
| msg, err := client.GetFlows(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
| return msg, metadata, err |
| |
| } |
| |
| // RegisterBBSimServiceHandlerFromEndpoint is same as RegisterBBSimServiceHandler but |
| // automatically dials to "endpoint" and closes the connection when "ctx" gets done. |
| func RegisterBBSimServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { |
| conn, err := grpc.Dial(endpoint, opts...) |
| if err != nil { |
| return err |
| } |
| defer func() { |
| if err != nil { |
| if cerr := conn.Close(); cerr != nil { |
| grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) |
| } |
| return |
| } |
| go func() { |
| <-ctx.Done() |
| if cerr := conn.Close(); cerr != nil { |
| grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) |
| } |
| }() |
| }() |
| |
| return RegisterBBSimServiceHandler(ctx, mux, conn) |
| } |
| |
| // RegisterBBSimServiceHandler registers the http handlers for service BBSimService to "mux". |
| // The handlers forward requests to the grpc endpoint over "conn". |
| func RegisterBBSimServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { |
| return RegisterBBSimServiceHandlerClient(ctx, mux, NewBBSimServiceClient(conn)) |
| } |
| |
| // RegisterBBSimServiceHandlerClient registers the http handlers for service BBSimService |
| // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BBSimServiceClient". |
| // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BBSimServiceClient" |
| // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in |
| // "BBSimServiceClient" to call the correct interceptors. |
| func RegisterBBSimServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BBSimServiceClient) error { |
| |
| mux.Handle("GET", pattern_BBSimService_OLTStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| ctx, cancel := context.WithCancel(req.Context()) |
| defer cancel() |
| inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| resp, md, err := request_BBSimService_OLTStatus_0(rctx, inboundMarshaler, client, req, pathParams) |
| ctx = runtime.NewServerMetadataContext(ctx, md) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| |
| forward_BBSimService_OLTStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| |
| }) |
| |
| mux.Handle("GET", pattern_BBSimService_OLTStatus_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| ctx, cancel := context.WithCancel(req.Context()) |
| defer cancel() |
| inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| resp, md, err := request_BBSimService_OLTStatus_1(rctx, inboundMarshaler, client, req, pathParams) |
| ctx = runtime.NewServerMetadataContext(ctx, md) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| |
| forward_BBSimService_OLTStatus_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| |
| }) |
| |
| mux.Handle("GET", pattern_BBSimService_PortStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| ctx, cancel := context.WithCancel(req.Context()) |
| defer cancel() |
| inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| resp, md, err := request_BBSimService_PortStatus_0(rctx, inboundMarshaler, client, req, pathParams) |
| ctx = runtime.NewServerMetadataContext(ctx, md) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| |
| forward_BBSimService_PortStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| |
| }) |
| |
| mux.Handle("GET", pattern_BBSimService_ONUStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| ctx, cancel := context.WithCancel(req.Context()) |
| defer cancel() |
| inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| resp, md, err := request_BBSimService_ONUStatus_0(rctx, inboundMarshaler, client, req, pathParams) |
| ctx = runtime.NewServerMetadataContext(ctx, md) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| |
| forward_BBSimService_ONUStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| |
| }) |
| |
| mux.Handle("GET", pattern_BBSimService_ONUStatus_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| ctx, cancel := context.WithCancel(req.Context()) |
| defer cancel() |
| inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| resp, md, err := request_BBSimService_ONUStatus_1(rctx, inboundMarshaler, client, req, pathParams) |
| ctx = runtime.NewServerMetadataContext(ctx, md) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| |
| forward_BBSimService_ONUStatus_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| |
| }) |
| |
| mux.Handle("GET", pattern_BBSimService_ONUStatus_2, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| ctx, cancel := context.WithCancel(req.Context()) |
| defer cancel() |
| inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| resp, md, err := request_BBSimService_ONUStatus_2(rctx, inboundMarshaler, client, req, pathParams) |
| ctx = runtime.NewServerMetadataContext(ctx, md) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| |
| forward_BBSimService_ONUStatus_2(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| |
| }) |
| |
| mux.Handle("GET", pattern_BBSimService_ONUStatus_3, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| ctx, cancel := context.WithCancel(req.Context()) |
| defer cancel() |
| inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| resp, md, err := request_BBSimService_ONUStatus_3(rctx, inboundMarshaler, client, req, pathParams) |
| ctx = runtime.NewServerMetadataContext(ctx, md) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| |
| forward_BBSimService_ONUStatus_3(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| |
| }) |
| |
| mux.Handle("POST", pattern_BBSimService_ONUActivate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| ctx, cancel := context.WithCancel(req.Context()) |
| defer cancel() |
| inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| resp, md, err := request_BBSimService_ONUActivate_0(rctx, inboundMarshaler, client, req, pathParams) |
| ctx = runtime.NewServerMetadataContext(ctx, md) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| |
| forward_BBSimService_ONUActivate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| |
| }) |
| |
| mux.Handle("POST", pattern_BBSimService_ONUActivate_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| ctx, cancel := context.WithCancel(req.Context()) |
| defer cancel() |
| inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| resp, md, err := request_BBSimService_ONUActivate_1(rctx, inboundMarshaler, client, req, pathParams) |
| ctx = runtime.NewServerMetadataContext(ctx, md) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| |
| forward_BBSimService_ONUActivate_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| |
| }) |
| |
| mux.Handle("POST", pattern_BBSimService_ONUActivate_2, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| ctx, cancel := context.WithCancel(req.Context()) |
| defer cancel() |
| inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| resp, md, err := request_BBSimService_ONUActivate_2(rctx, inboundMarshaler, client, req, pathParams) |
| ctx = runtime.NewServerMetadataContext(ctx, md) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| |
| forward_BBSimService_ONUActivate_2(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| |
| }) |
| |
| mux.Handle("DELETE", pattern_BBSimService_ONUDeactivate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| ctx, cancel := context.WithCancel(req.Context()) |
| defer cancel() |
| inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| resp, md, err := request_BBSimService_ONUDeactivate_0(rctx, inboundMarshaler, client, req, pathParams) |
| ctx = runtime.NewServerMetadataContext(ctx, md) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| |
| forward_BBSimService_ONUDeactivate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| |
| }) |
| |
| mux.Handle("DELETE", pattern_BBSimService_ONUDeactivate_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| ctx, cancel := context.WithCancel(req.Context()) |
| defer cancel() |
| inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| resp, md, err := request_BBSimService_ONUDeactivate_1(rctx, inboundMarshaler, client, req, pathParams) |
| ctx = runtime.NewServerMetadataContext(ctx, md) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| |
| forward_BBSimService_ONUDeactivate_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| |
| }) |
| |
| mux.Handle("DELETE", pattern_BBSimService_ONUDeactivate_2, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| ctx, cancel := context.WithCancel(req.Context()) |
| defer cancel() |
| inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| resp, md, err := request_BBSimService_ONUDeactivate_2(rctx, inboundMarshaler, client, req, pathParams) |
| ctx = runtime.NewServerMetadataContext(ctx, md) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| |
| forward_BBSimService_ONUDeactivate_2(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| |
| }) |
| |
| mux.Handle("DELETE", pattern_BBSimService_ONUDeactivate_3, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| ctx, cancel := context.WithCancel(req.Context()) |
| defer cancel() |
| inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| resp, md, err := request_BBSimService_ONUDeactivate_3(rctx, inboundMarshaler, client, req, pathParams) |
| ctx = runtime.NewServerMetadataContext(ctx, md) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| |
| forward_BBSimService_ONUDeactivate_3(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| |
| }) |
| |
| mux.Handle("POST", pattern_BBSimService_GenerateONUAlarm_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| ctx, cancel := context.WithCancel(req.Context()) |
| defer cancel() |
| inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| resp, md, err := request_BBSimService_GenerateONUAlarm_0(rctx, inboundMarshaler, client, req, pathParams) |
| ctx = runtime.NewServerMetadataContext(ctx, md) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| |
| forward_BBSimService_GenerateONUAlarm_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| |
| }) |
| |
| mux.Handle("POST", pattern_BBSimService_GenerateOLTAlarm_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| ctx, cancel := context.WithCancel(req.Context()) |
| defer cancel() |
| inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| resp, md, err := request_BBSimService_GenerateOLTAlarm_0(rctx, inboundMarshaler, client, req, pathParams) |
| ctx = runtime.NewServerMetadataContext(ctx, md) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| |
| forward_BBSimService_GenerateOLTAlarm_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| |
| }) |
| |
| mux.Handle("PATCH", pattern_BBSimService_PerformDeviceAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| ctx, cancel := context.WithCancel(req.Context()) |
| defer cancel() |
| inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| resp, md, err := request_BBSimService_PerformDeviceAction_0(rctx, inboundMarshaler, client, req, pathParams) |
| ctx = runtime.NewServerMetadataContext(ctx, md) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| |
| forward_BBSimService_PerformDeviceAction_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| |
| }) |
| |
| mux.Handle("PATCH", pattern_BBSimService_PerformDeviceAction_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| ctx, cancel := context.WithCancel(req.Context()) |
| defer cancel() |
| inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| resp, md, err := request_BBSimService_PerformDeviceAction_1(rctx, inboundMarshaler, client, req, pathParams) |
| ctx = runtime.NewServerMetadataContext(ctx, md) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| |
| forward_BBSimService_PerformDeviceAction_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| |
| }) |
| |
| mux.Handle("GET", pattern_BBSimService_GetFlows_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| ctx, cancel := context.WithCancel(req.Context()) |
| defer cancel() |
| inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| resp, md, err := request_BBSimService_GetFlows_0(rctx, inboundMarshaler, client, req, pathParams) |
| ctx = runtime.NewServerMetadataContext(ctx, md) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| |
| forward_BBSimService_GetFlows_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| |
| }) |
| |
| mux.Handle("GET", pattern_BBSimService_GetFlows_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
| ctx, cancel := context.WithCancel(req.Context()) |
| defer cancel() |
| inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
| rctx, err := runtime.AnnotateContext(ctx, mux, req) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| resp, md, err := request_BBSimService_GetFlows_1(rctx, inboundMarshaler, client, req, pathParams) |
| ctx = runtime.NewServerMetadataContext(ctx, md) |
| if err != nil { |
| runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
| return |
| } |
| |
| forward_BBSimService_GetFlows_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
| |
| }) |
| |
| return nil |
| } |
| |
| var ( |
| pattern_BBSimService_OLTStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v0", "olt"}, "", runtime.AssumeColonVerbOpt(true))) |
| |
| pattern_BBSimService_OLTStatus_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v0", "olt", "status"}, "", runtime.AssumeColonVerbOpt(true))) |
| |
| 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))) |
| |
| pattern_BBSimService_ONUStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v0", "olt", "onus"}, "", runtime.AssumeColonVerbOpt(true))) |
| |
| 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))) |
| |
| 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))) |
| |
| 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))) |
| |
| pattern_BBSimService_ONUActivate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v0", "olt", "onus"}, "", runtime.AssumeColonVerbOpt(true))) |
| |
| 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))) |
| |
| 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))) |
| |
| pattern_BBSimService_ONUDeactivate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v0", "olt", "onus"}, "", runtime.AssumeColonVerbOpt(true))) |
| |
| 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))) |
| |
| 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))) |
| |
| 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))) |
| |
| 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))) |
| |
| 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))) |
| |
| 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))) |
| |
| 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))) |
| |
| pattern_BBSimService_GetFlows_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v0", "olt", "flows"}, "", runtime.AssumeColonVerbOpt(true))) |
| |
| 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))) |
| ) |
| |
| var ( |
| forward_BBSimService_OLTStatus_0 = runtime.ForwardResponseMessage |
| |
| forward_BBSimService_OLTStatus_1 = runtime.ForwardResponseMessage |
| |
| forward_BBSimService_PortStatus_0 = runtime.ForwardResponseMessage |
| |
| forward_BBSimService_ONUStatus_0 = runtime.ForwardResponseMessage |
| |
| forward_BBSimService_ONUStatus_1 = runtime.ForwardResponseMessage |
| |
| forward_BBSimService_ONUStatus_2 = runtime.ForwardResponseMessage |
| |
| forward_BBSimService_ONUStatus_3 = runtime.ForwardResponseMessage |
| |
| forward_BBSimService_ONUActivate_0 = runtime.ForwardResponseMessage |
| |
| forward_BBSimService_ONUActivate_1 = runtime.ForwardResponseMessage |
| |
| forward_BBSimService_ONUActivate_2 = runtime.ForwardResponseMessage |
| |
| forward_BBSimService_ONUDeactivate_0 = runtime.ForwardResponseMessage |
| |
| forward_BBSimService_ONUDeactivate_1 = runtime.ForwardResponseMessage |
| |
| forward_BBSimService_ONUDeactivate_2 = runtime.ForwardResponseMessage |
| |
| forward_BBSimService_ONUDeactivate_3 = runtime.ForwardResponseMessage |
| |
| forward_BBSimService_GenerateONUAlarm_0 = runtime.ForwardResponseMessage |
| |
| forward_BBSimService_GenerateOLTAlarm_0 = runtime.ForwardResponseMessage |
| |
| forward_BBSimService_PerformDeviceAction_0 = runtime.ForwardResponseMessage |
| |
| forward_BBSimService_PerformDeviceAction_1 = runtime.ForwardResponseMessage |
| |
| forward_BBSimService_GetFlows_0 = runtime.ForwardResponseMessage |
| |
| forward_BBSimService_GetFlows_1 = runtime.ForwardResponseMessage |
| ) |