blob: 3c384590e332b57375ea87a500ea713c48064db8 [file] [log] [blame]
khenaidoobf6e7bb2018-08-14 22:27:29 -04001/*
2 * Copyright 2018-present Open Networking Foundation
3
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7
8 * http://www.apache.org/licenses/LICENSE-2.0
9
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
npujar9b959eb2019-11-14 16:57:46 +053016
khenaidoobf6e7bb2018-08-14 22:27:29 -040017package grpc
18
19import (
20 "context"
21 "errors"
npujar9b959eb2019-11-14 16:57:46 +053022
khenaidoobf6e7bb2018-08-14 22:27:29 -040023 "github.com/golang/protobuf/ptypes/empty"
serkant.uluderya2ae470f2020-01-21 11:13:09 -080024 "github.com/opencord/voltha-lib-go/v3/pkg/log"
25 "github.com/opencord/voltha-protos/v3/go/common"
26 "github.com/opencord/voltha-protos/v3/go/openflow_13"
27 "github.com/opencord/voltha-protos/v3/go/voltha"
khenaidoobf6e7bb2018-08-14 22:27:29 -040028)
29
npujar9b959eb2019-11-14 16:57:46 +053030// DefaultAPIHandler represent default API handler
khenaidoobf6e7bb2018-08-14 22:27:29 -040031type DefaultAPIHandler struct {
32}
33
npujar9b959eb2019-11-14 16:57:46 +053034// NewDefaultAPIHandler creates default API handler instance
khenaidoobf6e7bb2018-08-14 22:27:29 -040035func NewDefaultAPIHandler() *DefaultAPIHandler {
36 handler := &DefaultAPIHandler{}
37 return handler
38}
39
npujar9b959eb2019-11-14 16:57:46 +053040// GetMembership returns membership
khenaidoo6417b6c2019-03-01 18:18:01 -050041func (handler *DefaultAPIHandler) GetMembership(ctx context.Context, empty *empty.Empty) (*voltha.Membership, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +000042 logger.Debug("GetMembership-request")
khenaidoo6417b6c2019-03-01 18:18:01 -050043 return nil, errors.New("UnImplemented")
44}
45
npujar9b959eb2019-11-14 16:57:46 +053046// UpdateMembership updates membership
khenaidoo54e0ddf2019-02-27 16:21:33 -050047func (handler *DefaultAPIHandler) UpdateMembership(ctx context.Context, membership *voltha.Membership) (*empty.Empty, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +000048 logger.Debugw("UpdateMembership-request", log.Fields{"membership": membership})
khenaidoo54e0ddf2019-02-27 16:21:33 -050049 return nil, errors.New("UnImplemented")
50}
51
npujar9b959eb2019-11-14 16:57:46 +053052// GetVoltha returns voltha details
khenaidoobf6e7bb2018-08-14 22:27:29 -040053func (handler *DefaultAPIHandler) GetVoltha(ctx context.Context, empty *empty.Empty) (*voltha.Voltha, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +000054 logger.Debug("GetVoltha-request")
khenaidoobf6e7bb2018-08-14 22:27:29 -040055 return nil, errors.New("UnImplemented")
56}
57
npujar9b959eb2019-11-14 16:57:46 +053058// ListCoreInstances returns core instances
khenaidoobf6e7bb2018-08-14 22:27:29 -040059func (handler *DefaultAPIHandler) ListCoreInstances(ctx context.Context, empty *empty.Empty) (*voltha.CoreInstances, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +000060 logger.Debug("ListCoreInstances-request")
khenaidoobf6e7bb2018-08-14 22:27:29 -040061 return nil, errors.New("UnImplemented")
62}
63
npujar9b959eb2019-11-14 16:57:46 +053064// GetCoreInstance returns core instance
khenaidoobf6e7bb2018-08-14 22:27:29 -040065func (handler *DefaultAPIHandler) GetCoreInstance(ctx context.Context, id *voltha.ID) (*voltha.CoreInstance, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +000066 logger.Debugw("GetCoreInstance-request", log.Fields{"id": *id})
khenaidoobf6e7bb2018-08-14 22:27:29 -040067 return nil, errors.New("UnImplemented")
68}
69
npujar9b959eb2019-11-14 16:57:46 +053070// ListAdapters returns core adapters
khenaidoobf6e7bb2018-08-14 22:27:29 -040071func (handler *DefaultAPIHandler) ListAdapters(ctx context.Context, empty *empty.Empty) (*voltha.Adapters, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +000072 logger.Debug("ListAdapters-request")
khenaidoobf6e7bb2018-08-14 22:27:29 -040073 return nil, errors.New("UnImplemented")
74}
75
npujar9b959eb2019-11-14 16:57:46 +053076// ListLogicalDevices returns all logical devices
khenaidoobf6e7bb2018-08-14 22:27:29 -040077func (handler *DefaultAPIHandler) ListLogicalDevices(ctx context.Context, empty *empty.Empty) (*voltha.LogicalDevices, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +000078 logger.Debug("ListLogicalDevices-request")
khenaidoobf6e7bb2018-08-14 22:27:29 -040079 return nil, errors.New("UnImplemented")
80}
81
npujar9b959eb2019-11-14 16:57:46 +053082// GetLogicalDevice returns logical device
khenaidoobf6e7bb2018-08-14 22:27:29 -040083func (handler *DefaultAPIHandler) GetLogicalDevice(ctx context.Context, id *voltha.ID) (*voltha.LogicalDevice, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +000084 logger.Debugw("GetLogicalDevice-request", log.Fields{"id": *id})
khenaidoobf6e7bb2018-08-14 22:27:29 -040085 return nil, errors.New("UnImplemented")
86}
87
npujar9b959eb2019-11-14 16:57:46 +053088// ListLogicalDevicePorts returns logical device ports
khenaidoobf6e7bb2018-08-14 22:27:29 -040089func (handler *DefaultAPIHandler) ListLogicalDevicePorts(ctx context.Context, id *voltha.ID) (*voltha.LogicalPorts, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +000090 logger.Debugw("ListLogicalDevicePorts-request", log.Fields{"id": *id})
khenaidoobf6e7bb2018-08-14 22:27:29 -040091 return nil, errors.New("UnImplemented")
92}
93
npujar9b959eb2019-11-14 16:57:46 +053094// GetLogicalDevicePort returns logical device port
khenaidoobf6e7bb2018-08-14 22:27:29 -040095func (handler *DefaultAPIHandler) GetLogicalDevicePort(ctx context.Context, id *voltha.LogicalPortId) (*voltha.LogicalPort, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +000096 logger.Debugw("GetLogicalDevicePort-request", log.Fields{"id": *id})
khenaidoobf6e7bb2018-08-14 22:27:29 -040097 return nil, errors.New("UnImplemented")
98}
99
npujar9b959eb2019-11-14 16:57:46 +0530100// EnableLogicalDevicePort enables logical device port
khenaidoobf6e7bb2018-08-14 22:27:29 -0400101func (handler *DefaultAPIHandler) EnableLogicalDevicePort(ctx context.Context, id *voltha.LogicalPortId) (*empty.Empty, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000102 logger.Debugw("EnableLogicalDevicePort-request", log.Fields{"id": *id})
khenaidoobf6e7bb2018-08-14 22:27:29 -0400103 return nil, errors.New("UnImplemented")
104}
105
npujar9b959eb2019-11-14 16:57:46 +0530106// DisableLogicalDevicePort -disables logical device port
khenaidoobf6e7bb2018-08-14 22:27:29 -0400107func (handler *DefaultAPIHandler) DisableLogicalDevicePort(ctx context.Context, id *voltha.LogicalPortId) (*empty.Empty, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000108 logger.Debugw("DisableLogicalDevicePort-request", log.Fields{"id": *id})
khenaidoobf6e7bb2018-08-14 22:27:29 -0400109 return nil, errors.New("UnImplemented")
110}
111
npujar9b959eb2019-11-14 16:57:46 +0530112// ListLogicalDeviceFlows returns logical device flows
khenaidoobf6e7bb2018-08-14 22:27:29 -0400113func (handler *DefaultAPIHandler) ListLogicalDeviceFlows(ctx context.Context, id *voltha.ID) (*openflow_13.Flows, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000114 logger.Debugw("ListLogicalDeviceFlows-request", log.Fields{"id": *id})
khenaidoobf6e7bb2018-08-14 22:27:29 -0400115 return nil, errors.New("UnImplemented")
116}
117
npujar9b959eb2019-11-14 16:57:46 +0530118// UpdateLogicalDeviceFlowTable updates logical device flow table
khenaidoobf6e7bb2018-08-14 22:27:29 -0400119func (handler *DefaultAPIHandler) UpdateLogicalDeviceFlowTable(ctx context.Context, flow *openflow_13.FlowTableUpdate) (*empty.Empty, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000120 logger.Debugw("UpdateLogicalDeviceFlowTable-request", log.Fields{"flow": *flow})
khenaidoobf6e7bb2018-08-14 22:27:29 -0400121 return nil, errors.New("UnImplemented")
122}
123
npujar9b959eb2019-11-14 16:57:46 +0530124// UpdateLogicalDeviceFlowGroupTable updates logical device flow group table
khenaidoobf6e7bb2018-08-14 22:27:29 -0400125func (handler *DefaultAPIHandler) UpdateLogicalDeviceFlowGroupTable(ctx context.Context, flow *openflow_13.FlowGroupTableUpdate) (*empty.Empty, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000126 logger.Debugw("UpdateLogicalDeviceFlowGroupTable-request", log.Fields{"flow": *flow})
khenaidoobf6e7bb2018-08-14 22:27:29 -0400127 return nil, errors.New("UnImplemented")
128}
129
npujar9b959eb2019-11-14 16:57:46 +0530130// ListLogicalDeviceFlowGroups returns logical device flow groups
khenaidoobf6e7bb2018-08-14 22:27:29 -0400131func (handler *DefaultAPIHandler) ListLogicalDeviceFlowGroups(ctx context.Context, id *voltha.ID) (*openflow_13.FlowGroups, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000132 logger.Debugw("ListLogicalDeviceFlowGroups-request", log.Fields{"id": *id})
khenaidoobf6e7bb2018-08-14 22:27:29 -0400133 return nil, errors.New("UnImplemented")
134}
135
npujar9b959eb2019-11-14 16:57:46 +0530136// ListDevices returns devices
khenaidoobf6e7bb2018-08-14 22:27:29 -0400137func (handler *DefaultAPIHandler) ListDevices(ctx context.Context, empty *empty.Empty) (*voltha.Devices, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000138 logger.Debug("ListDevices-request")
khenaidoobf6e7bb2018-08-14 22:27:29 -0400139 return nil, errors.New("UnImplemented")
140}
141
npujar9b959eb2019-11-14 16:57:46 +0530142// ListDeviceIDs returns device ids
143func (handler *DefaultAPIHandler) ListDeviceIDs(ctx context.Context, empty *empty.Empty) (*voltha.IDs, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000144 logger.Debug("ListDeviceIDs-request")
khenaidoo7ccedd52018-12-14 16:48:54 -0500145 return nil, errors.New("UnImplemented")
146}
147
npujar9b959eb2019-11-14 16:57:46 +0530148// ReconcileDevices reconciles devices
khenaidoo7ccedd52018-12-14 16:48:54 -0500149func (handler *DefaultAPIHandler) ReconcileDevices(ctx context.Context, ids *voltha.IDs) (*empty.Empty, error) {
150 if ids != nil {
Girish Kumarf56a4682020-03-20 20:07:46 +0000151 logger.Debugw("ReconcileDevices-request", log.Fields{"length": len(ids.Items)})
khenaidoo7ccedd52018-12-14 16:48:54 -0500152 return nil, errors.New("UnImplemented")
153 }
154 return nil, errors.New("ids-null")
155}
156
npujar9b959eb2019-11-14 16:57:46 +0530157// GetDevice returns device
khenaidoobf6e7bb2018-08-14 22:27:29 -0400158func (handler *DefaultAPIHandler) GetDevice(ctx context.Context, id *voltha.ID) (*voltha.Device, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000159 logger.Debugw("GetDevice-request", log.Fields{"id": id})
khenaidoobf6e7bb2018-08-14 22:27:29 -0400160 return nil, errors.New("UnImplemented")
161}
162
npujar9b959eb2019-11-14 16:57:46 +0530163// CreateDevice creates device
khenaidoobf6e7bb2018-08-14 22:27:29 -0400164func (handler *DefaultAPIHandler) CreateDevice(ctx context.Context, device *voltha.Device) (*voltha.Device, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000165 logger.Debugw("CreateDevice-request", log.Fields{"device": *device})
khenaidoobf6e7bb2018-08-14 22:27:29 -0400166 return nil, errors.New("UnImplemented")
167}
168
npujar9b959eb2019-11-14 16:57:46 +0530169// EnableDevice enables device
khenaidoobf6e7bb2018-08-14 22:27:29 -0400170func (handler *DefaultAPIHandler) EnableDevice(ctx context.Context, id *voltha.ID) (*empty.Empty, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000171 logger.Debugw("EnableDevice-request", log.Fields{"id": *id})
khenaidoobf6e7bb2018-08-14 22:27:29 -0400172 return nil, errors.New("UnImplemented")
173}
174
npujar9b959eb2019-11-14 16:57:46 +0530175// DisableDevice disables device
khenaidoobf6e7bb2018-08-14 22:27:29 -0400176func (handler *DefaultAPIHandler) DisableDevice(ctx context.Context, id *voltha.ID) (*empty.Empty, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000177 logger.Debugw("DisableDevice-request", log.Fields{"id": *id})
khenaidoobf6e7bb2018-08-14 22:27:29 -0400178 return nil, errors.New("UnImplemented")
179}
180
npujar9b959eb2019-11-14 16:57:46 +0530181// RebootDevice reboots device
khenaidoobf6e7bb2018-08-14 22:27:29 -0400182func (handler *DefaultAPIHandler) RebootDevice(ctx context.Context, id *voltha.ID) (*empty.Empty, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000183 logger.Debugw("RebootDevice-request", log.Fields{"id": *id})
khenaidoobf6e7bb2018-08-14 22:27:29 -0400184 return nil, errors.New("UnImplemented")
185}
186
npujar9b959eb2019-11-14 16:57:46 +0530187// DeleteDevice deletes device
khenaidoobf6e7bb2018-08-14 22:27:29 -0400188func (handler *DefaultAPIHandler) DeleteDevice(ctx context.Context, id *voltha.ID) (*empty.Empty, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000189 logger.Debugw("DeleteDevice-request", log.Fields{"id": *id})
khenaidoobf6e7bb2018-08-14 22:27:29 -0400190 return nil, errors.New("UnImplemented")
191}
192
npujar9b959eb2019-11-14 16:57:46 +0530193// DownloadImage downloads image
khenaidoobf6e7bb2018-08-14 22:27:29 -0400194func (handler *DefaultAPIHandler) DownloadImage(ctx context.Context, img *voltha.ImageDownload) (*common.OperationResp, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000195 logger.Debugw("DownloadImage-request", log.Fields{"img": *img})
khenaidoobf6e7bb2018-08-14 22:27:29 -0400196 return nil, errors.New("UnImplemented")
197}
198
npujar9b959eb2019-11-14 16:57:46 +0530199// GetImageDownloadStatus returns status of image download
khenaidoobf6e7bb2018-08-14 22:27:29 -0400200func (handler *DefaultAPIHandler) GetImageDownloadStatus(ctx context.Context, img *voltha.ImageDownload) (*voltha.ImageDownload, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000201 logger.Debugw("GetImageDownloadStatus-request", log.Fields{"img": *img})
khenaidoobf6e7bb2018-08-14 22:27:29 -0400202 return nil, errors.New("UnImplemented")
203}
204
npujar9b959eb2019-11-14 16:57:46 +0530205// GetImageDownload returns image download
khenaidoobf6e7bb2018-08-14 22:27:29 -0400206func (handler *DefaultAPIHandler) GetImageDownload(ctx context.Context, img *voltha.ImageDownload) (*voltha.ImageDownload, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000207 logger.Debugw("getdevice-request", log.Fields{"img": *img})
khenaidoobf6e7bb2018-08-14 22:27:29 -0400208 return nil, errors.New("UnImplemented")
209}
210
npujar9b959eb2019-11-14 16:57:46 +0530211// ListImageDownloads returns image downloads
khenaidoobf6e7bb2018-08-14 22:27:29 -0400212func (handler *DefaultAPIHandler) ListImageDownloads(ctx context.Context, id *voltha.ID) (*voltha.ImageDownloads, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000213 logger.Debugw("ListImageDownloads-request", log.Fields{"id": *id})
khenaidoobf6e7bb2018-08-14 22:27:29 -0400214 return nil, errors.New("UnImplemented")
215}
216
npujar9b959eb2019-11-14 16:57:46 +0530217// CancelImageDownload cancels image download
khenaidoobf6e7bb2018-08-14 22:27:29 -0400218func (handler *DefaultAPIHandler) CancelImageDownload(ctx context.Context, img *voltha.ImageDownload) (*common.OperationResp, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000219 logger.Debugw("CancelImageDownload-request", log.Fields{"img": *img})
khenaidoobf6e7bb2018-08-14 22:27:29 -0400220 return nil, errors.New("UnImplemented")
221}
222
npujar9b959eb2019-11-14 16:57:46 +0530223// ActivateImageUpdate activates image update
khenaidoobf6e7bb2018-08-14 22:27:29 -0400224func (handler *DefaultAPIHandler) ActivateImageUpdate(ctx context.Context, img *voltha.ImageDownload) (*common.OperationResp, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000225 logger.Debugw("ActivateImageUpdate-request", log.Fields{"img": *img})
khenaidoobf6e7bb2018-08-14 22:27:29 -0400226 return nil, errors.New("UnImplemented")
227}
228
npujar9b959eb2019-11-14 16:57:46 +0530229// RevertImageUpdate reverts image update
khenaidoobf6e7bb2018-08-14 22:27:29 -0400230func (handler *DefaultAPIHandler) RevertImageUpdate(ctx context.Context, img *voltha.ImageDownload) (*common.OperationResp, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000231 logger.Debugw("RevertImageUpdate-request", log.Fields{"img": *img})
khenaidoobf6e7bb2018-08-14 22:27:29 -0400232 return nil, errors.New("UnImplemented")
233}
234
npujar9b959eb2019-11-14 16:57:46 +0530235// ListDevicePorts returns device ports
khenaidoobf6e7bb2018-08-14 22:27:29 -0400236func (handler *DefaultAPIHandler) ListDevicePorts(ctx context.Context, id *voltha.ID) (*voltha.Ports, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000237 logger.Debugw("ListDevicePorts-request", log.Fields{"id": *id})
khenaidoobf6e7bb2018-08-14 22:27:29 -0400238 return nil, errors.New("UnImplemented")
239}
240
npujar9b959eb2019-11-14 16:57:46 +0530241// ListDevicePmConfigs returns device pm configs
khenaidoobf6e7bb2018-08-14 22:27:29 -0400242func (handler *DefaultAPIHandler) ListDevicePmConfigs(ctx context.Context, id *voltha.ID) (*voltha.PmConfigs, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000243 logger.Debugw("ListDevicePmConfigs-request", log.Fields{"id": *id})
khenaidoobf6e7bb2018-08-14 22:27:29 -0400244 return nil, errors.New("UnImplemented")
245}
246
npujar9b959eb2019-11-14 16:57:46 +0530247// UpdateDevicePmConfigs updates device pm configs
khenaidoobf6e7bb2018-08-14 22:27:29 -0400248func (handler *DefaultAPIHandler) UpdateDevicePmConfigs(ctx context.Context, configs *voltha.PmConfigs) (*empty.Empty, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000249 logger.Debugw("UpdateDevicePmConfigs-request", log.Fields{"configs": *configs})
khenaidoobf6e7bb2018-08-14 22:27:29 -0400250 return nil, errors.New("UnImplemented")
251}
252
npujar9b959eb2019-11-14 16:57:46 +0530253// ListDeviceFlows returns device flows
khenaidoobf6e7bb2018-08-14 22:27:29 -0400254func (handler *DefaultAPIHandler) ListDeviceFlows(ctx context.Context, id *voltha.ID) (*openflow_13.Flows, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000255 logger.Debugw("ListDeviceFlows-request", log.Fields{"id": *id})
khenaidoobf6e7bb2018-08-14 22:27:29 -0400256 return nil, errors.New("UnImplemented")
257}
258
npujar9b959eb2019-11-14 16:57:46 +0530259// ListDeviceFlowGroups returns device flow groups
khenaidoobf6e7bb2018-08-14 22:27:29 -0400260func (handler *DefaultAPIHandler) ListDeviceFlowGroups(ctx context.Context, id *voltha.ID) (*openflow_13.FlowGroups, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000261 logger.Debugw("ListDeviceFlowGroups-request", log.Fields{"id": *id})
khenaidoobf6e7bb2018-08-14 22:27:29 -0400262 return nil, errors.New("UnImplemented")
263}
264
npujar9b959eb2019-11-14 16:57:46 +0530265// ListDeviceTypes returns device types
khenaidoobf6e7bb2018-08-14 22:27:29 -0400266func (handler *DefaultAPIHandler) ListDeviceTypes(ctx context.Context, empty *empty.Empty) (*voltha.DeviceTypes, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000267 logger.Debug("ListDeviceTypes-request")
khenaidoobf6e7bb2018-08-14 22:27:29 -0400268 return nil, errors.New("UnImplemented")
269}
270
npujar9b959eb2019-11-14 16:57:46 +0530271// GetDeviceType returns device type
khenaidoobf6e7bb2018-08-14 22:27:29 -0400272func (handler *DefaultAPIHandler) GetDeviceType(ctx context.Context, id *voltha.ID) (*voltha.DeviceType, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000273 logger.Debugw("GetDeviceType-request", log.Fields{"id": *id})
khenaidoobf6e7bb2018-08-14 22:27:29 -0400274 return nil, errors.New("UnImplemented")
275}
276
npujar9b959eb2019-11-14 16:57:46 +0530277// ListDeviceGroups returns device groups
khenaidoobf6e7bb2018-08-14 22:27:29 -0400278func (handler *DefaultAPIHandler) ListDeviceGroups(ctx context.Context, empty *empty.Empty) (*voltha.DeviceGroups, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000279 logger.Debug("ListDeviceGroups-request")
khenaidoobf6e7bb2018-08-14 22:27:29 -0400280 return nil, errors.New("UnImplemented")
281}
282
npujar9b959eb2019-11-14 16:57:46 +0530283// GetDeviceGroup returns device group
khenaidoobf6e7bb2018-08-14 22:27:29 -0400284func (handler *DefaultAPIHandler) GetDeviceGroup(ctx context.Context, id *voltha.ID) (*voltha.DeviceGroup, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000285 logger.Debugw("GetDeviceGroup-request", log.Fields{"id": *id})
khenaidoobf6e7bb2018-08-14 22:27:29 -0400286 return nil, errors.New("UnImplemented")
287}
288
npujar9b959eb2019-11-14 16:57:46 +0530289// CreateEventFilter creates event filter
Devmalya Paulc594bb32019-11-06 07:34:27 +0000290func (handler *DefaultAPIHandler) CreateEventFilter(ctx context.Context, filter *voltha.EventFilter) (*voltha.EventFilter, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000291 logger.Debugw("CreateEventFilter-request", log.Fields{"filter": *filter})
khenaidoobf6e7bb2018-08-14 22:27:29 -0400292 return nil, errors.New("UnImplemented")
293}
294
npujar9b959eb2019-11-14 16:57:46 +0530295// GetEventFilter returns event filter
Devmalya Paulc594bb32019-11-06 07:34:27 +0000296func (handler *DefaultAPIHandler) GetEventFilter(ctx context.Context, id *voltha.ID) (*voltha.EventFilter, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000297 logger.Debugw("GetEventFilter-request", log.Fields{"id": id})
khenaidoobf6e7bb2018-08-14 22:27:29 -0400298 return nil, errors.New("UnImplemented")
299}
300
npujar9b959eb2019-11-14 16:57:46 +0530301// UpdateEventFilter updates event filter
Devmalya Paulc594bb32019-11-06 07:34:27 +0000302func (handler *DefaultAPIHandler) UpdateEventFilter(ctx context.Context, filter *voltha.EventFilter) (*voltha.EventFilter, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000303 logger.Debugw("UpdateEventFilter-request", log.Fields{"filter": *filter})
khenaidoobf6e7bb2018-08-14 22:27:29 -0400304 return nil, errors.New("UnImplemented")
305}
306
npujar9b959eb2019-11-14 16:57:46 +0530307// DeleteEventFilter deletes event filter
Devmalya Paulc594bb32019-11-06 07:34:27 +0000308func (handler *DefaultAPIHandler) DeleteEventFilter(ctx context.Context, filterInfo *voltha.EventFilter) (*empty.Empty, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000309 logger.Debugw("DeleteEventFilter-request", log.Fields{"filter-details": *filterInfo})
khenaidoobf6e7bb2018-08-14 22:27:29 -0400310 return nil, errors.New("UnImplemented")
311}
312
npujar9b959eb2019-11-14 16:57:46 +0530313// ListEventFilters returns event filters
Devmalya Paulc594bb32019-11-06 07:34:27 +0000314func (handler *DefaultAPIHandler) ListEventFilters(ctx context.Context, empty *empty.Empty) (*voltha.EventFilters, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000315 logger.Debug("ListEventFilters-request")
khenaidoobf6e7bb2018-08-14 22:27:29 -0400316 return nil, errors.New("UnImplemented")
317}
318
npujar9b959eb2019-11-14 16:57:46 +0530319// GetImages returns images
khenaidoobf6e7bb2018-08-14 22:27:29 -0400320func (handler *DefaultAPIHandler) GetImages(ctx context.Context, id *voltha.ID) (*voltha.Images, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000321 logger.Debugw("GetImages-request", log.Fields{"id": id})
khenaidoobf6e7bb2018-08-14 22:27:29 -0400322 return nil, errors.New("UnImplemented")
323}
324
npujar9b959eb2019-11-14 16:57:46 +0530325// SelfTest requests self test
khenaidoobf6e7bb2018-08-14 22:27:29 -0400326func (handler *DefaultAPIHandler) SelfTest(ctx context.Context, id *voltha.ID) (*voltha.SelfTestResponse, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000327 logger.Debugw("SelfTest-request", log.Fields{"id": id})
khenaidoobf6e7bb2018-08-14 22:27:29 -0400328 return nil, errors.New("UnImplemented")
329}
Stephane Barbarie6e1bd502018-11-05 22:44:45 -0500330
npujar9b959eb2019-11-14 16:57:46 +0530331// StreamPacketsOut sends packet to adapter
Stephane Barbarie6e1bd502018-11-05 22:44:45 -0500332func (handler *DefaultAPIHandler) StreamPacketsOut(packetsOut voltha.VolthaService_StreamPacketsOutServer) error {
Girish Kumarf56a4682020-03-20 20:07:46 +0000333 logger.Debugw("StreamPacketsOut-request", log.Fields{"packetsOut": packetsOut})
Stephane Barbarie6e1bd502018-11-05 22:44:45 -0500334 return errors.New("UnImplemented")
335}
336
npujar9b959eb2019-11-14 16:57:46 +0530337// ReceivePacketsIn receives packets from adapter
Stephane Barbarie6e1bd502018-11-05 22:44:45 -0500338func (handler *DefaultAPIHandler) ReceivePacketsIn(
339 empty *empty.Empty,
340 packetsIn voltha.VolthaService_ReceivePacketsInServer,
341) error {
Girish Kumarf56a4682020-03-20 20:07:46 +0000342 logger.Debugw("ReceivePacketsIn-request", log.Fields{"packetsIn": packetsIn})
Stephane Barbarie6e1bd502018-11-05 22:44:45 -0500343 return errors.New("UnImplemented")
344}
345
npujar9b959eb2019-11-14 16:57:46 +0530346// ReceiveChangeEvents receives change events
Stephane Barbarie6e1bd502018-11-05 22:44:45 -0500347func (handler *DefaultAPIHandler) ReceiveChangeEvents(
348 empty *empty.Empty,
349 changeEvents voltha.VolthaService_ReceiveChangeEventsServer,
350) error {
Girish Kumarf56a4682020-03-20 20:07:46 +0000351 logger.Debugw("ReceiveChangeEvents-request", log.Fields{"changeEvents": changeEvents})
Stephane Barbarie6e1bd502018-11-05 22:44:45 -0500352 return errors.New("UnImplemented")
353}
354
npujar9b959eb2019-11-14 16:57:46 +0530355// Subscribe requests for subscribe
Stephane Barbarie6e1bd502018-11-05 22:44:45 -0500356func (handler *DefaultAPIHandler) Subscribe(
357 ctx context.Context,
358 ofAgent *voltha.OfAgentSubscriber,
359) (*voltha.OfAgentSubscriber, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000360 logger.Debugw("Subscribe-request", log.Fields{"ofAgent": ofAgent})
Stephane Barbarie6e1bd502018-11-05 22:44:45 -0500361 return nil, errors.New("UnImplemented")
362}
Manikkaraj kb1a10922019-07-29 12:10:34 -0400363
npujar9b959eb2019-11-14 16:57:46 +0530364// UpdateLogicalDeviceMeterTable updates logical device meter table
Manikkaraj kb1a10922019-07-29 12:10:34 -0400365func (handler *DefaultAPIHandler) UpdateLogicalDeviceMeterTable(ctx context.Context, mod *openflow_13.MeterModUpdate) (*empty.Empty, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000366 logger.Debugw("UpdateLogicalDeviceMeterTable-request", log.Fields{"meter": mod})
Manikkaraj kb1a10922019-07-29 12:10:34 -0400367 return nil, errors.New("UnImplemented")
368}
369
npujar9b959eb2019-11-14 16:57:46 +0530370// ListLogicalDeviceMeters returns logical device meters
Manikkaraj kb1a10922019-07-29 12:10:34 -0400371func (handler *DefaultAPIHandler) ListLogicalDeviceMeters(ctx context.Context, id *voltha.ID) (*openflow_13.Meters, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000372 logger.Debugw("ListLogicalDeviceMeters-unimplemented", log.Fields{"id": id})
Manikkaraj kb1a10922019-07-29 12:10:34 -0400373 return nil, nil
374}
kesavandbc2d1622020-01-21 00:42:01 -0500375
376func (handler *DefaultAPIHandler) EnablePort(ctx context.Context, port *voltha.Port) (*empty.Empty, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000377 logger.Debugw("EnablePort-unimplemented", log.Fields{"id": port.DeviceId})
kesavandbc2d1622020-01-21 00:42:01 -0500378 return nil, nil
379}
380func (handler *DefaultAPIHandler) DisablePort(ctx context.Context, port *voltha.Port) (*empty.Empty, error) {
Girish Kumarf56a4682020-03-20 20:07:46 +0000381 logger.Debugw("DisablePort-unimplemented", log.Fields{"id": port.DeviceId})
kesavandbc2d1622020-01-21 00:42:01 -0500382 return nil, nil
383}
onkarkundargi87285252020-01-27 11:34:52 +0530384
385// on demand api for test action
386func (handler *DefaultAPIHandler) StartOmciTestAction(ctx context.Context, omcitestrequest *voltha.OmciTestRequest) (*voltha.TestResponse, error) {
387 return nil, errors.New("StartOmciTestAction-unimplemented")
388}