khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 1 | // Code generated by protoc-gen-go. DO NOT EDIT. |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 2 | // source: voltha_protos/core_services.proto |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 3 | |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 4 | package core_service |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 5 | |
| 6 | import ( |
| 7 | context "context" |
| 8 | fmt "fmt" |
| 9 | proto "github.com/golang/protobuf/proto" |
| 10 | empty "github.com/golang/protobuf/ptypes/empty" |
| 11 | common "github.com/opencord/voltha-protos/v5/go/common" |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 12 | core_adapter "github.com/opencord/voltha-protos/v5/go/core_adapter" |
| 13 | health "github.com/opencord/voltha-protos/v5/go/health" |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 14 | voltha "github.com/opencord/voltha-protos/v5/go/voltha" |
| 15 | grpc "google.golang.org/grpc" |
| 16 | codes "google.golang.org/grpc/codes" |
| 17 | status "google.golang.org/grpc/status" |
| 18 | math "math" |
| 19 | ) |
| 20 | |
| 21 | // Reference imports to suppress errors if they are not otherwise used. |
| 22 | var _ = proto.Marshal |
| 23 | var _ = fmt.Errorf |
| 24 | var _ = math.Inf |
| 25 | |
| 26 | // This is a compile-time assertion to ensure that this generated file |
| 27 | // is compatible with the proto package it is being compiled against. |
| 28 | // A compilation error at this line likely means your copy of the |
| 29 | // proto package needs to be updated. |
| 30 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package |
| 31 | |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 32 | func init() { proto.RegisterFile("voltha_protos/core_services.proto", fileDescriptor_979c43850713f141) } |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 33 | |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 34 | var fileDescriptor_979c43850713f141 = []byte{ |
khenaidoo | f333355 | 2021-12-15 16:52:31 -0500 | [diff] [blame^] | 35 | // 625 bytes of a gzipped FileDescriptorProto |
| 36 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcd, 0x4f, 0x14, 0x31, |
| 37 | 0x14, 0x0f, 0x17, 0xa3, 0x8f, 0x85, 0x85, 0xf2, 0xa1, 0x59, 0x82, 0xc2, 0x49, 0x0f, 0xda, 0x35, |
| 38 | 0x82, 0x98, 0x68, 0xa2, 0x59, 0x76, 0x74, 0xd9, 0x64, 0x31, 0x04, 0xa2, 0x26, 0x5e, 0x48, 0x99, |
| 39 | 0x79, 0xcc, 0x4c, 0x98, 0x6d, 0x37, 0x6d, 0x59, 0xdd, 0x3f, 0xde, 0xc4, 0xcc, 0xb4, 0xb3, 0x69, |
| 40 | 0x87, 0x6d, 0xe4, 0xe0, 0xf5, 0xbd, 0xdf, 0x47, 0xdf, 0xaf, 0x7d, 0x29, 0xec, 0x4f, 0x45, 0xa1, |
| 41 | 0x33, 0x76, 0x39, 0x91, 0x42, 0x0b, 0xd5, 0x8d, 0x85, 0xc4, 0x4b, 0x85, 0x72, 0x9a, 0xc7, 0xa8, |
| 42 | 0x68, 0x55, 0x24, 0x2d, 0xb7, 0xd8, 0xd9, 0x49, 0x85, 0x48, 0x0b, 0xec, 0x56, 0xbd, 0xab, 0xdb, |
| 43 | 0xeb, 0x2e, 0x8e, 0x27, 0x7a, 0x66, 0xa0, 0x9d, 0xbd, 0x05, 0x6a, 0x2c, 0x61, 0x13, 0x8d, 0xd2, |
| 44 | 0x22, 0x3a, 0x4d, 0xc4, 0x78, 0x2c, 0xf8, 0xe2, 0x5e, 0x82, 0xa5, 0xe1, 0xe2, 0x5e, 0x86, 0xac, |
| 45 | 0xd0, 0x99, 0xe9, 0xbd, 0xf9, 0xb3, 0x0c, 0xcb, 0x7d, 0x21, 0xf1, 0xc2, 0x1c, 0x91, 0x7c, 0x82, |
| 46 | 0xf6, 0x00, 0xf5, 0x49, 0x05, 0xb9, 0xd0, 0x4c, 0xdf, 0x2a, 0x42, 0xa8, 0x75, 0xea, 0x0b, 0xce, |
| 47 | 0x31, 0xd6, 0xb9, 0xe0, 0x9d, 0x4d, 0x6a, 0x55, 0x5c, 0xe4, 0x8b, 0xa5, 0xd7, 0x4b, 0x64, 0x04, |
| 48 | 0xed, 0x73, 0x4c, 0x73, 0xa5, 0x51, 0xf6, 0xcc, 0xe9, 0xc9, 0x3e, 0xf5, 0x86, 0xb1, 0x65, 0x83, |
| 49 | 0x92, 0xac, 0xd2, 0xdb, 0xa6, 0x26, 0x1a, 0x5a, 0x47, 0x43, 0x3f, 0x97, 0xd1, 0x90, 0x23, 0x68, |
| 50 | 0x45, 0xd5, 0x28, 0xdf, 0x26, 0x09, 0xd3, 0x48, 0x56, 0xa9, 0x9d, 0xcc, 0x54, 0x83, 0xbc, 0x03, |
| 51 | 0x58, 0x3e, 0x13, 0x52, 0xf7, 0x25, 0x32, 0x8d, 0x09, 0x69, 0xd5, 0xb4, 0xb2, 0x18, 0x24, 0x0d, |
| 52 | 0x61, 0xad, 0xec, 0xab, 0x72, 0x9a, 0xda, 0x70, 0xd7, 0x3f, 0x7b, 0xd9, 0xaf, 0xda, 0x5f, 0xf2, |
| 53 | 0x42, 0xa3, 0x0c, 0x4a, 0x1d, 0xc2, 0x6a, 0x84, 0x05, 0x6a, 0xec, 0x15, 0x45, 0xa5, 0x49, 0xa0, |
| 54 | 0x4e, 0x71, 0x18, 0x05, 0x59, 0xef, 0x60, 0x65, 0x80, 0xda, 0x8c, 0x56, 0xb2, 0xc8, 0x93, 0xbb, |
| 55 | 0xee, 0xd6, 0xd8, 0x9b, 0x88, 0xbc, 0x84, 0xf6, 0x28, 0x57, 0x0e, 0xd3, 0xf7, 0x5b, 0x71, 0xc1, |
| 56 | 0x8a, 0x8c, 0x60, 0xdd, 0x20, 0xdd, 0x41, 0x9f, 0xf9, 0x56, 0x0e, 0xe0, 0x1f, 0xa3, 0xf6, 0x60, |
| 57 | 0xd3, 0xfa, 0x9e, 0xf6, 0x05, 0xbf, 0xce, 0x53, 0x2b, 0xb8, 0x3e, 0x37, 0x1d, 0x9b, 0xba, 0x0a, |
| 58 | 0x4a, 0x44, 0xb0, 0xd1, 0xcf, 0xf2, 0x22, 0x31, 0x3a, 0x11, 0x6a, 0x8c, 0xcb, 0x5b, 0xdb, 0x5d, |
| 59 | 0x74, 0xa4, 0x28, 0x57, 0xb1, 0x98, 0xa2, 0x9c, 0x75, 0x1a, 0x6f, 0x81, 0x1c, 0xc1, 0x9a, 0xa3, |
| 60 | 0xa2, 0x46, 0x42, 0xe9, 0x7b, 0xa5, 0xfe, 0x1e, 0x36, 0x5d, 0xde, 0xdc, 0xfe, 0x3e, 0xdc, 0xe7, |
| 61 | 0xf0, 0x68, 0x7e, 0x63, 0x1e, 0xa1, 0x79, 0xb8, 0x1e, 0xac, 0x0e, 0x50, 0x3b, 0x3e, 0xcd, 0xc0, |
| 62 | 0x9d, 0x96, 0x0d, 0xbc, 0x29, 0x41, 0xab, 0xd5, 0x74, 0x8f, 0xea, 0x39, 0xb6, 0x7d, 0xb8, 0x22, |
| 63 | 0x1f, 0xa1, 0x75, 0x81, 0x3c, 0x39, 0x63, 0xf1, 0x0d, 0xea, 0x21, 0x27, 0xdb, 0x8d, 0xc7, 0x64, |
| 64 | 0xeb, 0xc1, 0xd9, 0x4e, 0x80, 0x18, 0xa9, 0x73, 0x64, 0x4a, 0x70, 0x7b, 0xad, 0x9d, 0x45, 0x97, |
| 65 | 0x62, 0x10, 0x41, 0xa5, 0x63, 0x68, 0xcf, 0x17, 0xc7, 0xca, 0x3c, 0x0e, 0xec, 0x55, 0x50, 0xe3, |
| 66 | 0x03, 0x6c, 0x9d, 0x63, 0x2c, 0x78, 0x9c, 0x17, 0x18, 0xcc, 0x20, 0x44, 0x3e, 0x85, 0xa7, 0x7e, |
| 67 | 0x74, 0x3f, 0x72, 0x9d, 0x9d, 0x49, 0xf1, 0x7b, 0xd6, 0x4b, 0x12, 0x89, 0x4a, 0x91, 0x1d, 0x3f, |
| 68 | 0x3d, 0xea, 0x36, 0xef, 0xdc, 0xc4, 0x01, 0x3c, 0x1c, 0xa0, 0x36, 0xcb, 0x14, 0x5e, 0xd1, 0xc6, |
| 69 | 0xd6, 0x7d, 0xb5, 0x8f, 0x5c, 0x22, 0xff, 0x2f, 0x7b, 0x17, 0xc1, 0x86, 0x91, 0x18, 0x8e, 0x59, |
| 70 | 0x8a, 0x91, 0xf8, 0xc5, 0x0b, 0xc1, 0x12, 0xb2, 0x55, 0xbb, 0x7a, 0xe5, 0x90, 0xca, 0xf1, 0x0d, |
| 71 | 0xec, 0x09, 0x99, 0x52, 0x31, 0x41, 0x1e, 0x0b, 0x99, 0x50, 0xf3, 0x55, 0x50, 0xf7, 0xdb, 0x3a, |
| 72 | 0x5e, 0xff, 0x5e, 0x15, 0x9d, 0x6f, 0xe2, 0xe7, 0x61, 0x9a, 0xeb, 0xec, 0xf6, 0xaa, 0x8c, 0xbe, |
| 73 | 0x5b, 0x73, 0xbb, 0x86, 0xfb, 0xca, 0x7e, 0x33, 0xd3, 0xb7, 0xdd, 0x54, 0x78, 0x9f, 0xe2, 0xd5, |
| 74 | 0x83, 0xaa, 0x75, 0xf0, 0x37, 0x00, 0x00, 0xff, 0xff, 0x7f, 0x44, 0xa5, 0x7d, 0x39, 0x07, 0x00, |
| 75 | 0x00, |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 76 | } |
| 77 | |
| 78 | // Reference imports to suppress errors if they are not otherwise used. |
| 79 | var _ context.Context |
| 80 | var _ grpc.ClientConn |
| 81 | |
| 82 | // This is a compile-time assertion to ensure that this generated file |
| 83 | // is compatible with the grpc package it is being compiled against. |
| 84 | const _ = grpc.SupportPackageIsVersion4 |
| 85 | |
| 86 | // CoreServiceClient is the client API for CoreService service. |
| 87 | // |
| 88 | // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. |
| 89 | type CoreServiceClient interface { |
khenaidoo | f333355 | 2021-12-15 16:52:31 -0500 | [diff] [blame^] | 90 | // GetHealthStatus is used by a CoreService client to verify connectivity |
| 91 | // to the gRPC server hosting the CoreService service |
| 92 | GetHealthStatus(ctx context.Context, opts ...grpc.CallOption) (CoreService_GetHealthStatusClient, error) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 93 | RegisterAdapter(ctx context.Context, in *core_adapter.AdapterRegistration, opts ...grpc.CallOption) (*empty.Empty, error) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 94 | DeviceUpdate(ctx context.Context, in *voltha.Device, opts ...grpc.CallOption) (*empty.Empty, error) |
| 95 | PortCreated(ctx context.Context, in *voltha.Port, opts ...grpc.CallOption) (*empty.Empty, error) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 96 | PortsStateUpdate(ctx context.Context, in *core_adapter.PortStateFilter, opts ...grpc.CallOption) (*empty.Empty, error) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 97 | DeleteAllPorts(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*empty.Empty, error) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 98 | GetDevicePort(ctx context.Context, in *core_adapter.PortFilter, opts ...grpc.CallOption) (*voltha.Port, error) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 99 | ListDevicePorts(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*voltha.Ports, error) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 100 | DeviceStateUpdate(ctx context.Context, in *core_adapter.DeviceStateFilter, opts ...grpc.CallOption) (*empty.Empty, error) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 101 | DevicePMConfigUpdate(ctx context.Context, in *voltha.PmConfigs, opts ...grpc.CallOption) (*empty.Empty, error) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 102 | ChildDeviceDetected(ctx context.Context, in *core_adapter.DeviceDiscovery, opts ...grpc.CallOption) (*voltha.Device, error) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 103 | ChildDevicesLost(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*empty.Empty, error) |
| 104 | ChildDevicesDetected(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*empty.Empty, error) |
| 105 | GetDevice(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*voltha.Device, error) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 106 | GetChildDevice(ctx context.Context, in *core_adapter.ChildDeviceFilter, opts ...grpc.CallOption) (*voltha.Device, error) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 107 | GetChildDevices(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*voltha.Devices, error) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 108 | SendPacketIn(ctx context.Context, in *core_adapter.PacketIn, opts ...grpc.CallOption) (*empty.Empty, error) |
| 109 | DeviceReasonUpdate(ctx context.Context, in *core_adapter.DeviceReason, opts ...grpc.CallOption) (*empty.Empty, error) |
| 110 | PortStateUpdate(ctx context.Context, in *core_adapter.PortState, opts ...grpc.CallOption) (*empty.Empty, error) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 111 | // Additional API found in the Core - unused? |
| 112 | ReconcileChildDevices(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*empty.Empty, error) |
| 113 | GetChildDeviceWithProxyAddress(ctx context.Context, in *voltha.Device_ProxyAddress, opts ...grpc.CallOption) (*voltha.Device, error) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 114 | GetPorts(ctx context.Context, in *core_adapter.PortFilter, opts ...grpc.CallOption) (*voltha.Ports, error) |
| 115 | ChildrenStateUpdate(ctx context.Context, in *core_adapter.DeviceStateFilter, opts ...grpc.CallOption) (*empty.Empty, error) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 116 | UpdateImageDownload(ctx context.Context, in *voltha.ImageDownload, opts ...grpc.CallOption) (*empty.Empty, error) |
| 117 | } |
| 118 | |
| 119 | type coreServiceClient struct { |
| 120 | cc *grpc.ClientConn |
| 121 | } |
| 122 | |
| 123 | func NewCoreServiceClient(cc *grpc.ClientConn) CoreServiceClient { |
| 124 | return &coreServiceClient{cc} |
| 125 | } |
| 126 | |
khenaidoo | f333355 | 2021-12-15 16:52:31 -0500 | [diff] [blame^] | 127 | func (c *coreServiceClient) GetHealthStatus(ctx context.Context, opts ...grpc.CallOption) (CoreService_GetHealthStatusClient, error) { |
| 128 | stream, err := c.cc.NewStream(ctx, &_CoreService_serviceDesc.Streams[0], "/core_service.CoreService/GetHealthStatus", opts...) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 129 | if err != nil { |
| 130 | return nil, err |
| 131 | } |
khenaidoo | f333355 | 2021-12-15 16:52:31 -0500 | [diff] [blame^] | 132 | x := &coreServiceGetHealthStatusClient{stream} |
| 133 | return x, nil |
| 134 | } |
| 135 | |
| 136 | type CoreService_GetHealthStatusClient interface { |
| 137 | Send(*common.Connection) error |
| 138 | Recv() (*health.HealthStatus, error) |
| 139 | grpc.ClientStream |
| 140 | } |
| 141 | |
| 142 | type coreServiceGetHealthStatusClient struct { |
| 143 | grpc.ClientStream |
| 144 | } |
| 145 | |
| 146 | func (x *coreServiceGetHealthStatusClient) Send(m *common.Connection) error { |
| 147 | return x.ClientStream.SendMsg(m) |
| 148 | } |
| 149 | |
| 150 | func (x *coreServiceGetHealthStatusClient) Recv() (*health.HealthStatus, error) { |
| 151 | m := new(health.HealthStatus) |
| 152 | if err := x.ClientStream.RecvMsg(m); err != nil { |
| 153 | return nil, err |
| 154 | } |
| 155 | return m, nil |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 156 | } |
| 157 | |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 158 | func (c *coreServiceClient) RegisterAdapter(ctx context.Context, in *core_adapter.AdapterRegistration, opts ...grpc.CallOption) (*empty.Empty, error) { |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 159 | out := new(empty.Empty) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 160 | err := c.cc.Invoke(ctx, "/core_service.CoreService/RegisterAdapter", in, out, opts...) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 161 | if err != nil { |
| 162 | return nil, err |
| 163 | } |
| 164 | return out, nil |
| 165 | } |
| 166 | |
| 167 | func (c *coreServiceClient) DeviceUpdate(ctx context.Context, in *voltha.Device, opts ...grpc.CallOption) (*empty.Empty, error) { |
| 168 | out := new(empty.Empty) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 169 | err := c.cc.Invoke(ctx, "/core_service.CoreService/DeviceUpdate", in, out, opts...) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 170 | if err != nil { |
| 171 | return nil, err |
| 172 | } |
| 173 | return out, nil |
| 174 | } |
| 175 | |
| 176 | func (c *coreServiceClient) PortCreated(ctx context.Context, in *voltha.Port, opts ...grpc.CallOption) (*empty.Empty, error) { |
| 177 | out := new(empty.Empty) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 178 | err := c.cc.Invoke(ctx, "/core_service.CoreService/PortCreated", in, out, opts...) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 179 | if err != nil { |
| 180 | return nil, err |
| 181 | } |
| 182 | return out, nil |
| 183 | } |
| 184 | |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 185 | func (c *coreServiceClient) PortsStateUpdate(ctx context.Context, in *core_adapter.PortStateFilter, opts ...grpc.CallOption) (*empty.Empty, error) { |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 186 | out := new(empty.Empty) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 187 | err := c.cc.Invoke(ctx, "/core_service.CoreService/PortsStateUpdate", in, out, opts...) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 188 | if err != nil { |
| 189 | return nil, err |
| 190 | } |
| 191 | return out, nil |
| 192 | } |
| 193 | |
| 194 | func (c *coreServiceClient) DeleteAllPorts(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*empty.Empty, error) { |
| 195 | out := new(empty.Empty) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 196 | err := c.cc.Invoke(ctx, "/core_service.CoreService/DeleteAllPorts", in, out, opts...) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 197 | if err != nil { |
| 198 | return nil, err |
| 199 | } |
| 200 | return out, nil |
| 201 | } |
| 202 | |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 203 | func (c *coreServiceClient) GetDevicePort(ctx context.Context, in *core_adapter.PortFilter, opts ...grpc.CallOption) (*voltha.Port, error) { |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 204 | out := new(voltha.Port) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 205 | err := c.cc.Invoke(ctx, "/core_service.CoreService/GetDevicePort", in, out, opts...) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 206 | if err != nil { |
| 207 | return nil, err |
| 208 | } |
| 209 | return out, nil |
| 210 | } |
| 211 | |
| 212 | func (c *coreServiceClient) ListDevicePorts(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*voltha.Ports, error) { |
| 213 | out := new(voltha.Ports) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 214 | err := c.cc.Invoke(ctx, "/core_service.CoreService/ListDevicePorts", in, out, opts...) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 215 | if err != nil { |
| 216 | return nil, err |
| 217 | } |
| 218 | return out, nil |
| 219 | } |
| 220 | |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 221 | func (c *coreServiceClient) DeviceStateUpdate(ctx context.Context, in *core_adapter.DeviceStateFilter, opts ...grpc.CallOption) (*empty.Empty, error) { |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 222 | out := new(empty.Empty) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 223 | err := c.cc.Invoke(ctx, "/core_service.CoreService/DeviceStateUpdate", in, out, opts...) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 224 | if err != nil { |
| 225 | return nil, err |
| 226 | } |
| 227 | return out, nil |
| 228 | } |
| 229 | |
| 230 | func (c *coreServiceClient) DevicePMConfigUpdate(ctx context.Context, in *voltha.PmConfigs, opts ...grpc.CallOption) (*empty.Empty, error) { |
| 231 | out := new(empty.Empty) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 232 | err := c.cc.Invoke(ctx, "/core_service.CoreService/DevicePMConfigUpdate", in, out, opts...) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 233 | if err != nil { |
| 234 | return nil, err |
| 235 | } |
| 236 | return out, nil |
| 237 | } |
| 238 | |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 239 | func (c *coreServiceClient) ChildDeviceDetected(ctx context.Context, in *core_adapter.DeviceDiscovery, opts ...grpc.CallOption) (*voltha.Device, error) { |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 240 | out := new(voltha.Device) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 241 | err := c.cc.Invoke(ctx, "/core_service.CoreService/ChildDeviceDetected", in, out, opts...) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 242 | if err != nil { |
| 243 | return nil, err |
| 244 | } |
| 245 | return out, nil |
| 246 | } |
| 247 | |
| 248 | func (c *coreServiceClient) ChildDevicesLost(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*empty.Empty, error) { |
| 249 | out := new(empty.Empty) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 250 | err := c.cc.Invoke(ctx, "/core_service.CoreService/ChildDevicesLost", in, out, opts...) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 251 | if err != nil { |
| 252 | return nil, err |
| 253 | } |
| 254 | return out, nil |
| 255 | } |
| 256 | |
| 257 | func (c *coreServiceClient) ChildDevicesDetected(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*empty.Empty, error) { |
| 258 | out := new(empty.Empty) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 259 | err := c.cc.Invoke(ctx, "/core_service.CoreService/ChildDevicesDetected", in, out, opts...) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 260 | if err != nil { |
| 261 | return nil, err |
| 262 | } |
| 263 | return out, nil |
| 264 | } |
| 265 | |
| 266 | func (c *coreServiceClient) GetDevice(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*voltha.Device, error) { |
| 267 | out := new(voltha.Device) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 268 | err := c.cc.Invoke(ctx, "/core_service.CoreService/GetDevice", in, out, opts...) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 269 | if err != nil { |
| 270 | return nil, err |
| 271 | } |
| 272 | return out, nil |
| 273 | } |
| 274 | |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 275 | func (c *coreServiceClient) GetChildDevice(ctx context.Context, in *core_adapter.ChildDeviceFilter, opts ...grpc.CallOption) (*voltha.Device, error) { |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 276 | out := new(voltha.Device) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 277 | err := c.cc.Invoke(ctx, "/core_service.CoreService/GetChildDevice", in, out, opts...) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 278 | if err != nil { |
| 279 | return nil, err |
| 280 | } |
| 281 | return out, nil |
| 282 | } |
| 283 | |
| 284 | func (c *coreServiceClient) GetChildDevices(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*voltha.Devices, error) { |
| 285 | out := new(voltha.Devices) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 286 | err := c.cc.Invoke(ctx, "/core_service.CoreService/GetChildDevices", in, out, opts...) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 287 | if err != nil { |
| 288 | return nil, err |
| 289 | } |
| 290 | return out, nil |
| 291 | } |
| 292 | |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 293 | func (c *coreServiceClient) SendPacketIn(ctx context.Context, in *core_adapter.PacketIn, opts ...grpc.CallOption) (*empty.Empty, error) { |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 294 | out := new(empty.Empty) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 295 | err := c.cc.Invoke(ctx, "/core_service.CoreService/SendPacketIn", in, out, opts...) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 296 | if err != nil { |
| 297 | return nil, err |
| 298 | } |
| 299 | return out, nil |
| 300 | } |
| 301 | |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 302 | func (c *coreServiceClient) DeviceReasonUpdate(ctx context.Context, in *core_adapter.DeviceReason, opts ...grpc.CallOption) (*empty.Empty, error) { |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 303 | out := new(empty.Empty) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 304 | err := c.cc.Invoke(ctx, "/core_service.CoreService/DeviceReasonUpdate", in, out, opts...) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 305 | if err != nil { |
| 306 | return nil, err |
| 307 | } |
| 308 | return out, nil |
| 309 | } |
| 310 | |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 311 | func (c *coreServiceClient) PortStateUpdate(ctx context.Context, in *core_adapter.PortState, opts ...grpc.CallOption) (*empty.Empty, error) { |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 312 | out := new(empty.Empty) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 313 | err := c.cc.Invoke(ctx, "/core_service.CoreService/PortStateUpdate", in, out, opts...) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 314 | if err != nil { |
| 315 | return nil, err |
| 316 | } |
| 317 | return out, nil |
| 318 | } |
| 319 | |
| 320 | func (c *coreServiceClient) ReconcileChildDevices(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*empty.Empty, error) { |
| 321 | out := new(empty.Empty) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 322 | err := c.cc.Invoke(ctx, "/core_service.CoreService/ReconcileChildDevices", in, out, opts...) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 323 | if err != nil { |
| 324 | return nil, err |
| 325 | } |
| 326 | return out, nil |
| 327 | } |
| 328 | |
| 329 | func (c *coreServiceClient) GetChildDeviceWithProxyAddress(ctx context.Context, in *voltha.Device_ProxyAddress, opts ...grpc.CallOption) (*voltha.Device, error) { |
| 330 | out := new(voltha.Device) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 331 | err := c.cc.Invoke(ctx, "/core_service.CoreService/GetChildDeviceWithProxyAddress", in, out, opts...) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 332 | if err != nil { |
| 333 | return nil, err |
| 334 | } |
| 335 | return out, nil |
| 336 | } |
| 337 | |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 338 | func (c *coreServiceClient) GetPorts(ctx context.Context, in *core_adapter.PortFilter, opts ...grpc.CallOption) (*voltha.Ports, error) { |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 339 | out := new(voltha.Ports) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 340 | err := c.cc.Invoke(ctx, "/core_service.CoreService/GetPorts", in, out, opts...) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 341 | if err != nil { |
| 342 | return nil, err |
| 343 | } |
| 344 | return out, nil |
| 345 | } |
| 346 | |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 347 | func (c *coreServiceClient) ChildrenStateUpdate(ctx context.Context, in *core_adapter.DeviceStateFilter, opts ...grpc.CallOption) (*empty.Empty, error) { |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 348 | out := new(empty.Empty) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 349 | err := c.cc.Invoke(ctx, "/core_service.CoreService/ChildrenStateUpdate", in, out, opts...) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 350 | if err != nil { |
| 351 | return nil, err |
| 352 | } |
| 353 | return out, nil |
| 354 | } |
| 355 | |
| 356 | func (c *coreServiceClient) UpdateImageDownload(ctx context.Context, in *voltha.ImageDownload, opts ...grpc.CallOption) (*empty.Empty, error) { |
| 357 | out := new(empty.Empty) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 358 | err := c.cc.Invoke(ctx, "/core_service.CoreService/UpdateImageDownload", in, out, opts...) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 359 | if err != nil { |
| 360 | return nil, err |
| 361 | } |
| 362 | return out, nil |
| 363 | } |
| 364 | |
| 365 | // CoreServiceServer is the server API for CoreService service. |
| 366 | type CoreServiceServer interface { |
khenaidoo | f333355 | 2021-12-15 16:52:31 -0500 | [diff] [blame^] | 367 | // GetHealthStatus is used by a CoreService client to verify connectivity |
| 368 | // to the gRPC server hosting the CoreService service |
| 369 | GetHealthStatus(CoreService_GetHealthStatusServer) error |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 370 | RegisterAdapter(context.Context, *core_adapter.AdapterRegistration) (*empty.Empty, error) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 371 | DeviceUpdate(context.Context, *voltha.Device) (*empty.Empty, error) |
| 372 | PortCreated(context.Context, *voltha.Port) (*empty.Empty, error) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 373 | PortsStateUpdate(context.Context, *core_adapter.PortStateFilter) (*empty.Empty, error) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 374 | DeleteAllPorts(context.Context, *common.ID) (*empty.Empty, error) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 375 | GetDevicePort(context.Context, *core_adapter.PortFilter) (*voltha.Port, error) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 376 | ListDevicePorts(context.Context, *common.ID) (*voltha.Ports, error) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 377 | DeviceStateUpdate(context.Context, *core_adapter.DeviceStateFilter) (*empty.Empty, error) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 378 | DevicePMConfigUpdate(context.Context, *voltha.PmConfigs) (*empty.Empty, error) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 379 | ChildDeviceDetected(context.Context, *core_adapter.DeviceDiscovery) (*voltha.Device, error) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 380 | ChildDevicesLost(context.Context, *common.ID) (*empty.Empty, error) |
| 381 | ChildDevicesDetected(context.Context, *common.ID) (*empty.Empty, error) |
| 382 | GetDevice(context.Context, *common.ID) (*voltha.Device, error) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 383 | GetChildDevice(context.Context, *core_adapter.ChildDeviceFilter) (*voltha.Device, error) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 384 | GetChildDevices(context.Context, *common.ID) (*voltha.Devices, error) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 385 | SendPacketIn(context.Context, *core_adapter.PacketIn) (*empty.Empty, error) |
| 386 | DeviceReasonUpdate(context.Context, *core_adapter.DeviceReason) (*empty.Empty, error) |
| 387 | PortStateUpdate(context.Context, *core_adapter.PortState) (*empty.Empty, error) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 388 | // Additional API found in the Core - unused? |
| 389 | ReconcileChildDevices(context.Context, *common.ID) (*empty.Empty, error) |
| 390 | GetChildDeviceWithProxyAddress(context.Context, *voltha.Device_ProxyAddress) (*voltha.Device, error) |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 391 | GetPorts(context.Context, *core_adapter.PortFilter) (*voltha.Ports, error) |
| 392 | ChildrenStateUpdate(context.Context, *core_adapter.DeviceStateFilter) (*empty.Empty, error) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 393 | UpdateImageDownload(context.Context, *voltha.ImageDownload) (*empty.Empty, error) |
| 394 | } |
| 395 | |
| 396 | // UnimplementedCoreServiceServer can be embedded to have forward compatible implementations. |
| 397 | type UnimplementedCoreServiceServer struct { |
| 398 | } |
| 399 | |
khenaidoo | f333355 | 2021-12-15 16:52:31 -0500 | [diff] [blame^] | 400 | func (*UnimplementedCoreServiceServer) GetHealthStatus(srv CoreService_GetHealthStatusServer) error { |
| 401 | return status.Errorf(codes.Unimplemented, "method GetHealthStatus not implemented") |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 402 | } |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 403 | func (*UnimplementedCoreServiceServer) RegisterAdapter(ctx context.Context, req *core_adapter.AdapterRegistration) (*empty.Empty, error) { |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 404 | return nil, status.Errorf(codes.Unimplemented, "method RegisterAdapter not implemented") |
| 405 | } |
| 406 | func (*UnimplementedCoreServiceServer) DeviceUpdate(ctx context.Context, req *voltha.Device) (*empty.Empty, error) { |
| 407 | return nil, status.Errorf(codes.Unimplemented, "method DeviceUpdate not implemented") |
| 408 | } |
| 409 | func (*UnimplementedCoreServiceServer) PortCreated(ctx context.Context, req *voltha.Port) (*empty.Empty, error) { |
| 410 | return nil, status.Errorf(codes.Unimplemented, "method PortCreated not implemented") |
| 411 | } |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 412 | func (*UnimplementedCoreServiceServer) PortsStateUpdate(ctx context.Context, req *core_adapter.PortStateFilter) (*empty.Empty, error) { |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 413 | return nil, status.Errorf(codes.Unimplemented, "method PortsStateUpdate not implemented") |
| 414 | } |
| 415 | func (*UnimplementedCoreServiceServer) DeleteAllPorts(ctx context.Context, req *common.ID) (*empty.Empty, error) { |
| 416 | return nil, status.Errorf(codes.Unimplemented, "method DeleteAllPorts not implemented") |
| 417 | } |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 418 | func (*UnimplementedCoreServiceServer) GetDevicePort(ctx context.Context, req *core_adapter.PortFilter) (*voltha.Port, error) { |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 419 | return nil, status.Errorf(codes.Unimplemented, "method GetDevicePort not implemented") |
| 420 | } |
| 421 | func (*UnimplementedCoreServiceServer) ListDevicePorts(ctx context.Context, req *common.ID) (*voltha.Ports, error) { |
| 422 | return nil, status.Errorf(codes.Unimplemented, "method ListDevicePorts not implemented") |
| 423 | } |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 424 | func (*UnimplementedCoreServiceServer) DeviceStateUpdate(ctx context.Context, req *core_adapter.DeviceStateFilter) (*empty.Empty, error) { |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 425 | return nil, status.Errorf(codes.Unimplemented, "method DeviceStateUpdate not implemented") |
| 426 | } |
| 427 | func (*UnimplementedCoreServiceServer) DevicePMConfigUpdate(ctx context.Context, req *voltha.PmConfigs) (*empty.Empty, error) { |
| 428 | return nil, status.Errorf(codes.Unimplemented, "method DevicePMConfigUpdate not implemented") |
| 429 | } |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 430 | func (*UnimplementedCoreServiceServer) ChildDeviceDetected(ctx context.Context, req *core_adapter.DeviceDiscovery) (*voltha.Device, error) { |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 431 | return nil, status.Errorf(codes.Unimplemented, "method ChildDeviceDetected not implemented") |
| 432 | } |
| 433 | func (*UnimplementedCoreServiceServer) ChildDevicesLost(ctx context.Context, req *common.ID) (*empty.Empty, error) { |
| 434 | return nil, status.Errorf(codes.Unimplemented, "method ChildDevicesLost not implemented") |
| 435 | } |
| 436 | func (*UnimplementedCoreServiceServer) ChildDevicesDetected(ctx context.Context, req *common.ID) (*empty.Empty, error) { |
| 437 | return nil, status.Errorf(codes.Unimplemented, "method ChildDevicesDetected not implemented") |
| 438 | } |
| 439 | func (*UnimplementedCoreServiceServer) GetDevice(ctx context.Context, req *common.ID) (*voltha.Device, error) { |
| 440 | return nil, status.Errorf(codes.Unimplemented, "method GetDevice not implemented") |
| 441 | } |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 442 | func (*UnimplementedCoreServiceServer) GetChildDevice(ctx context.Context, req *core_adapter.ChildDeviceFilter) (*voltha.Device, error) { |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 443 | return nil, status.Errorf(codes.Unimplemented, "method GetChildDevice not implemented") |
| 444 | } |
| 445 | func (*UnimplementedCoreServiceServer) GetChildDevices(ctx context.Context, req *common.ID) (*voltha.Devices, error) { |
| 446 | return nil, status.Errorf(codes.Unimplemented, "method GetChildDevices not implemented") |
| 447 | } |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 448 | func (*UnimplementedCoreServiceServer) SendPacketIn(ctx context.Context, req *core_adapter.PacketIn) (*empty.Empty, error) { |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 449 | return nil, status.Errorf(codes.Unimplemented, "method SendPacketIn not implemented") |
| 450 | } |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 451 | func (*UnimplementedCoreServiceServer) DeviceReasonUpdate(ctx context.Context, req *core_adapter.DeviceReason) (*empty.Empty, error) { |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 452 | return nil, status.Errorf(codes.Unimplemented, "method DeviceReasonUpdate not implemented") |
| 453 | } |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 454 | func (*UnimplementedCoreServiceServer) PortStateUpdate(ctx context.Context, req *core_adapter.PortState) (*empty.Empty, error) { |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 455 | return nil, status.Errorf(codes.Unimplemented, "method PortStateUpdate not implemented") |
| 456 | } |
| 457 | func (*UnimplementedCoreServiceServer) ReconcileChildDevices(ctx context.Context, req *common.ID) (*empty.Empty, error) { |
| 458 | return nil, status.Errorf(codes.Unimplemented, "method ReconcileChildDevices not implemented") |
| 459 | } |
| 460 | func (*UnimplementedCoreServiceServer) GetChildDeviceWithProxyAddress(ctx context.Context, req *voltha.Device_ProxyAddress) (*voltha.Device, error) { |
| 461 | return nil, status.Errorf(codes.Unimplemented, "method GetChildDeviceWithProxyAddress not implemented") |
| 462 | } |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 463 | func (*UnimplementedCoreServiceServer) GetPorts(ctx context.Context, req *core_adapter.PortFilter) (*voltha.Ports, error) { |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 464 | return nil, status.Errorf(codes.Unimplemented, "method GetPorts not implemented") |
| 465 | } |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 466 | func (*UnimplementedCoreServiceServer) ChildrenStateUpdate(ctx context.Context, req *core_adapter.DeviceStateFilter) (*empty.Empty, error) { |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 467 | return nil, status.Errorf(codes.Unimplemented, "method ChildrenStateUpdate not implemented") |
| 468 | } |
| 469 | func (*UnimplementedCoreServiceServer) UpdateImageDownload(ctx context.Context, req *voltha.ImageDownload) (*empty.Empty, error) { |
| 470 | return nil, status.Errorf(codes.Unimplemented, "method UpdateImageDownload not implemented") |
| 471 | } |
| 472 | |
| 473 | func RegisterCoreServiceServer(s *grpc.Server, srv CoreServiceServer) { |
| 474 | s.RegisterService(&_CoreService_serviceDesc, srv) |
| 475 | } |
| 476 | |
khenaidoo | f333355 | 2021-12-15 16:52:31 -0500 | [diff] [blame^] | 477 | func _CoreService_GetHealthStatus_Handler(srv interface{}, stream grpc.ServerStream) error { |
| 478 | return srv.(CoreServiceServer).GetHealthStatus(&coreServiceGetHealthStatusServer{stream}) |
| 479 | } |
| 480 | |
| 481 | type CoreService_GetHealthStatusServer interface { |
| 482 | Send(*health.HealthStatus) error |
| 483 | Recv() (*common.Connection, error) |
| 484 | grpc.ServerStream |
| 485 | } |
| 486 | |
| 487 | type coreServiceGetHealthStatusServer struct { |
| 488 | grpc.ServerStream |
| 489 | } |
| 490 | |
| 491 | func (x *coreServiceGetHealthStatusServer) Send(m *health.HealthStatus) error { |
| 492 | return x.ServerStream.SendMsg(m) |
| 493 | } |
| 494 | |
| 495 | func (x *coreServiceGetHealthStatusServer) Recv() (*common.Connection, error) { |
| 496 | m := new(common.Connection) |
| 497 | if err := x.ServerStream.RecvMsg(m); err != nil { |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 498 | return nil, err |
| 499 | } |
khenaidoo | f333355 | 2021-12-15 16:52:31 -0500 | [diff] [blame^] | 500 | return m, nil |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 501 | } |
| 502 | |
| 503 | func _CoreService_RegisterAdapter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 504 | in := new(core_adapter.AdapterRegistration) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 505 | if err := dec(in); err != nil { |
| 506 | return nil, err |
| 507 | } |
| 508 | if interceptor == nil { |
| 509 | return srv.(CoreServiceServer).RegisterAdapter(ctx, in) |
| 510 | } |
| 511 | info := &grpc.UnaryServerInfo{ |
| 512 | Server: srv, |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 513 | FullMethod: "/core_service.CoreService/RegisterAdapter", |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 514 | } |
| 515 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 516 | return srv.(CoreServiceServer).RegisterAdapter(ctx, req.(*core_adapter.AdapterRegistration)) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 517 | } |
| 518 | return interceptor(ctx, in, info, handler) |
| 519 | } |
| 520 | |
| 521 | func _CoreService_DeviceUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 522 | in := new(voltha.Device) |
| 523 | if err := dec(in); err != nil { |
| 524 | return nil, err |
| 525 | } |
| 526 | if interceptor == nil { |
| 527 | return srv.(CoreServiceServer).DeviceUpdate(ctx, in) |
| 528 | } |
| 529 | info := &grpc.UnaryServerInfo{ |
| 530 | Server: srv, |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 531 | FullMethod: "/core_service.CoreService/DeviceUpdate", |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 532 | } |
| 533 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 534 | return srv.(CoreServiceServer).DeviceUpdate(ctx, req.(*voltha.Device)) |
| 535 | } |
| 536 | return interceptor(ctx, in, info, handler) |
| 537 | } |
| 538 | |
| 539 | func _CoreService_PortCreated_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 540 | in := new(voltha.Port) |
| 541 | if err := dec(in); err != nil { |
| 542 | return nil, err |
| 543 | } |
| 544 | if interceptor == nil { |
| 545 | return srv.(CoreServiceServer).PortCreated(ctx, in) |
| 546 | } |
| 547 | info := &grpc.UnaryServerInfo{ |
| 548 | Server: srv, |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 549 | FullMethod: "/core_service.CoreService/PortCreated", |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 550 | } |
| 551 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 552 | return srv.(CoreServiceServer).PortCreated(ctx, req.(*voltha.Port)) |
| 553 | } |
| 554 | return interceptor(ctx, in, info, handler) |
| 555 | } |
| 556 | |
| 557 | func _CoreService_PortsStateUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 558 | in := new(core_adapter.PortStateFilter) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 559 | if err := dec(in); err != nil { |
| 560 | return nil, err |
| 561 | } |
| 562 | if interceptor == nil { |
| 563 | return srv.(CoreServiceServer).PortsStateUpdate(ctx, in) |
| 564 | } |
| 565 | info := &grpc.UnaryServerInfo{ |
| 566 | Server: srv, |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 567 | FullMethod: "/core_service.CoreService/PortsStateUpdate", |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 568 | } |
| 569 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 570 | return srv.(CoreServiceServer).PortsStateUpdate(ctx, req.(*core_adapter.PortStateFilter)) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 571 | } |
| 572 | return interceptor(ctx, in, info, handler) |
| 573 | } |
| 574 | |
| 575 | func _CoreService_DeleteAllPorts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 576 | in := new(common.ID) |
| 577 | if err := dec(in); err != nil { |
| 578 | return nil, err |
| 579 | } |
| 580 | if interceptor == nil { |
| 581 | return srv.(CoreServiceServer).DeleteAllPorts(ctx, in) |
| 582 | } |
| 583 | info := &grpc.UnaryServerInfo{ |
| 584 | Server: srv, |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 585 | FullMethod: "/core_service.CoreService/DeleteAllPorts", |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 586 | } |
| 587 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 588 | return srv.(CoreServiceServer).DeleteAllPorts(ctx, req.(*common.ID)) |
| 589 | } |
| 590 | return interceptor(ctx, in, info, handler) |
| 591 | } |
| 592 | |
| 593 | func _CoreService_GetDevicePort_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 594 | in := new(core_adapter.PortFilter) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 595 | if err := dec(in); err != nil { |
| 596 | return nil, err |
| 597 | } |
| 598 | if interceptor == nil { |
| 599 | return srv.(CoreServiceServer).GetDevicePort(ctx, in) |
| 600 | } |
| 601 | info := &grpc.UnaryServerInfo{ |
| 602 | Server: srv, |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 603 | FullMethod: "/core_service.CoreService/GetDevicePort", |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 604 | } |
| 605 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 606 | return srv.(CoreServiceServer).GetDevicePort(ctx, req.(*core_adapter.PortFilter)) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 607 | } |
| 608 | return interceptor(ctx, in, info, handler) |
| 609 | } |
| 610 | |
| 611 | func _CoreService_ListDevicePorts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 612 | in := new(common.ID) |
| 613 | if err := dec(in); err != nil { |
| 614 | return nil, err |
| 615 | } |
| 616 | if interceptor == nil { |
| 617 | return srv.(CoreServiceServer).ListDevicePorts(ctx, in) |
| 618 | } |
| 619 | info := &grpc.UnaryServerInfo{ |
| 620 | Server: srv, |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 621 | FullMethod: "/core_service.CoreService/ListDevicePorts", |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 622 | } |
| 623 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 624 | return srv.(CoreServiceServer).ListDevicePorts(ctx, req.(*common.ID)) |
| 625 | } |
| 626 | return interceptor(ctx, in, info, handler) |
| 627 | } |
| 628 | |
| 629 | func _CoreService_DeviceStateUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 630 | in := new(core_adapter.DeviceStateFilter) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 631 | if err := dec(in); err != nil { |
| 632 | return nil, err |
| 633 | } |
| 634 | if interceptor == nil { |
| 635 | return srv.(CoreServiceServer).DeviceStateUpdate(ctx, in) |
| 636 | } |
| 637 | info := &grpc.UnaryServerInfo{ |
| 638 | Server: srv, |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 639 | FullMethod: "/core_service.CoreService/DeviceStateUpdate", |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 640 | } |
| 641 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 642 | return srv.(CoreServiceServer).DeviceStateUpdate(ctx, req.(*core_adapter.DeviceStateFilter)) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 643 | } |
| 644 | return interceptor(ctx, in, info, handler) |
| 645 | } |
| 646 | |
| 647 | func _CoreService_DevicePMConfigUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 648 | in := new(voltha.PmConfigs) |
| 649 | if err := dec(in); err != nil { |
| 650 | return nil, err |
| 651 | } |
| 652 | if interceptor == nil { |
| 653 | return srv.(CoreServiceServer).DevicePMConfigUpdate(ctx, in) |
| 654 | } |
| 655 | info := &grpc.UnaryServerInfo{ |
| 656 | Server: srv, |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 657 | FullMethod: "/core_service.CoreService/DevicePMConfigUpdate", |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 658 | } |
| 659 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 660 | return srv.(CoreServiceServer).DevicePMConfigUpdate(ctx, req.(*voltha.PmConfigs)) |
| 661 | } |
| 662 | return interceptor(ctx, in, info, handler) |
| 663 | } |
| 664 | |
| 665 | func _CoreService_ChildDeviceDetected_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 666 | in := new(core_adapter.DeviceDiscovery) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 667 | if err := dec(in); err != nil { |
| 668 | return nil, err |
| 669 | } |
| 670 | if interceptor == nil { |
| 671 | return srv.(CoreServiceServer).ChildDeviceDetected(ctx, in) |
| 672 | } |
| 673 | info := &grpc.UnaryServerInfo{ |
| 674 | Server: srv, |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 675 | FullMethod: "/core_service.CoreService/ChildDeviceDetected", |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 676 | } |
| 677 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 678 | return srv.(CoreServiceServer).ChildDeviceDetected(ctx, req.(*core_adapter.DeviceDiscovery)) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 679 | } |
| 680 | return interceptor(ctx, in, info, handler) |
| 681 | } |
| 682 | |
| 683 | func _CoreService_ChildDevicesLost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 684 | in := new(common.ID) |
| 685 | if err := dec(in); err != nil { |
| 686 | return nil, err |
| 687 | } |
| 688 | if interceptor == nil { |
| 689 | return srv.(CoreServiceServer).ChildDevicesLost(ctx, in) |
| 690 | } |
| 691 | info := &grpc.UnaryServerInfo{ |
| 692 | Server: srv, |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 693 | FullMethod: "/core_service.CoreService/ChildDevicesLost", |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 694 | } |
| 695 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 696 | return srv.(CoreServiceServer).ChildDevicesLost(ctx, req.(*common.ID)) |
| 697 | } |
| 698 | return interceptor(ctx, in, info, handler) |
| 699 | } |
| 700 | |
| 701 | func _CoreService_ChildDevicesDetected_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 702 | in := new(common.ID) |
| 703 | if err := dec(in); err != nil { |
| 704 | return nil, err |
| 705 | } |
| 706 | if interceptor == nil { |
| 707 | return srv.(CoreServiceServer).ChildDevicesDetected(ctx, in) |
| 708 | } |
| 709 | info := &grpc.UnaryServerInfo{ |
| 710 | Server: srv, |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 711 | FullMethod: "/core_service.CoreService/ChildDevicesDetected", |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 712 | } |
| 713 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 714 | return srv.(CoreServiceServer).ChildDevicesDetected(ctx, req.(*common.ID)) |
| 715 | } |
| 716 | return interceptor(ctx, in, info, handler) |
| 717 | } |
| 718 | |
| 719 | func _CoreService_GetDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 720 | in := new(common.ID) |
| 721 | if err := dec(in); err != nil { |
| 722 | return nil, err |
| 723 | } |
| 724 | if interceptor == nil { |
| 725 | return srv.(CoreServiceServer).GetDevice(ctx, in) |
| 726 | } |
| 727 | info := &grpc.UnaryServerInfo{ |
| 728 | Server: srv, |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 729 | FullMethod: "/core_service.CoreService/GetDevice", |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 730 | } |
| 731 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 732 | return srv.(CoreServiceServer).GetDevice(ctx, req.(*common.ID)) |
| 733 | } |
| 734 | return interceptor(ctx, in, info, handler) |
| 735 | } |
| 736 | |
| 737 | func _CoreService_GetChildDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 738 | in := new(core_adapter.ChildDeviceFilter) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 739 | if err := dec(in); err != nil { |
| 740 | return nil, err |
| 741 | } |
| 742 | if interceptor == nil { |
| 743 | return srv.(CoreServiceServer).GetChildDevice(ctx, in) |
| 744 | } |
| 745 | info := &grpc.UnaryServerInfo{ |
| 746 | Server: srv, |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 747 | FullMethod: "/core_service.CoreService/GetChildDevice", |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 748 | } |
| 749 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 750 | return srv.(CoreServiceServer).GetChildDevice(ctx, req.(*core_adapter.ChildDeviceFilter)) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 751 | } |
| 752 | return interceptor(ctx, in, info, handler) |
| 753 | } |
| 754 | |
| 755 | func _CoreService_GetChildDevices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 756 | in := new(common.ID) |
| 757 | if err := dec(in); err != nil { |
| 758 | return nil, err |
| 759 | } |
| 760 | if interceptor == nil { |
| 761 | return srv.(CoreServiceServer).GetChildDevices(ctx, in) |
| 762 | } |
| 763 | info := &grpc.UnaryServerInfo{ |
| 764 | Server: srv, |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 765 | FullMethod: "/core_service.CoreService/GetChildDevices", |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 766 | } |
| 767 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 768 | return srv.(CoreServiceServer).GetChildDevices(ctx, req.(*common.ID)) |
| 769 | } |
| 770 | return interceptor(ctx, in, info, handler) |
| 771 | } |
| 772 | |
| 773 | func _CoreService_SendPacketIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 774 | in := new(core_adapter.PacketIn) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 775 | if err := dec(in); err != nil { |
| 776 | return nil, err |
| 777 | } |
| 778 | if interceptor == nil { |
| 779 | return srv.(CoreServiceServer).SendPacketIn(ctx, in) |
| 780 | } |
| 781 | info := &grpc.UnaryServerInfo{ |
| 782 | Server: srv, |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 783 | FullMethod: "/core_service.CoreService/SendPacketIn", |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 784 | } |
| 785 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 786 | return srv.(CoreServiceServer).SendPacketIn(ctx, req.(*core_adapter.PacketIn)) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 787 | } |
| 788 | return interceptor(ctx, in, info, handler) |
| 789 | } |
| 790 | |
| 791 | func _CoreService_DeviceReasonUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 792 | in := new(core_adapter.DeviceReason) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 793 | if err := dec(in); err != nil { |
| 794 | return nil, err |
| 795 | } |
| 796 | if interceptor == nil { |
| 797 | return srv.(CoreServiceServer).DeviceReasonUpdate(ctx, in) |
| 798 | } |
| 799 | info := &grpc.UnaryServerInfo{ |
| 800 | Server: srv, |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 801 | FullMethod: "/core_service.CoreService/DeviceReasonUpdate", |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 802 | } |
| 803 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 804 | return srv.(CoreServiceServer).DeviceReasonUpdate(ctx, req.(*core_adapter.DeviceReason)) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 805 | } |
| 806 | return interceptor(ctx, in, info, handler) |
| 807 | } |
| 808 | |
| 809 | func _CoreService_PortStateUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 810 | in := new(core_adapter.PortState) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 811 | if err := dec(in); err != nil { |
| 812 | return nil, err |
| 813 | } |
| 814 | if interceptor == nil { |
| 815 | return srv.(CoreServiceServer).PortStateUpdate(ctx, in) |
| 816 | } |
| 817 | info := &grpc.UnaryServerInfo{ |
| 818 | Server: srv, |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 819 | FullMethod: "/core_service.CoreService/PortStateUpdate", |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 820 | } |
| 821 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 822 | return srv.(CoreServiceServer).PortStateUpdate(ctx, req.(*core_adapter.PortState)) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 823 | } |
| 824 | return interceptor(ctx, in, info, handler) |
| 825 | } |
| 826 | |
| 827 | func _CoreService_ReconcileChildDevices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 828 | in := new(common.ID) |
| 829 | if err := dec(in); err != nil { |
| 830 | return nil, err |
| 831 | } |
| 832 | if interceptor == nil { |
| 833 | return srv.(CoreServiceServer).ReconcileChildDevices(ctx, in) |
| 834 | } |
| 835 | info := &grpc.UnaryServerInfo{ |
| 836 | Server: srv, |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 837 | FullMethod: "/core_service.CoreService/ReconcileChildDevices", |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 838 | } |
| 839 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 840 | return srv.(CoreServiceServer).ReconcileChildDevices(ctx, req.(*common.ID)) |
| 841 | } |
| 842 | return interceptor(ctx, in, info, handler) |
| 843 | } |
| 844 | |
| 845 | func _CoreService_GetChildDeviceWithProxyAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 846 | in := new(voltha.Device_ProxyAddress) |
| 847 | if err := dec(in); err != nil { |
| 848 | return nil, err |
| 849 | } |
| 850 | if interceptor == nil { |
| 851 | return srv.(CoreServiceServer).GetChildDeviceWithProxyAddress(ctx, in) |
| 852 | } |
| 853 | info := &grpc.UnaryServerInfo{ |
| 854 | Server: srv, |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 855 | FullMethod: "/core_service.CoreService/GetChildDeviceWithProxyAddress", |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 856 | } |
| 857 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 858 | return srv.(CoreServiceServer).GetChildDeviceWithProxyAddress(ctx, req.(*voltha.Device_ProxyAddress)) |
| 859 | } |
| 860 | return interceptor(ctx, in, info, handler) |
| 861 | } |
| 862 | |
| 863 | func _CoreService_GetPorts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 864 | in := new(core_adapter.PortFilter) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 865 | if err := dec(in); err != nil { |
| 866 | return nil, err |
| 867 | } |
| 868 | if interceptor == nil { |
| 869 | return srv.(CoreServiceServer).GetPorts(ctx, in) |
| 870 | } |
| 871 | info := &grpc.UnaryServerInfo{ |
| 872 | Server: srv, |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 873 | FullMethod: "/core_service.CoreService/GetPorts", |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 874 | } |
| 875 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 876 | return srv.(CoreServiceServer).GetPorts(ctx, req.(*core_adapter.PortFilter)) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 877 | } |
| 878 | return interceptor(ctx, in, info, handler) |
| 879 | } |
| 880 | |
| 881 | func _CoreService_ChildrenStateUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 882 | in := new(core_adapter.DeviceStateFilter) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 883 | if err := dec(in); err != nil { |
| 884 | return nil, err |
| 885 | } |
| 886 | if interceptor == nil { |
| 887 | return srv.(CoreServiceServer).ChildrenStateUpdate(ctx, in) |
| 888 | } |
| 889 | info := &grpc.UnaryServerInfo{ |
| 890 | Server: srv, |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 891 | FullMethod: "/core_service.CoreService/ChildrenStateUpdate", |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 892 | } |
| 893 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 894 | return srv.(CoreServiceServer).ChildrenStateUpdate(ctx, req.(*core_adapter.DeviceStateFilter)) |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 895 | } |
| 896 | return interceptor(ctx, in, info, handler) |
| 897 | } |
| 898 | |
| 899 | func _CoreService_UpdateImageDownload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 900 | in := new(voltha.ImageDownload) |
| 901 | if err := dec(in); err != nil { |
| 902 | return nil, err |
| 903 | } |
| 904 | if interceptor == nil { |
| 905 | return srv.(CoreServiceServer).UpdateImageDownload(ctx, in) |
| 906 | } |
| 907 | info := &grpc.UnaryServerInfo{ |
| 908 | Server: srv, |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 909 | FullMethod: "/core_service.CoreService/UpdateImageDownload", |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 910 | } |
| 911 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 912 | return srv.(CoreServiceServer).UpdateImageDownload(ctx, req.(*voltha.ImageDownload)) |
| 913 | } |
| 914 | return interceptor(ctx, in, info, handler) |
| 915 | } |
| 916 | |
| 917 | var _CoreService_serviceDesc = grpc.ServiceDesc{ |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 918 | ServiceName: "core_service.CoreService", |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 919 | HandlerType: (*CoreServiceServer)(nil), |
| 920 | Methods: []grpc.MethodDesc{ |
| 921 | { |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 922 | MethodName: "RegisterAdapter", |
| 923 | Handler: _CoreService_RegisterAdapter_Handler, |
| 924 | }, |
| 925 | { |
| 926 | MethodName: "DeviceUpdate", |
| 927 | Handler: _CoreService_DeviceUpdate_Handler, |
| 928 | }, |
| 929 | { |
| 930 | MethodName: "PortCreated", |
| 931 | Handler: _CoreService_PortCreated_Handler, |
| 932 | }, |
| 933 | { |
| 934 | MethodName: "PortsStateUpdate", |
| 935 | Handler: _CoreService_PortsStateUpdate_Handler, |
| 936 | }, |
| 937 | { |
| 938 | MethodName: "DeleteAllPorts", |
| 939 | Handler: _CoreService_DeleteAllPorts_Handler, |
| 940 | }, |
| 941 | { |
| 942 | MethodName: "GetDevicePort", |
| 943 | Handler: _CoreService_GetDevicePort_Handler, |
| 944 | }, |
| 945 | { |
| 946 | MethodName: "ListDevicePorts", |
| 947 | Handler: _CoreService_ListDevicePorts_Handler, |
| 948 | }, |
| 949 | { |
| 950 | MethodName: "DeviceStateUpdate", |
| 951 | Handler: _CoreService_DeviceStateUpdate_Handler, |
| 952 | }, |
| 953 | { |
| 954 | MethodName: "DevicePMConfigUpdate", |
| 955 | Handler: _CoreService_DevicePMConfigUpdate_Handler, |
| 956 | }, |
| 957 | { |
| 958 | MethodName: "ChildDeviceDetected", |
| 959 | Handler: _CoreService_ChildDeviceDetected_Handler, |
| 960 | }, |
| 961 | { |
| 962 | MethodName: "ChildDevicesLost", |
| 963 | Handler: _CoreService_ChildDevicesLost_Handler, |
| 964 | }, |
| 965 | { |
| 966 | MethodName: "ChildDevicesDetected", |
| 967 | Handler: _CoreService_ChildDevicesDetected_Handler, |
| 968 | }, |
| 969 | { |
| 970 | MethodName: "GetDevice", |
| 971 | Handler: _CoreService_GetDevice_Handler, |
| 972 | }, |
| 973 | { |
| 974 | MethodName: "GetChildDevice", |
| 975 | Handler: _CoreService_GetChildDevice_Handler, |
| 976 | }, |
| 977 | { |
| 978 | MethodName: "GetChildDevices", |
| 979 | Handler: _CoreService_GetChildDevices_Handler, |
| 980 | }, |
| 981 | { |
| 982 | MethodName: "SendPacketIn", |
| 983 | Handler: _CoreService_SendPacketIn_Handler, |
| 984 | }, |
| 985 | { |
| 986 | MethodName: "DeviceReasonUpdate", |
| 987 | Handler: _CoreService_DeviceReasonUpdate_Handler, |
| 988 | }, |
| 989 | { |
| 990 | MethodName: "PortStateUpdate", |
| 991 | Handler: _CoreService_PortStateUpdate_Handler, |
| 992 | }, |
| 993 | { |
| 994 | MethodName: "ReconcileChildDevices", |
| 995 | Handler: _CoreService_ReconcileChildDevices_Handler, |
| 996 | }, |
| 997 | { |
| 998 | MethodName: "GetChildDeviceWithProxyAddress", |
| 999 | Handler: _CoreService_GetChildDeviceWithProxyAddress_Handler, |
| 1000 | }, |
| 1001 | { |
| 1002 | MethodName: "GetPorts", |
| 1003 | Handler: _CoreService_GetPorts_Handler, |
| 1004 | }, |
| 1005 | { |
| 1006 | MethodName: "ChildrenStateUpdate", |
| 1007 | Handler: _CoreService_ChildrenStateUpdate_Handler, |
| 1008 | }, |
| 1009 | { |
| 1010 | MethodName: "UpdateImageDownload", |
| 1011 | Handler: _CoreService_UpdateImageDownload_Handler, |
| 1012 | }, |
| 1013 | }, |
khenaidoo | f333355 | 2021-12-15 16:52:31 -0500 | [diff] [blame^] | 1014 | Streams: []grpc.StreamDesc{ |
| 1015 | { |
| 1016 | StreamName: "GetHealthStatus", |
| 1017 | Handler: _CoreService_GetHealthStatus_Handler, |
| 1018 | ServerStreams: true, |
| 1019 | ClientStreams: true, |
| 1020 | }, |
| 1021 | }, |
khenaidoo | 42dcdfd | 2021-10-19 17:34:12 -0400 | [diff] [blame] | 1022 | Metadata: "voltha_protos/core_services.proto", |
khenaidoo | 7d3c558 | 2021-08-11 18:09:44 -0400 | [diff] [blame] | 1023 | } |