blob: 8e6e1878b94c2763032e8eae28110e17ea9d19a0 [file] [log] [blame]
Holger Hildebrandt0f9b88d2020-04-20 13:33:25 +00001/*
2 * Copyright 2020-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
17//Package adaptercoreonu provides the utility for onu devices, flows and statistics
18package adaptercoreonu
19
20import (
dbainbri4d3a0dc2020-12-02 00:33:42 +000021 "context"
Holger Hildebrandt0f9b88d2020-04-20 13:33:25 +000022 "errors"
Girish Gowdra50e56422021-06-01 16:46:04 -070023 //"github.com/opencord/voltha-lib-go/v5/pkg/log"
Holger Hildebrandt0f9b88d2020-04-20 13:33:25 +000024)
25
26/*
27OpenOmciAgentDefaults = {
28 'mib-synchronizer': {
29 'state-machine': MibSynchronizer, # Implements the MIB synchronization state machine
30 'database': MibDbVolatileDict, # Implements volatile ME MIB database
31 # 'database': MibDbExternal, # Implements persistent ME MIB database
32 'advertise-events': True, # Advertise events on OpenOMCI event bus
33 'audit-delay': 60, # Time to wait between MIB audits. 0 to disable audits.
34 'tasks': {
35 'mib-upload': MibUploadTask,
36 'mib-template': MibTemplateTask,
37 'get-mds': GetMdsTask,
38 'mib-audit': GetMdsTask,
39 'mib-resync': MibResyncTask,
40 'mib-reconcile': MibReconcileTask
41 }
42 },
43 'omci-capabilities': {
44 'state-machine': OnuOmciCapabilities, # Implements OMCI capabilities state machine
45 'advertise-events': False, # Advertise events on OpenOMCI event bus
46 'tasks': {
47 'get-capabilities': OnuCapabilitiesTask # Get supported ME and Commands
48 }
49 },
50 'performance-intervals': {
51 'state-machine': PerformanceIntervals, # Implements PM Intervals State machine
52 'advertise-events': False, # Advertise events on OpenOMCI event bus
53 'tasks': {
54 'sync-time': SyncTimeTask,
55 'collect-data': IntervalDataTask,
56 'create-pm': OmciCreatePMRequest,
57 'delete-pm': OmciDeletePMRequest,
58 },
59 },
60 'alarm-synchronizer': {
61 'state-machine': AlarmSynchronizer, # Implements the Alarm sync state machine
62 'database': AlarmDbExternal, # For any State storage needs
63 'advertise-events': True, # Advertise events on OpenOMCI event bus
64 'tasks': {
65 'alarm-resync': AlarmResyncTask
66 }
67 },
68 'image_downloader': {
69 'state-machine': ImageDownloadeSTM,
70 'advertise-event': True,
71 'tasks': {
72 'download-file': FileDownloadTask
73 }
74 },
75 'image_upgrader': {
76 'state-machine': OmciSoftwareImageDownloadSTM,
77 'advertise-event': True,
78 'tasks': {
79 'omci_upgrade_task': OmciSwImageUpgradeTask
80 }
81 }
82 # 'image_activator': {
83 # 'state-machine': OmciSoftwareImageActivateSTM,
84 # 'advertise-event': True,
85 # }
86}
87*/
88
Holger Hildebrandt0f9b88d2020-04-20 13:33:25 +000089//suppose global methods per adapter ...
dbainbri4d3a0dc2020-12-02 00:33:42 +000090func mibDbVolatileDictImpl(ctx context.Context) error {
91 logger.Debug(ctx, "MibVolatileDict-called")
Holger Hildebrandt0f9b88d2020-04-20 13:33:25 +000092 return errors.New("not_implemented")
93}
94
Himani Chawla6d2ae152020-09-02 13:11:20 +053095/*
96func alarmDbDictImpl() error {
Holger Hildebrandt0f9b88d2020-04-20 13:33:25 +000097 logger.Debug("AlarmDb-called")
98 return errors.New("not_implemented")
99}
Himani Chawla6d2ae152020-09-02 13:11:20 +0530100*/