Holger Hildebrandt | 0f9b88d | 2020-04-20 13:33:25 +0000 | [diff] [blame] | 1 | /* |
| 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 |
| 18 | package adaptercoreonu |
| 19 | |
| 20 | import ( |
dbainbri | 4d3a0dc | 2020-12-02 00:33:42 +0000 | [diff] [blame] | 21 | "context" |
Holger Hildebrandt | 0f9b88d | 2020-04-20 13:33:25 +0000 | [diff] [blame] | 22 | "errors" |
Girish Gowdra | 50e5642 | 2021-06-01 16:46:04 -0700 | [diff] [blame] | 23 | //"github.com/opencord/voltha-lib-go/v5/pkg/log" |
Holger Hildebrandt | 0f9b88d | 2020-04-20 13:33:25 +0000 | [diff] [blame] | 24 | ) |
| 25 | |
| 26 | /* |
| 27 | OpenOmciAgentDefaults = { |
| 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 Hildebrandt | 0f9b88d | 2020-04-20 13:33:25 +0000 | [diff] [blame] | 89 | //suppose global methods per adapter ... |
dbainbri | 4d3a0dc | 2020-12-02 00:33:42 +0000 | [diff] [blame] | 90 | func mibDbVolatileDictImpl(ctx context.Context) error { |
| 91 | logger.Debug(ctx, "MibVolatileDict-called") |
Holger Hildebrandt | 0f9b88d | 2020-04-20 13:33:25 +0000 | [diff] [blame] | 92 | return errors.New("not_implemented") |
| 93 | } |
| 94 | |
Himani Chawla | 6d2ae15 | 2020-09-02 13:11:20 +0530 | [diff] [blame] | 95 | /* |
| 96 | func alarmDbDictImpl() error { |
Holger Hildebrandt | 0f9b88d | 2020-04-20 13:33:25 +0000 | [diff] [blame] | 97 | logger.Debug("AlarmDb-called") |
| 98 | return errors.New("not_implemented") |
| 99 | } |
Himani Chawla | 6d2ae15 | 2020-09-02 13:11:20 +0530 | [diff] [blame] | 100 | */ |