blob: 3fc34163dce077e3f2108d7e6afaeaba10ffb49d [file] [log] [blame]
amit.ghosh258d14c2020-10-02 15:13:38 +02001/*
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 */
16
17package dmiserver
18
19import (
20 "context"
21
22 dmi "github.com/opencord/device-management-interface/go/dmi"
23)
24
25//ListEvents lists the supported events for the passed device
26func (dms *DmiAPIServer) ListEvents(ctx context.Context, req *dmi.HardwareID) (*dmi.ListEventsResponse, error) {
27 logger.Debugf("ListEvents called with request %+v", req)
28 //empty events
29 events := []*dmi.EventCfg{{}}
30 return &dmi.ListEventsResponse{
Humera Kousera4442952020-11-23 23:51:19 +053031 Status: dmi.Status_OK_STATUS,
amit.ghosh258d14c2020-10-02 15:13:38 +020032 Reason: dmi.Reason_UNDEFINED_REASON,
33 Events: &dmi.EventsCfg{
34 Items: events,
35 },
36 }, nil
37}
38
39//UpdateEventsConfiguration updates the configuration of the list of events in the request
40func (dms *DmiAPIServer) UpdateEventsConfiguration(ctx context.Context, req *dmi.EventsConfigurationRequest) (*dmi.EventsConfigurationResponse, error) {
41 logger.Debugf("UpdateEventsConfiguration called with request %+v", req)
42 return &dmi.EventsConfigurationResponse{
Humera Kousera4442952020-11-23 23:51:19 +053043 Status: dmi.Status_OK_STATUS,
amit.ghosh258d14c2020-10-02 15:13:38 +020044 }, nil
45}