blob: 15109cb6d8ff2b9d507629ceea6a7ff3be69a2a9 [file] [log] [blame]
Takahiro Suzuki241c10e2020-12-17 20:17:57 +09001/*
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 (
21 "errors"
22)
23
24/*
25OpenOmciAgentDefaults = {
26 'mib-synchronizer': {
27 'state-machine': MibSynchronizer, # Implements the MIB synchronization state machine
28 'database': MibDbVolatileDict, # Implements volatile ME MIB database
29 # 'database': MibDbExternal, # Implements persistent ME MIB database
30 'advertise-events': True, # Advertise events on OpenOMCI event bus
31 'audit-delay': 60, # Time to wait between MIB audits. 0 to disable audits.
32 'tasks': {
33 'mib-upload': MibUploadTask,
34 'mib-template': MibTemplateTask,
35 'get-mds': GetMdsTask,
36 'mib-audit': GetMdsTask,
37 'mib-resync': MibResyncTask,
38 'mib-reconcile': MibReconcileTask
39 }
40 },
41 'omci-capabilities': {
42 'state-machine': OnuOmciCapabilities, # Implements OMCI capabilities state machine
43 'advertise-events': False, # Advertise events on OpenOMCI event bus
44 'tasks': {
45 'get-capabilities': OnuCapabilitiesTask # Get supported ME and Commands
46 }
47 },
48 'performance-intervals': {
49 'state-machine': PerformanceIntervals, # Implements PM Intervals State machine
50 'advertise-events': False, # Advertise events on OpenOMCI event bus
51 'tasks': {
52 'sync-time': SyncTimeTask,
53 'collect-data': IntervalDataTask,
54 'create-pm': OmciCreatePMRequest,
55 'delete-pm': OmciDeletePMRequest,
56 },
57 },
58 'alarm-synchronizer': {
59 'state-machine': AlarmSynchronizer, # Implements the Alarm sync state machine
60 'database': AlarmDbExternal, # For any State storage needs
61 'advertise-events': True, # Advertise events on OpenOMCI event bus
62 'tasks': {
63 'alarm-resync': AlarmResyncTask
64 }
65 },
66 'image_downloader': {
67 'state-machine': ImageDownloadeSTM,
68 'advertise-event': True,
69 'tasks': {
70 'download-file': FileDownloadTask
71 }
72 },
73 'image_upgrader': {
74 'state-machine': OmciSoftwareImageDownloadSTM,
75 'advertise-event': True,
76 'tasks': {
77 'omci_upgrade_task': OmciSwImageUpgradeTask
78 }
79 }
80 # 'image_activator': {
81 # 'state-machine': OmciSoftwareImageActivateSTM,
82 # 'advertise-event': True,
83 # }
84}
85*/
86
87// do not use MibAudit
88const cMibAuditDelayImpl = 0
89
90//suppose global methods per adapter ...
91func mibDbVolatileDictImpl() error {
92 logger.Debug("MibVolatileDict-called")
93 return errors.New("not_implemented")
94}
95
96/*
97func alarmDbDictImpl() error {
98 logger.Debug("AlarmDb-called")
99 return errors.New("not_implemented")
100}
101*/