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