blob: 1e818907fbcca36d5fd514a16d19f08365a5fc3e [file] [log] [blame]
William Kurkianea869482019-04-09 15:16:11 -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 */
16package adapters
17
18import (
Esin Karamanccb714b2019-11-29 15:02:06 +000019 ic "github.com/opencord/voltha-protos/v3/go/inter_container"
20 "github.com/opencord/voltha-protos/v3/go/openflow_13"
21 "github.com/opencord/voltha-protos/v3/go/voltha"
William Kurkianea869482019-04-09 15:16:11 -040022)
23
24//IAdapter represents the set of APIs a voltha adapter has to support.
25type IAdapter interface {
26 Adapter_descriptor() error
27 Device_types() (*voltha.DeviceTypes, error)
28 Health() (*voltha.HealthStatus, error)
29 Adopt_device(device *voltha.Device) error
30 Reconcile_device(device *voltha.Device) error
31 Abandon_device(device *voltha.Device) error
32 Disable_device(device *voltha.Device) error
33 Reenable_device(device *voltha.Device) error
34 Reboot_device(device *voltha.Device) error
35 Self_test_device(device *voltha.Device) error
manikkaraj k9eb6cac2019-05-09 12:32:03 -040036 Delete_device(device *voltha.Device) error
William Kurkianea869482019-04-09 15:16:11 -040037 Get_device_details(device *voltha.Device) error
Manikkaraj kb1d51442019-07-23 10:41:02 -040038 Update_flows_bulk(device *voltha.Device, flows *voltha.Flows, groups *voltha.FlowGroups, flowMetadata *voltha.FlowMetadata) error
39 Update_flows_incrementally(device *voltha.Device, flows *openflow_13.FlowChanges, groups *openflow_13.FlowGroupChanges, flowMetadata *voltha.FlowMetadata) error
William Kurkianea869482019-04-09 15:16:11 -040040 Update_pm_config(device *voltha.Device, pm_configs *voltha.PmConfigs) error
manikkaraj k9eb6cac2019-05-09 12:32:03 -040041 Receive_packet_out(deviceId string, egress_port_no int, msg *openflow_13.OfpPacketOut) error
Devmalya Pauldd23a992019-11-14 07:06:31 +000042 Suppress_event(filter *voltha.EventFilter) error
43 Unsuppress_event(filter *voltha.EventFilter) error
William Kurkianea869482019-04-09 15:16:11 -040044 Get_ofp_device_info(device *voltha.Device) (*ic.SwitchCapability, error)
William Kurkianea869482019-04-09 15:16:11 -040045 Process_inter_adapter_message(msg *ic.InterAdapterMessage) error
46 Download_image(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error)
47 Get_image_download_status(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error)
48 Cancel_image_download(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error)
49 Activate_image_update(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error)
50 Revert_image_update(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error)
kesavandd6184722020-02-05 17:13:35 -050051 Enable_port(deviceId string, port *voltha.Port) error
52 Disable_port(deviceId string, port *voltha.Port) error
Chaitrashree G S1a55b882020-02-04 17:35:35 -050053 Child_device_lost(parentDeviceId string, parentPortNo uint32, onuID uint32) error
Scott Baker24f83e22020-03-30 16:14:28 -070054 Start_omci_test(device *voltha.Device, request *voltha.OmciTestRequest) (*voltha.TestResponse, error)
Dinesh Belwalkardb587af2020-02-27 15:37:16 -080055 Get_ext_value(deviceId string, device *voltha.Device, valueflag voltha.ValueType_Type) (*voltha.ReturnValues, error)
William Kurkianea869482019-04-09 15:16:11 -040056}