From c489a2eb22484e798c39a978bc8b61821b92322f Mon Sep 17 00:00:00 2001 From: an4828 Date: Mon, 22 Jan 2018 17:17:34 -0500 Subject: TCA: Replace any openecomp reference by onap Change-Id: I7c6d812ab5c1d7b30c63653d1974b0b1abc099be Signed-off-by: an4828 Issue-ID: DCAEGEN2-224 Signed-off-by: an4828 --- .../model/BaseDynamicPropertiesProvider.java | 69 +++++ .../apod/analytics/model/DCAEAnalyticsModel.java | 32 +++ .../analytics/model/DynamicPropertiesProvider.java | 56 ++++ .../apod/analytics/model/config/ConfigModel.java | 33 +++ .../model/config/tca/BaseTCAAppConfigModel.java | 37 +++ .../analytics/model/config/tca/BaseTCAHandle.java | 38 +++ .../apod/analytics/model/config/tca/DMAAPInfo.java | 45 +++ .../model/config/tca/StreamsPublishes.java | 37 +++ .../model/config/tca/StreamsSubscribes.java | 37 +++ .../model/config/tca/TCAAppConfigModel.java | 34 +++ .../model/config/tca/TCAControllerAppConfig.java | 42 +++ .../analytics/model/config/tca/TCAHandleIn.java | 39 +++ .../analytics/model/config/tca/TCAHandleOut.java | 39 +++ .../analytics/model/domain/cef/AlertAction.java | 32 +++ .../apod/analytics/model/domain/cef/AlertType.java | 44 +++ .../analytics/model/domain/cef/BaseCEFModel.java | 39 +++ .../apod/analytics/model/domain/cef/CEFModel.java | 32 +++ .../model/domain/cef/CommonEventHeader.java | 181 ++++++++++++ .../analytics/model/domain/cef/Criticality.java | 31 +++ .../apod/analytics/model/domain/cef/Domain.java | 41 +++ .../apod/analytics/model/domain/cef/Event.java | 61 ++++ .../analytics/model/domain/cef/EventListener.java | 45 +++ .../analytics/model/domain/cef/EventSeverity.java | 36 +++ .../apod/analytics/model/domain/cef/Field.java | 53 ++++ .../model/domain/cef/InternalHeaderFields.java | 38 +++ .../domain/cef/MeasurementsForVfScalingFields.java | 81 ++++++ .../model/domain/cef/NamedArrayOfFields.java | 55 ++++ .../model/domain/cef/PerformanceCounter.java | 68 +++++ .../apod/analytics/model/domain/cef/Priority.java | 34 +++ .../domain/cef/ThresholdCrossingAlertFields.java | 158 +++++++++++ .../model/domain/cef/VNicPerformance.java | 308 +++++++++++++++++++++ .../analytics/model/domain/policy/PolicyModel.java | 33 +++ .../domain/policy/tca/BaseTCAPolicyModel.java | 37 +++ .../domain/policy/tca/ClosedLoopEventStatus.java | 34 +++ .../domain/policy/tca/ControlLoopSchemaType.java | 33 +++ .../model/domain/policy/tca/Direction.java | 76 +++++ .../domain/policy/tca/MetricsPerEventName.java | 115 ++++++++ .../model/domain/policy/tca/TCAPolicy.java | 58 ++++ .../model/domain/policy/tca/TCAPolicyModel.java | 35 +++ .../model/domain/policy/tca/Threshold.java | 127 +++++++++ .../apod/analytics/model/facade/FacadeModel.java | 33 +++ .../dcae/apod/analytics/model/facade/tca/AAI.java | 41 +++ .../analytics/model/facade/tca/TCAFacadeModel.java | 31 +++ .../analytics/model/facade/tca/TCAVESResponse.java | 50 ++++ .../model/util/AnalyticsModelIOUtils.java | 132 +++++++++ .../model/util/AnalyticsModelJsonUtils.java | 104 +++++++ .../json/AnalyticsModelObjectMapperSupplier.java | 115 ++++++++ .../model/util/json/CommonEventFormatModule.java | 96 +++++++ .../model/util/json/TCAControllerConfigModule.java | 59 ++++ .../model/util/json/TCAFacadeModelModule.java | 49 ++++ .../analytics/model/util/json/TCAPolicyModule.java | 64 +++++ .../mixin/BaseDynamicPropertiesProviderMixin.java | 61 ++++ .../analytics/model/util/json/mixin/JsonMixin.java | 31 +++ .../util/json/mixin/cef/AlertActionMixin.java | 30 ++ .../model/util/json/mixin/cef/AlertTypeMixin.java | 61 ++++ .../util/json/mixin/cef/BaseCEFModelMixin.java | 31 +++ .../json/mixin/cef/CommonEventHeaderMixin.java | 27 ++ .../util/json/mixin/cef/CriticalityMixin.java | 30 ++ .../model/util/json/mixin/cef/DomainMixin.java | 30 ++ .../util/json/mixin/cef/EventListenerMixin.java | 29 ++ .../model/util/json/mixin/cef/EventMixin.java | 29 ++ .../util/json/mixin/cef/EventSeverityMixin.java | 30 ++ .../model/util/json/mixin/cef/FieldMixin.java | 28 ++ .../json/mixin/cef/InternalHeaderFieldsMixin.java | 28 ++ .../cef/MeasurementsForVfScalingFieldsMixin.java | 39 +++ .../json/mixin/cef/NamedArrayOfFieldsMixin.java | 28 ++ .../json/mixin/cef/PerformanceCounterMixin.java | 29 ++ .../model/util/json/mixin/cef/PriorityMixin.java | 30 ++ .../cef/ThresholdCrossingAlertFieldsMixin.java | 29 ++ .../util/json/mixin/cef/VNicUsageArrayMixin.java | 36 +++ .../config/tca/BaseTCAAppConfigModelMixin.java | 29 ++ .../json/mixin/config/tca/BaseTCAHandleMixin.java | 40 +++ .../util/json/mixin/config/tca/DMAAPInfoMixin.java | 33 +++ .../mixin/config/tca/StreamsPublishesMixin.java | 34 +++ .../mixin/config/tca/StreamsSubscribesMixin.java | 34 +++ .../config/tca/TCAControllerAppConfigMixin.java | 37 +++ .../model/util/json/mixin/facade/tca/AAIMixin.java | 55 ++++ .../facade/tca/VESCEFMessageResponseMixin.java | 56 ++++ .../mixin/policy/tca/BaseTCAPolicyModelMixin.java | 30 ++ .../policy/tca/ClosedLoopEventStatusMixin.java | 30 ++ .../policy/tca/ControlLoopSchemaTypeMixin.java | 29 ++ .../util/json/mixin/policy/tca/DirectionMixin.java | 30 ++ .../mixin/policy/tca/MetricsPerEventNameMixin.java | 28 ++ .../util/json/mixin/policy/tca/TCAPolicyMixin.java | 28 ++ .../util/json/mixin/policy/tca/ThresholdMixin.java | 46 +++ .../model/BaseDynamicPropertiesProvider.java | 69 ----- .../apod/analytics/model/DCAEAnalyticsModel.java | 32 --- .../analytics/model/DynamicPropertiesProvider.java | 56 ---- .../apod/analytics/model/config/ConfigModel.java | 33 --- .../model/config/tca/BaseTCAAppConfigModel.java | 37 --- .../analytics/model/config/tca/BaseTCAHandle.java | 38 --- .../apod/analytics/model/config/tca/DMAAPInfo.java | 45 --- .../model/config/tca/StreamsPublishes.java | 37 --- .../model/config/tca/StreamsSubscribes.java | 37 --- .../model/config/tca/TCAAppConfigModel.java | 34 --- .../model/config/tca/TCAControllerAppConfig.java | 42 --- .../analytics/model/config/tca/TCAHandleIn.java | 39 --- .../analytics/model/config/tca/TCAHandleOut.java | 39 --- .../analytics/model/domain/cef/AlertAction.java | 32 --- .../apod/analytics/model/domain/cef/AlertType.java | 44 --- .../analytics/model/domain/cef/BaseCEFModel.java | 39 --- .../apod/analytics/model/domain/cef/CEFModel.java | 32 --- .../model/domain/cef/CommonEventHeader.java | 181 ------------ .../analytics/model/domain/cef/Criticality.java | 31 --- .../apod/analytics/model/domain/cef/Domain.java | 41 --- .../apod/analytics/model/domain/cef/Event.java | 61 ---- .../analytics/model/domain/cef/EventListener.java | 45 --- .../analytics/model/domain/cef/EventSeverity.java | 36 --- .../apod/analytics/model/domain/cef/Field.java | 53 ---- .../model/domain/cef/InternalHeaderFields.java | 38 --- .../domain/cef/MeasurementsForVfScalingFields.java | 81 ------ .../model/domain/cef/NamedArrayOfFields.java | 55 ---- .../model/domain/cef/PerformanceCounter.java | 68 ----- .../apod/analytics/model/domain/cef/Priority.java | 34 --- .../domain/cef/ThresholdCrossingAlertFields.java | 158 ----------- .../model/domain/cef/VNicPerformance.java | 308 --------------------- .../analytics/model/domain/policy/PolicyModel.java | 33 --- .../domain/policy/tca/BaseTCAPolicyModel.java | 37 --- .../domain/policy/tca/ClosedLoopEventStatus.java | 34 --- .../domain/policy/tca/ControlLoopSchemaType.java | 33 --- .../model/domain/policy/tca/Direction.java | 76 ----- .../domain/policy/tca/MetricsPerEventName.java | 115 -------- .../model/domain/policy/tca/TCAPolicy.java | 58 ---- .../model/domain/policy/tca/TCAPolicyModel.java | 35 --- .../model/domain/policy/tca/Threshold.java | 127 --------- .../apod/analytics/model/facade/FacadeModel.java | 33 --- .../dcae/apod/analytics/model/facade/tca/AAI.java | 41 --- .../analytics/model/facade/tca/TCAFacadeModel.java | 31 --- .../analytics/model/facade/tca/TCAVESResponse.java | 50 ---- .../model/util/AnalyticsModelIOUtils.java | 132 --------- .../model/util/AnalyticsModelJsonUtils.java | 104 ------- .../json/AnalyticsModelObjectMapperSupplier.java | 115 -------- .../model/util/json/CommonEventFormatModule.java | 96 ------- .../model/util/json/TCAControllerConfigModule.java | 59 ---- .../model/util/json/TCAFacadeModelModule.java | 49 ---- .../analytics/model/util/json/TCAPolicyModule.java | 64 ----- .../mixin/BaseDynamicPropertiesProviderMixin.java | 61 ---- .../analytics/model/util/json/mixin/JsonMixin.java | 31 --- .../util/json/mixin/cef/AlertActionMixin.java | 30 -- .../model/util/json/mixin/cef/AlertTypeMixin.java | 61 ---- .../util/json/mixin/cef/BaseCEFModelMixin.java | 31 --- .../json/mixin/cef/CommonEventHeaderMixin.java | 27 -- .../util/json/mixin/cef/CriticalityMixin.java | 30 -- .../model/util/json/mixin/cef/DomainMixin.java | 30 -- .../util/json/mixin/cef/EventListenerMixin.java | 29 -- .../model/util/json/mixin/cef/EventMixin.java | 29 -- .../util/json/mixin/cef/EventSeverityMixin.java | 30 -- .../model/util/json/mixin/cef/FieldMixin.java | 28 -- .../json/mixin/cef/InternalHeaderFieldsMixin.java | 28 -- .../cef/MeasurementsForVfScalingFieldsMixin.java | 39 --- .../json/mixin/cef/NamedArrayOfFieldsMixin.java | 28 -- .../json/mixin/cef/PerformanceCounterMixin.java | 29 -- .../model/util/json/mixin/cef/PriorityMixin.java | 30 -- .../cef/ThresholdCrossingAlertFieldsMixin.java | 29 -- .../util/json/mixin/cef/VNicUsageArrayMixin.java | 36 --- .../config/tca/BaseTCAAppConfigModelMixin.java | 29 -- .../json/mixin/config/tca/BaseTCAHandleMixin.java | 40 --- .../util/json/mixin/config/tca/DMAAPInfoMixin.java | 33 --- .../mixin/config/tca/StreamsPublishesMixin.java | 34 --- .../mixin/config/tca/StreamsSubscribesMixin.java | 34 --- .../config/tca/TCAControllerAppConfigMixin.java | 37 --- .../model/util/json/mixin/facade/tca/AAIMixin.java | 55 ---- .../facade/tca/VESCEFMessageResponseMixin.java | 56 ---- .../mixin/policy/tca/BaseTCAPolicyModelMixin.java | 30 -- .../policy/tca/ClosedLoopEventStatusMixin.java | 30 -- .../policy/tca/ControlLoopSchemaTypeMixin.java | 29 -- .../util/json/mixin/policy/tca/DirectionMixin.java | 30 -- .../mixin/policy/tca/MetricsPerEventNameMixin.java | 28 -- .../util/json/mixin/policy/tca/TCAPolicyMixin.java | 28 -- .../util/json/mixin/policy/tca/ThresholdMixin.java | 46 --- 170 files changed, 4372 insertions(+), 4372 deletions(-) create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/BaseDynamicPropertiesProvider.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/DCAEAnalyticsModel.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/DynamicPropertiesProvider.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/ConfigModel.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/BaseTCAAppConfigModel.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/BaseTCAHandle.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/DMAAPInfo.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/StreamsPublishes.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/StreamsSubscribes.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/TCAAppConfigModel.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/TCAControllerAppConfig.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/TCAHandleIn.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/TCAHandleOut.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/AlertAction.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/AlertType.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/BaseCEFModel.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/CEFModel.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/CommonEventHeader.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Criticality.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Domain.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Event.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/EventListener.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/EventSeverity.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Field.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/InternalHeaderFields.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/MeasurementsForVfScalingFields.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/NamedArrayOfFields.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/PerformanceCounter.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Priority.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/ThresholdCrossingAlertFields.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/VNicPerformance.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/PolicyModel.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/BaseTCAPolicyModel.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/ClosedLoopEventStatus.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/ControlLoopSchemaType.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/Direction.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/MetricsPerEventName.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/TCAPolicy.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/TCAPolicyModel.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/Threshold.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/facade/FacadeModel.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/facade/tca/AAI.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/facade/tca/TCAFacadeModel.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/facade/tca/TCAVESResponse.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/AnalyticsModelIOUtils.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/AnalyticsModelJsonUtils.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/AnalyticsModelObjectMapperSupplier.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/CommonEventFormatModule.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/TCAControllerConfigModule.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/TCAFacadeModelModule.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/TCAPolicyModule.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/BaseDynamicPropertiesProviderMixin.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/JsonMixin.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/AlertActionMixin.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/AlertTypeMixin.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/BaseCEFModelMixin.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/CommonEventHeaderMixin.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/CriticalityMixin.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/DomainMixin.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/EventListenerMixin.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/EventMixin.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/EventSeverityMixin.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/FieldMixin.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/InternalHeaderFieldsMixin.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/MeasurementsForVfScalingFieldsMixin.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/NamedArrayOfFieldsMixin.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/PerformanceCounterMixin.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/PriorityMixin.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/ThresholdCrossingAlertFieldsMixin.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/cef/VNicUsageArrayMixin.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/BaseTCAAppConfigModelMixin.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/BaseTCAHandleMixin.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/DMAAPInfoMixin.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/StreamsPublishesMixin.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/StreamsSubscribesMixin.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/config/tca/TCAControllerAppConfigMixin.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/facade/tca/AAIMixin.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/facade/tca/VESCEFMessageResponseMixin.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/BaseTCAPolicyModelMixin.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/ClosedLoopEventStatusMixin.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/ControlLoopSchemaTypeMixin.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/DirectionMixin.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/MetricsPerEventNameMixin.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/TCAPolicyMixin.java create mode 100644 dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/mixin/policy/tca/ThresholdMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/BaseDynamicPropertiesProvider.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/DCAEAnalyticsModel.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/DynamicPropertiesProvider.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/ConfigModel.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/BaseTCAAppConfigModel.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/BaseTCAHandle.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/DMAAPInfo.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/StreamsPublishes.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/StreamsSubscribes.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/TCAAppConfigModel.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/TCAControllerAppConfig.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/TCAHandleIn.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/config/tca/TCAHandleOut.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/AlertAction.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/AlertType.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/BaseCEFModel.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/CEFModel.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/CommonEventHeader.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Criticality.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Domain.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Event.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/EventListener.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/EventSeverity.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Field.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/InternalHeaderFields.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/MeasurementsForVfScalingFields.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/NamedArrayOfFields.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/PerformanceCounter.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/Priority.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/ThresholdCrossingAlertFields.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/cef/VNicPerformance.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/PolicyModel.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/BaseTCAPolicyModel.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/ClosedLoopEventStatus.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/ControlLoopSchemaType.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/Direction.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/MetricsPerEventName.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/TCAPolicy.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/TCAPolicyModel.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/domain/policy/tca/Threshold.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/facade/FacadeModel.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/facade/tca/AAI.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/facade/tca/TCAFacadeModel.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/facade/tca/TCAVESResponse.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/AnalyticsModelIOUtils.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/AnalyticsModelJsonUtils.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/AnalyticsModelObjectMapperSupplier.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/CommonEventFormatModule.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/TCAControllerConfigModule.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/TCAFacadeModelModule.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/TCAPolicyModule.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/BaseDynamicPropertiesProviderMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/JsonMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/AlertActionMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/AlertTypeMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/BaseCEFModelMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/CommonEventHeaderMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/CriticalityMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/DomainMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/EventListenerMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/EventMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/EventSeverityMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/FieldMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/InternalHeaderFieldsMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/MeasurementsForVfScalingFieldsMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/NamedArrayOfFieldsMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/PerformanceCounterMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/PriorityMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/ThresholdCrossingAlertFieldsMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/cef/VNicUsageArrayMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/BaseTCAAppConfigModelMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/BaseTCAHandleMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/DMAAPInfoMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/StreamsPublishesMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/StreamsSubscribesMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/config/tca/TCAControllerAppConfigMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/facade/tca/AAIMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/facade/tca/VESCEFMessageResponseMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/BaseTCAPolicyModelMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/ClosedLoopEventStatusMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/ControlLoopSchemaTypeMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/DirectionMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/MetricsPerEventNameMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/TCAPolicyMixin.java delete mode 100644 dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/mixin/policy/tca/ThresholdMixin.java (limited to 'dcae-analytics-model/src/main/java') diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/BaseDynamicPropertiesProvider.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/BaseDynamicPropertiesProvider.java new file mode 100644 index 0000000..f50b859 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/BaseDynamicPropertiesProvider.java @@ -0,0 +1,69 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model; + +import lombok.Data; + +import java.util.LinkedHashMap; +import java.util.Map; + +/** + *

+ * Base Dynamic Provider provide functionality so that all the + * additional dynamic Properties can be accumalated in a map. + *

+ * + * @author Rajiv Singla . Creation Date: 11/5/2016. + */ +@Data +public abstract class BaseDynamicPropertiesProvider implements DynamicPropertiesProvider { + + /** + * All non-required properties should be captured in additional properties + * + * @param dynamicProperties Dynamic properties + * @return dynamic properties + */ + private Map dynamicProperties = new LinkedHashMap<>(); + + + /** + * Add a dynamic property to Common Event Format Entity + * + * @param propertyName property name + * @param propertyValue property value + */ + @Override + public void addDynamicProperties(String propertyName, Object propertyValue) { + dynamicProperties.put(propertyName, propertyValue); + } + + /** + * Determines if dynamic properties are present for the CEF Entity + * + * @return return true if Dynamic Properties are present + */ + public boolean isDynamicPropertiesPresent() { + return dynamicProperties.size() == 0; + } + + +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/DCAEAnalyticsModel.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/DCAEAnalyticsModel.java new file mode 100644 index 0000000..06fbea7 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/DCAEAnalyticsModel.java @@ -0,0 +1,32 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model; + +import java.io.Serializable; + +/** + *

+ * Marker Interface for all DCAE Analytics Model implementations + *

+ * @author Rajiv Singla . Creation Date: 11/5/2016. + */ +public interface DCAEAnalyticsModel extends Serializable { +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/DynamicPropertiesProvider.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/DynamicPropertiesProvider.java new file mode 100644 index 0000000..24b4fae --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/DynamicPropertiesProvider.java @@ -0,0 +1,56 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model; + +import java.util.Map; + +/** + *

+ * Problem: Many Entities have dynamic properties as well as known properties. + * Known properites can be binded explicitly with all dynamic properties need + * to be captured also ensuring that there must not be any loss in information + * during deserialization / serialization process. + *

+ *

+ * This contract allows the deserialization mechanism to catch those dynamic properties + * in a Map so that deserialization mechanism will not loose any information and + * can be serialized back with no loss in dynamic properties information + *

+ * @author Rajiv Singla . Creation Date: 10/18/2016. + */ +public interface DynamicPropertiesProvider extends DCAEAnalyticsModel { + + + /** + * Adds dynamic properties in a Map object + * + * @param propertyName property name + * @param propertyValue property value + */ + void addDynamicProperties(String propertyName, Object propertyValue); + + /** + * Provides dynamic properties map + * + * @return dynamic properties map object + */ + Map getDynamicProperties(); +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/ConfigModel.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/ConfigModel.java new file mode 100644 index 0000000..baa5e59 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/ConfigModel.java @@ -0,0 +1,33 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.config; + +import org.onap.dcae.apod.analytics.model.DCAEAnalyticsModel; + +/** + *

+ * Marker Interface for all Configuration Model Objects + *

+ * + * @author Rajiv Singla . Creation Date: 08/25/2017. + */ +public interface ConfigModel extends DCAEAnalyticsModel { +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/BaseTCAAppConfigModel.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/BaseTCAAppConfigModel.java new file mode 100644 index 0000000..7887756 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/BaseTCAAppConfigModel.java @@ -0,0 +1,37 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.config.tca; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.onap.dcae.apod.analytics.model.BaseDynamicPropertiesProvider; + +/** + *

+ * Base TCA App Config model class + *

+ * + * @author Rajiv Singla . Creation Date: 8/25/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public abstract class BaseTCAAppConfigModel extends BaseDynamicPropertiesProvider implements TCAAppConfigModel { +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/BaseTCAHandle.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/BaseTCAHandle.java new file mode 100644 index 0000000..fa1a1c8 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/BaseTCAHandle.java @@ -0,0 +1,38 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.config.tca; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * @author Rajiv Singla . Creation Date: 8/25/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public abstract class BaseTCAHandle extends BaseTCAAppConfigModel { + + private String aafPassword; + private String aafUserName; + private DMAAPInfo dmaapInfo; + private String type; + +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/DMAAPInfo.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/DMAAPInfo.java new file mode 100644 index 0000000..57b9007 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/DMAAPInfo.java @@ -0,0 +1,45 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.config.tca; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * DMaaP Information nested inside DMaaP Controller config + * + * @author Rajiv Singla . Creation Date: 8/25/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class DMAAPInfo extends BaseTCAAppConfigModel { + + private static final long serialVersionUID = 1L; + + /** + * DMaaP Topic URL + * + * @param topicUrl new value for DMaaP topic URL + * @return DMaaP Topic URL + */ + private String topicUrl; + +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/StreamsPublishes.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/StreamsPublishes.java new file mode 100644 index 0000000..03f65c4 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/StreamsPublishes.java @@ -0,0 +1,37 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.config.tca; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * @author Rajiv Singla . Creation Date: 8/25/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class StreamsPublishes extends BaseTCAAppConfigModel { + + private static final long serialVersionUID = 1L; + + private TCAHandleOut tcaHandleOut; + +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/StreamsSubscribes.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/StreamsSubscribes.java new file mode 100644 index 0000000..7f55a7c --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/StreamsSubscribes.java @@ -0,0 +1,37 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.config.tca; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * @author Rajiv Singla . Creation Date: 8/25/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class StreamsSubscribes extends BaseTCAAppConfigModel { + + private static final long serialVersionUID = 1L; + + private TCAHandleIn tcaHandleIn; + +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/TCAAppConfigModel.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/TCAAppConfigModel.java new file mode 100644 index 0000000..c0206ef --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/TCAAppConfigModel.java @@ -0,0 +1,34 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.config.tca; + +import org.onap.dcae.apod.analytics.model.config.ConfigModel; + +/** + *

+ * Marker Interface for all TCA Facade Models + *

+ * + * @author Rajiv Singla . Creation Date: 8/25/2017. + */ +public interface TCAAppConfigModel extends ConfigModel { + +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/TCAControllerAppConfig.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/TCAControllerAppConfig.java new file mode 100644 index 0000000..51eb6fe --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/TCAControllerAppConfig.java @@ -0,0 +1,42 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.config.tca; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * Model Object Representing the App Config passed in by the controller + * + * @author Rajiv Singla . Creation Date: 8/25/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class TCAControllerAppConfig extends BaseTCAAppConfigModel { + + private static final long serialVersionUID = 1L; + + private String appName; + private String appDescription; + private StreamsPublishes streamsPublishes; + private StreamsSubscribes streamsSubscribes; + +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/TCAHandleIn.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/TCAHandleIn.java new file mode 100644 index 0000000..e035b85 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/TCAHandleIn.java @@ -0,0 +1,39 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.config.tca; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * TCA Controller App Config - TCA Handle In + *

+ * + * @author Rajiv Singla . Creation Date: 8/25/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class TCAHandleIn extends BaseTCAHandle { + + private static final long serialVersionUID = 1L; + +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/TCAHandleOut.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/TCAHandleOut.java new file mode 100644 index 0000000..c3c1f54 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/config/tca/TCAHandleOut.java @@ -0,0 +1,39 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.config.tca; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * TCA Controller App Config - TCA Handle Out + *

+ * + * @author Rajiv Singla . Creation Date: 8/25/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class TCAHandleOut extends BaseTCAHandle { + + private static final long serialVersionUID = 1L; + +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/AlertAction.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/AlertAction.java new file mode 100644 index 0000000..09ff85a --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/AlertAction.java @@ -0,0 +1,32 @@ +/* + * ============LICENSE_START========================================================= + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +/** + * Common Event Format Alert Action + * + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +public enum AlertAction implements CEFModel { + + CLEAR, CONT, SET + +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/AlertType.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/AlertType.java new file mode 100644 index 0000000..f42c331 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/AlertType.java @@ -0,0 +1,44 @@ +/* + * ============LICENSE_START========================================================= + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +/** + * + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +public enum AlertType implements CEFModel { + + CARD_ANOMALY("CARD-ANOMALY"), + ELEMENT_ANOMALY("ELEMENT-ANOMALY"), + INTERFACE_ANOMALY("INTERFACE-ANOMALY"), + SERVICE_ANOMALY("SERVICE-ANOMALY"), + UNKNOWN(null); + + private final String name; + + AlertType(String name) { + this.name = name; + } + + public String getName() { + return name; + } +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/BaseCEFModel.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/BaseCEFModel.java new file mode 100644 index 0000000..641db1e --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/BaseCEFModel.java @@ -0,0 +1,39 @@ +/* + * ============LICENSE_START========================================================= + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.onap.dcae.apod.analytics.model.BaseDynamicPropertiesProvider; + +/** + *

+ * Base CEF Model should be extended by all CEF Model Entities. + * By extending CEF Model all the additional dynamic Properties + * can be accumalated in a map. + *

+ * + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public abstract class BaseCEFModel extends BaseDynamicPropertiesProvider implements CEFModel { +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/CEFModel.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/CEFModel.java new file mode 100644 index 0000000..665bd38 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/CEFModel.java @@ -0,0 +1,32 @@ +/* + * ============LICENSE_START========================================================= + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +import org.onap.dcae.apod.analytics.model.DCAEAnalyticsModel; + +/** + *

+ * Marker interface for all DCAE Analytics Common Event Format Model implementations + *

+ * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +public interface CEFModel extends DCAEAnalyticsModel { +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/CommonEventHeader.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/CommonEventHeader.java new file mode 100644 index 0000000..468ab91 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/CommonEventHeader.java @@ -0,0 +1,181 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * Fields common to all Events + *

+ * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class CommonEventHeader extends BaseCEFModel { + + + private static final long serialVersionUID = 1L; + + /** + * The eventing domain associated with this event + * + * @param domain New value for domain + * @return The eventing domain associated with this event + */ + private Domain domain; + + /** + * Event key that is unique to the event source + * + * @param eventId New value for event key + * @return Event key that is unique to the event source + */ + private String eventId; + + /** + * Unique event name + * + * @param eventName New value for event name + * @return Unique event name + */ + private String eventName; + + + /** + * Event type e.g. applicationVnf, guestOS, hostOS, platform + * + * @param eventType New value for event type + * @return Event type e.g. applicationVnf, guestOS, hostOS, platform + */ + private String eventType; + + + /** + * Enrichment fields for internal VES Event Listener service use only, not supplied by event sources + * + * @param internalHeaderFields new value for internal Header Fields + * @return Enrichment fields for internal VES Event Listener service use only, not supplied by event sources + */ + private InternalHeaderFields internalHeaderFields; + + + /** + * The latest unix time aka epoch time associated with the event from any component--as microseconds elapsed since + * 1 Jan 1970 not including leap seconds + * + * @param lastEpochMicrosec New value for last Epoc Microsec + * @return The latest unix time associated with the event from any component + */ + private Long lastEpochMicrosec; + + + /** + * Three character network function component type as aligned with vfc naming standards + * + * @param nfcNamingCode New value for nfc naming code + * @return Three character network function component type as aligned with vfc naming standards + */ + private String nfcNamingCode; + + + /** + * Four character network function type as aligned with vnf naming standards + * + * @param nfNamingCode New value for nf naming code + * @return Four character network function type as aligned with vnf naming standards + */ + private String nfNamingCode; + + + /** + * Processing Priority + * + * @param priority New value for processing Priority + * @return Processing Priority + */ + private Priority priority; + + + /** + * UUID identifying the entity reporting the event, for example an OAM VM; must be populated by the + * enrichment process + * + * @param reportingEntityId New value for reporting entity Id. Must be populated by the enrichment process + * @return UUID identifying the entity reporting the event populated by the enrichment process + */ + private String reportingEntityId; + + + /** + * Name of the entity reporting the event, for example, an EMS name; may be the same as sourceName + * + * @param reportingEntityName New value for reporting Entity Name + * @return Name of the entity reporting the event, may be the same as sourceName + */ + private String reportingEntityName; + + + /** + * Ordering of events communicated by an event source instance or 0 if not needed + * + * @param sequence New value for Sequence + * @return Ordering of events communicated by an event source instance or 0 if not needed + */ + private Integer sequence; + + + /** + * UUID identifying the entity experiencing the event issue; must be populated by the enrichment process + * + * @param sourceId New value for source id. Must be populated by the enrichment process + * @return UUID identifying the entity experiencing the event issue + */ + private String sourceId; + + + /** + * Name of the entity experiencing the event issue + * + * @param sourceName New value for source name + * @return Name of the entity experiencing the event issue + */ + private String sourceName; + + + /** + * the earliest unix time aka epoch time associated with the event from any component--as microseconds elapsed + * since 1 Jan 1970 not including leap seconds + * + * @param startEpochMicrosec New value for start Epoc Microsec + * @return The earliest unix time associated with the event from any component + */ + private Long startEpochMicrosec; + + + /** + * Version of the event header + * + * @param version New value for version of the event header + * @return Version of the event header + */ + private Float version; +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Criticality.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Criticality.java new file mode 100644 index 0000000..c48159a --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Criticality.java @@ -0,0 +1,31 @@ +/* + * ============LICENSE_START========================================================= + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +/** + * Performance Criticality + * + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +public enum Criticality implements CEFModel { + + CRIT, MAJ, UNKNOWN +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Domain.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Domain.java new file mode 100644 index 0000000..1cee639 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Domain.java @@ -0,0 +1,41 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +/** + * Eventing domain associated with the event + *

+ * @author Rajiv Singla . Creation Date: 08/15/2017. + */ +public enum Domain implements CEFModel { + + fault, + heartbeat, + measurementsForVfScaling, + mobileFlow, + other, + sipSignaling, + stateChange, + syslog, + thresholdCrossingAlert, + voiceQuality; + +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Event.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Event.java new file mode 100644 index 0000000..9f13075 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Event.java @@ -0,0 +1,61 @@ +/* + * ============LICENSE_START========================================================= + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * Generic Event Format + *

+ * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class Event extends BaseCEFModel { + + + private static final long serialVersionUID = 1L; + + /** + * Fields common to all Events + * + * @param commonEventHeader New value for common Event Header + * @return Fields common to all Events + */ + private CommonEventHeader commonEventHeader; + + /** + * Measurements for Vf scaling fields + * + * @param measurementsForVfScalingFields New value for MeasurementsForVfScaling + * @return MeasurementsForVfScaling fields + */ + private MeasurementsForVfScalingFields measurementsForVfScalingFields; + + /** + * Threshold crossing alert Fields. + * + * @param thresholdCrossingAlertFields New value for Threshold crossing Fields + * @return Threshold crossing Fields + */ + private ThresholdCrossingAlertFields thresholdCrossingAlertFields; +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/EventListener.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/EventListener.java new file mode 100644 index 0000000..06cee58 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/EventListener.java @@ -0,0 +1,45 @@ +/* + * ============LICENSE_START========================================================= + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * Common Event Format - Base Event Listener + *

+ * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class EventListener extends BaseCEFModel { + + + private static final long serialVersionUID = 1L; + + /** + * Common Event Format - Event + * + * @param event New value for Event + * @return Common Event Format Event + */ + private Event event; +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/EventSeverity.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/EventSeverity.java new file mode 100644 index 0000000..340d0de --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/EventSeverity.java @@ -0,0 +1,36 @@ +/* + * ============LICENSE_START========================================================= + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +/** + * CEF Event severity or priority + * + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +public enum EventSeverity implements CEFModel { + + //NOTE: enum order must not be changed. Events severity is ordered from high to low + CRITICAL, + MAJOR, + MINOR, + WARNING, + NORMAL +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Field.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Field.java new file mode 100644 index 0000000..2f2a2f0 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Field.java @@ -0,0 +1,53 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * Name Value Pair + *

+ * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class Field extends BaseCEFModel { + + private static final long serialVersionUID = 1L; + + /** + * Name of the Field + * + * @param name New name for the Field + * @return Name of the Field + */ + private String name; + + /** + * Value of the Field + * + * @param value New value for the Field + * @return Value of the Field + */ + private String value; + +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/InternalHeaderFields.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/InternalHeaderFields.java new file mode 100644 index 0000000..4007a42 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/InternalHeaderFields.java @@ -0,0 +1,38 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * Enrichment fields for internal VES Event Listener service use only, not supplied by event sources + *

+ * + * @author Rajiv Singla . Creation Date: 08/15/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class InternalHeaderFields extends BaseCEFModel { + + private static final long serialVersionUID = 1L; + +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/MeasurementsForVfScalingFields.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/MeasurementsForVfScalingFields.java new file mode 100644 index 0000000..73b8df2 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/MeasurementsForVfScalingFields.java @@ -0,0 +1,81 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.List; + +/** + * Common Event Format - MeasurementsForVfScaling fields + *

+ * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class MeasurementsForVfScalingFields extends BaseCEFModel { + + private static final long serialVersionUID = 1L; + + /** + * Additional name-value-pair fields + * + * @param additionalFields New value for additional name-value-pair fields + * @return Additional name-value-pair fields + */ + private List additionalFields; + + + /** + * Array of named name-value-pair arrays for additional Measurements + * + * @param additionalMeasurements New value for array of named name-value-pair arrays for additional Measurements + * @return Array of named name-value-pair arrays for additional Measurements + */ + private List additionalMeasurements; + + /** + * Interval over which measurements are being reported in seconds + * + * @param measurementInterval New value for measurement Interval + * @return Interval over which measurements are being reported in seconds + */ + private Long measurementInterval; + + /** + * Version of the measurementsForVfScaling block + * + * @param measurementsForVfScalingVersion New value for measurementsForVfScaling block + * @return Version of the measurementsForVfScaling block + */ + private Float measurementsForVfScalingVersion; + + /** + * Usage of an array of virtual network interface cards + * + * @param vNicPerformanceArray New value for Usage of an array of virtual network interface cards + * @return Usage of an array of virtual network interface cards + */ + private List vNicPerformanceArray; + + +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/NamedArrayOfFields.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/NamedArrayOfFields.java new file mode 100644 index 0000000..6ab9e58 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/NamedArrayOfFields.java @@ -0,0 +1,55 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.List; + +/** + * An array of name value pairs along with a name for the array + *

+ * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class NamedArrayOfFields extends BaseCEFModel { + + private static final long serialVersionUID = 1L; + + /** + * Name of the NamedArrayOfFields + * + * @param name New name for the Field + * @return Name of the Field + */ + private String name; + + /** + * Array of name value pairs + * + * @param arrayOfFields New value for array of name value pairs + * @return Array of name value pairs + */ + private List arrayOfFields; + +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/PerformanceCounter.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/PerformanceCounter.java new file mode 100644 index 0000000..5ab1ef8 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/PerformanceCounter.java @@ -0,0 +1,68 @@ +/* + * ============LICENSE_START========================================================= + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * Common Event Format - Performance PerformanceCounter + * + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class PerformanceCounter extends BaseCEFModel { + + private static final long serialVersionUID = 1L; + + /** + * Performance Counter Criticality. + * + * @param criticality New value for Criticality + * @return Performance Counter Criticality + */ + private Criticality criticality; + + /** + * Performance Counter Name + * + * @param name New value for Performance counter name + * @return Performance Counter Name + */ + private String name; + + /** + * Performance Counter for Threshold Crossed. + * + * @param thresholdCrossed New value for Performance Counter Threshold Crossed + * @return Performance Counter Threshold Crossed + */ + private String thresholdCrossed; + + /** + * Performance Counter Value. + * + * @param value New Performance Counter Value + * @return Performance Counter Value + */ + private String value; +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Priority.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Priority.java new file mode 100644 index 0000000..8b5304b --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/Priority.java @@ -0,0 +1,34 @@ +/* + * ============LICENSE_START========================================================= + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +/** + * Common Event Format - Event processing priority + *

+ * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +public enum Priority implements CEFModel { + + High, + Medium, + Normal, + Low +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/ThresholdCrossingAlertFields.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/ThresholdCrossingAlertFields.java new file mode 100644 index 0000000..39adbdd --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/ThresholdCrossingAlertFields.java @@ -0,0 +1,158 @@ +/* + * ============LICENSE_START========================================================= + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * Common Event Format - Fields Specific to threshold crossing alert events + * + * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class ThresholdCrossingAlertFields extends BaseCEFModel { + + private static final long serialVersionUID = 1L; + + /** + * Additional Performance counters parameters. + * + * @param additionalParameters New value for Additional Performance counters + * @return Additional Performance counters + */ + private List additionalParameters; + + /** + * Event alert action + * + * @param alertAction New Event Action + * @return Event alert action + */ + private AlertAction alertAction; + + /** + * Unique short alert description such as IF-SHUB-ERRDROP + * + * @param alertDescription New value for Unique short alert description + * @return Unique short alert description + */ + private String alertDescription; + + /** + * Alert type + * + * @param alertType New value for Alert Type + * @return Alert Type + */ + private AlertType alertType; + + /** + * Calculated API value (if applicable) + * + * @param alertValue New Calculated API value + * @return Calculated API value (if applicable) + */ + private String alertValue; + + /** + * List of eventIds associated with the event being reported + * + * @param associatedAlertIdList New value for eventIds associated with the event + * @return List of eventIds associated with the event being reported + */ + private List associatedAlertIdList; + + /** + * Time when the performance collector picked up the data; with RFC 2822 compliant format: + * ‘Sat, 13 Mar 2010 11:29:05 -0800’ + * + * @param collectionTimestamp Set new value for time when the performance collector picked up the data + * @return Time when the performance collector picked up the data + */ + private String collectionTimestamp; + + /** + * Specific performance collector instance used + * + * @param dataCollector New value for specific performance collector instance used + * @return Specific performance collector instance used + */ + private String dataCollector; + + /** + * Type of network element + * + * @param elementType New value for type of network element + * @return Type of network element + */ + private String elementType; + + /** + * Event severity or priority + * + * @param eventSeverity New value for event severity or priority + * @return Event severity or priority + */ + private EventSeverity eventSeverity; + + /** + * Time closest to when the measurement was made; with RFC 2822 compliant format: ‘Sat, 13 Mar 2010 11:29:05 -0800’ + * + * @param eventStartTimestamp New value for time closest to when the measurement was made + * @return Time closest to when the measurement was made + */ + private String eventStartTimestamp; + + /** + * Physical or logical port or card (if applicable) + * + * @param interfaceName New value for Physical or logical port or card (if applicable) + * @return Physical or logical port or card (if applicable) + */ + private String interfaceName; + + /** + * Network name + * + * @param networkService New value for network name + * @return Network name + */ + private String networkService; + + /** + * Possible Root Cause (reserved for future use) + * + * @param possibleRootCause New value for possible root cause (reserved for future) + * @return Possible Root Cause (reserved for future use) + */ + private String possibleRootCause; + + /** + * Version of the thresholdCrossingAlertFields block + * + * @param thresholdCrossingFieldsVersion New value for version of the thresholdCrossingAlertFields block + * @return Version of the thresholdCrossingAlertFields block + */ + private Integer thresholdCrossingFieldsVersion; +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/VNicPerformance.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/VNicPerformance.java new file mode 100644 index 0000000..b5b7a59 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/cef/VNicPerformance.java @@ -0,0 +1,308 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.domain.cef; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * Describes the performance and errors of an identified virtual network interface card + *

+ * @author Rajiv Singla. Creation Date: 08/15/2017. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class VNicPerformance extends BaseCEFModel { + + + private static final long serialVersionUID = 1L; + + /** + * Cumulative count of broadcast packets received as read at the end of the measurement interval + * + * @param receivedBroadcastPacketsAccumulated New value for cumulative count of broadcast packets received as + * read at the end of the measurement interval + * @return Cumulative count of broadcast packets received as read at the end of the measurement interval + */ + private Long receivedBroadcastPacketsAccumulated; + + /** + * Count of broadcast packets received within the measurement interval + * + * @param receivedBroadcastPacketsDelta New value for count of broadcast packets received within the measurement + * interval + * @return Count of broadcast packets received within the measurement interval + */ + private Long receivedBroadcastPacketsDelta; + + /** + * Cumulative count of discarded packets received as read at the end of the measurement interval + * + * @param receivedDiscardedPacketsAccumulated New value for cumulative count of discarded packets received as read + * at the end of the measurement interval + * @return Cumulative count of discarded packets received as read at the end of the measurement interval + */ + private Long receivedDiscardedPacketsAccumulated; + + /** + * Count of discarded packets received within the measurement interval + * + * @param receivedDiscardedPacketsDelta New value for count of discarded packets received within the measurement + * interval + * @return Count of discarded packets received within the measurement interval + */ + private Long receivedDiscardedPacketsDelta; + + /** + * Cumulative count of error packets received as read at the end of the measurement interval + * + * @param receivedErrorPacketsAccumulated New value for cumulative count of error packets received as read at the + * end of the measurement interval + * @return Cumulative count of error packets received as read at the end of the measurement interval + */ + private Long receivedErrorPacketsAccumulated; + + /** + * Count of error packets received within the measurement interval + * + * @param receivedErrorPacketsDelta New value for count of error packets received within the measurement interval + * @return Count of error packets received within the measurement interval + */ + private Long receivedErrorPacketsDelta; + + /** + * Cumulative count of multicast packets received as read at the end of the measurement interval + * + * @param receivedMulticastPacketsAccumulated New value for cumulative count of multicast packets received as + * read at the end of the measurement interval + * @return Cumulative count of multicast packets received as read at the end of the measurement interval + */ + private Long receivedMulticastPacketsAccumulated; + + /** + * Count of multicast packets received within the measurement interval + * + * @param receivedMulticastPacketsDelta New value for count of multicast packets received within the measurement + * interval + * @return Count of multicast packets received within the measurement interval + */ + private Long receivedMulticastPacketsDelta; + + /** + * Cumulative count of octets received as read at the end of the measurement interval + * + * @param receivedOctetsAccumulated New value for cumulative count of octets received as read at the end of the + * measurement interval + * @return Cumulative count of octets received as read at the end of the measurement interval + */ + private Long receivedOctetsAccumulated; + + /** + * Count of octets received within the measurement interval + * + * @param receivedOctetsDelta New value for count of octets received within the measurement interval + * @return Count of octets received within the measurement interval + */ + private Long receivedOctetsDelta; + + /** + * Cumulative count of all packets received as read at the end of the measurement interval + * + * @param receivedTotalPacketsAccumulated New value for cumulative count of all packets received as read at the + * end of the measurement interval + * @return Cumulative count of all packets received as read at the end of the measurement interval + */ + private Long receivedTotalPacketsAccumulated; + + /** + * Count of all packets received within the measurement interval + * + * @param receivedTotalPacketsDelta New value for count of all packets received within the measurement interval + * @return Count of all packets received within the measurement interval + */ + private Long receivedTotalPacketsDelta; + + /** + * Cumulative count of unicast packets received as read at the end of the measurement interval + * + * @param receivedUnicastPacketsAccumulated New value for cumulative count of unicast packets received as read at + * the end of the measurement interval + * @return Cumulative count of unicast packets received as read at the end of the measurement interval + */ + private Long receivedUnicastPacketsAccumulated; + + /** + * Count of unicast packets received within the measurement interval + * + * @param receivedUnicastPacketsDelta New value for count of unicast packets received within the measurement + * interval + * @return Count of unicast packets received within the measurement interval + */ + private Long receivedUnicastPacketsDelta; + + /** + * Cumulative count of broadcast packets transmitted as read at the end of the measurement interval + * + * @param transmittedBroadcastPacketsAccumulated New value for cumulative count of broadcast packets transmitted + * as read at the end of the measurement interval + * @return Cumulative count of broadcast packets transmitted as read at the end of the measurement interval + */ + private Long transmittedBroadcastPacketsAccumulated; + + /** + * Count of broadcast packets transmitted within the measurement interval + * + * @param transmittedBroadcastPacketsDelta New value for count of broadcast packets transmitted within the + * measurement interval + * @return Count of broadcast packets transmitted within the measurement interval + */ + private Long transmittedBroadcastPacketsDelta; + + /** + * Cumulative count of discarded packets transmitted as read at the end of the measurement interval + * + * @param transmittedDiscardedPacketsAccumulated New value for cumulative count of discarded packets transmitted + * as read at the end of the measurement interval + * @return Cumulative count of discarded packets transmitted as read at the end of the measurement interval + */ + private Long transmittedDiscardedPacketsAccumulated; + + /** + * Count of discarded packets transmitted within the measurement interval + * + * @param transmittedDiscardedPacketsDelta New value for count of discarded packets transmitted within the + * measurement interval + * @return Count of discarded packets transmitted within the measurement interval + */ + private Long transmittedDiscardedPacketsDelta; + + /** + * Cumulative count of error packets transmitted as read at the end of the measurement interval + * + * @param transmittedErrorPacketsAccumulated New value for cumulative count of error packets transmitted as read + * at the end of the measurement interval + * @return Cumulative count of error packets transmitted as read at the end of the measurement interval + */ + private Long transmittedErrorPacketsAccumulated; + + /** + * Count of error packets transmitted within the measurement interval + * + * @param transmittedErrorPacketsDelta New value for count of error packets transmitted within the measurement + * interval + * @return Count of error packets transmitted within the measurement interval + */ + private Long transmittedErrorPacketsDelta; + + /** + * Cumulative count of multicast packets transmitted as read at the end of the measurement interval + * + * @param transmittedMulticastPacketsAccumulated New value for cumulative count of multicast packets transmitted + * as read at the end of the measurement interval + * @return Cumulative count of multicast packets transmitted as read at the end of the measurement interval + */ + private Long transmittedMulticastPacketsAccumulated; + + /** + * Count of multicast packets transmitted within the measurement interval + * + * @param transmittedMulticastPacketsDelta New value for count of multicast packets transmitted within the + * measurement interval + * @return Count of multicast packets transmitted within the measurement interval + */ + private Long transmittedMulticastPacketsDelta; + + /** + * Cumulative count of octets transmitted as read at the end of the measurement interval + * + * @param transmittedOctetsAccumulated New value for cumulative count of octets transmitted as read at the end of + * the measurement interval + * @return Cumulative count of octets transmitted as read at the end of the measurement interval + */ + private Long transmittedOctetsAccumulated; + + /** + * Count of octets transmitted within the measurement interval + * + * @param transmittedOctetsDelta New value for count of octets transmitted within the measurement interval + * @return Count of octets transmitted within the measurement interval + */ + private Long transmittedOctetsDelta; + + /** + * Cumulative count of all packets transmitted as read at the end of the measurement interval + * + * @param transmittedTotalPacketsAccumulated New value for cumulative count of all packets transmitted as read at + * the end of the measurement interval + * @return Cumulative count of all packets transmitted as read at the end of the measurement interval + */ + private Long transmittedTotalPacketsAccumulated; + + /** + * Count of all packets transmitted within the measurement interval + * + * @param transmittedTotalPacketsDelta New value for count of all packets transmitted within the measurement + * interval + * @return Count of all packets transmitted within the measurement interval + */ + private Long transmittedTotalPacketsDelta; + + /** + * Cumulative count of unicast packets transmitted as read at the end of the measurement interval + * + * @param transmittedUnicastPacketsAccumulated New value for cumulative count of unicast packets transmitted as + * read at the end of the measurement interval + * @return Cumulative count of unicast packets transmitted as read at the end of the measurement interval + */ + private Long transmittedUnicastPacketsAccumulated; + + + /** + * Count of unicast packets transmitted within the measurement interval + * + * @param transmittedUnicastPacketsDelta New value for count of unicast packets transmitted within the + * measurement interval + * @return Count of unicast packets transmitted within the measurement interval + */ + private Long transmittedUnicastPacketsDelta; + + + /** + * Indicates whether vNicPerformance values are likely inaccurate due to counter overflow or other conditions + * + * @param valuesAreSuspect New value to indicate whether vNicPerformance values are likely inaccurate due to + * counter overflow or other conditions + * @return Indicates whether vNicPerformance values are likely inaccurate due to counter overflow or other + * conditions + */ + private Boolean valuesAreSuspect; + + + /** + * Virtual Network Card Identifier + * + * @param vNicIdentifier New value for Virtual Network Card Identifier + * @return Virtual Network Card Identifier + */ + private String vNicIdentifier; + + +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/PolicyModel.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/PolicyModel.java new file mode 100644 index 0000000..697d966 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/PolicyModel.java @@ -0,0 +1,33 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.domain.policy; + +import org.onap.dcae.apod.analytics.model.DCAEAnalyticsModel; + +/** + *

+ * Marker Interface all DCAE Analytics Policy Model implementations + *

+ * + * @author Rajiv Singla . Creation Date: 11/5/2016. + */ +public interface PolicyModel extends DCAEAnalyticsModel { +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/BaseTCAPolicyModel.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/BaseTCAPolicyModel.java new file mode 100644 index 0000000..016e585 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/BaseTCAPolicyModel.java @@ -0,0 +1,37 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.domain.policy.tca; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.onap.dcae.apod.analytics.model.BaseDynamicPropertiesProvider; + +/** + *

+ * A Base TCA Policy Model which accumulates all dynamic properties in a dynamicProperties Map + *

+ * + * @author Rajiv Singla . Creation Date: 11/5/2016. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public abstract class BaseTCAPolicyModel extends BaseDynamicPropertiesProvider implements TCAPolicyModel { +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/ClosedLoopEventStatus.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/ClosedLoopEventStatus.java new file mode 100644 index 0000000..4459fc3 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/ClosedLoopEventStatus.java @@ -0,0 +1,34 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.domain.policy.tca; + +/** + * TCA Policy Closed Loop Event Status + * + * @author Rajiv Singla . Creation Date: 9/11/2017. + */ +public enum ClosedLoopEventStatus implements TCAPolicyModel { + + ONSET, + ABATED, + CONTINUE; + +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/ControlLoopSchemaType.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/ControlLoopSchemaType.java new file mode 100644 index 0000000..b913703 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/ControlLoopSchemaType.java @@ -0,0 +1,33 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.domain.policy.tca; + +import org.onap.dcae.apod.analytics.model.domain.policy.PolicyModel; + +/** + * Control Loop Schema Type + * + * @author Rajiv Singla . Creation Date: 8/24/2017. + */ +public enum ControlLoopSchemaType implements PolicyModel { + + VNF, VM; +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/Direction.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/Direction.java new file mode 100644 index 0000000..a787c4d --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/Direction.java @@ -0,0 +1,76 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.domain.policy.tca; + +import java.math.BigDecimal; + +import javax.annotation.Nonnull; + +/** + *

+ * Enum for Threshold Direction + *

+ * @author Rajiv Singla . Creation Date: 11/5/2016. + */ +public enum Direction implements TCAPolicyModel { + + EQUAL { + @Override + public Boolean operate(@Nonnull BigDecimal value1, @Nonnull BigDecimal value2) { + return value1.compareTo(value2) == 0; + } + }, + LESS { + @Override + public Boolean operate(@Nonnull BigDecimal value1, @Nonnull BigDecimal value2) { + return value1.compareTo(value2) < 0; + } + }, + LESS_OR_EQUAL { + @Override + public Boolean operate(@Nonnull BigDecimal value1, @Nonnull BigDecimal value2) { + return value1.compareTo(value2) <= 0; + } + }, + GREATER { + @Override + public Boolean operate(@Nonnull BigDecimal value1, @Nonnull BigDecimal value2) { + return value1.compareTo(value2) > 0; + } + }, + GREATER_OR_EQUAL { + @Override + public Boolean operate(@Nonnull BigDecimal value1, @Nonnull BigDecimal value2) { + return value1.compareTo(value2) >= 0; + } + }; + + /** + * Configure logic for a particular Direction + * + * @param value1 left operand for Direction operation + * @param value2 right operand for Direction operation + * + * @return result of operation for the direction logic + */ + public abstract Boolean operate(@Nonnull BigDecimal value1, @Nonnull BigDecimal value2); + +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/MetricsPerEventName.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/MetricsPerEventName.java new file mode 100644 index 0000000..1b54d0a --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/MetricsPerEventName.java @@ -0,0 +1,115 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.domain.policy.tca; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.ArrayList; +import java.util.List; + +/** + * TCA Metrics that need to applied to each Event Name + * + * @author Rajiv Singla . Creation Date: 11/5/2016. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class MetricsPerEventName extends BaseTCAPolicyModel{ + + + private static final long serialVersionUID = 1L; + + /** + * Event Name to which TCA Policy needs to applied. + * + * @param eventName New value for eventName to which TCA Policy needs to applied + * @return Event Name to which TCA Policy needs to applied + */ + private String eventName; + + /** + * Control Loop Schema Type + * + * @param controlLoopSchemaType New value for Control Loop Schema Type + * @return Control Loop Schema Type + */ + private ControlLoopSchemaType controlLoopSchemaType; + + /** + * Policy Scope + * + * @param policyScope New value for Policy Scope + * @return Policy Scope + */ + private String policyScope; + + /** + * Policy Name + * + * @param policyName New value for Policy Name + * @return Policy Name + */ + private String policyName; + + /** + * Policy Version + * + * @param policyVersion New value for Policy Version + * @return Policy Version + */ + private String policyVersion; + + /** + * Policy Thresholds + * + * @param thresholds New value for Policy Thresholds + * @return Policy Thresholds + */ + private List thresholds; + + + /** + * Creates a deep copy of given {@link MetricsPerEventName} + * + * @param metricsPerEventName metrics Per Event Name that need to copied + * + * @return copy of new metrics per event Name with values copied from given metrics per Event Name + */ + public static MetricsPerEventName copy(final MetricsPerEventName metricsPerEventName) { + final MetricsPerEventName newMetricsPerEventName = new MetricsPerEventName(); + newMetricsPerEventName.setEventName(metricsPerEventName.getEventName()); + newMetricsPerEventName.setControlLoopSchemaType(metricsPerEventName.getControlLoopSchemaType()); + newMetricsPerEventName.setPolicyScope(metricsPerEventName.getPolicyScope()); + newMetricsPerEventName.setPolicyName(metricsPerEventName.getPolicyName()); + newMetricsPerEventName.setPolicyVersion(metricsPerEventName.getPolicyVersion()); + if (metricsPerEventName.getThresholds() != null) { + List newThresholds = new ArrayList<>(metricsPerEventName.getThresholds().size()); + for( Threshold threshold : metricsPerEventName.getThresholds()) { + newThresholds.add(Threshold.copy(threshold)); + } + newMetricsPerEventName.setThresholds(newThresholds); + } + return newMetricsPerEventName; + } + + +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/TCAPolicy.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/TCAPolicy.java new file mode 100644 index 0000000..45559e3 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/TCAPolicy.java @@ -0,0 +1,58 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.domain.policy.tca; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.List; + +/** + *

+ * TCA (Threshold Crossing Alert) Root + *

+ * + * @author Rajiv Singla . Creation Date: 11/5/2016. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class TCAPolicy extends BaseTCAPolicyModel { + + private static final long serialVersionUID = 1L; + + /** + * TCA Policy domain which is associated with TCA incoming CEF message domain + * + * @param domain New value for domain + * @return Policy domain which is associated with incoming CEF message + */ + private String domain; + + /** + * Contains TCA Policy metrics that needs to be applied to each Functional Role + * + * @param metricsPerEventName New value for metrics that needs to be applied to each Functional Role + * @return Contains TCA Policy metrics that needs to be applied to each Functional Role + */ + private List metricsPerEventName; + + +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/TCAPolicyModel.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/TCAPolicyModel.java new file mode 100644 index 0000000..fefef3c --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/TCAPolicyModel.java @@ -0,0 +1,35 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.domain.policy.tca; + +import org.onap.dcae.apod.analytics.model.domain.policy.PolicyModel; + +/** + *

+ * Marker interface for all TCA Policy Models + *

+ * + * @author Rajiv Singla . Creation Date: 11/5/2016. + */ +public interface TCAPolicyModel extends PolicyModel { + + +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/Threshold.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/Threshold.java new file mode 100644 index 0000000..60da70d --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/domain/policy/tca/Threshold.java @@ -0,0 +1,127 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.domain.policy.tca; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.onap.dcae.apod.analytics.model.domain.cef.EventSeverity; + +import java.math.BigDecimal; + +/** + * + * @author Rajiv Singla . Creation Date: 11/5/2016. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class Threshold extends BaseTCAPolicyModel { + + private static final long serialVersionUID = 1L; + + /** + * Closed Loop Control Name + * + * @param closedLoopControlName New value for Closed Loop Control Name + * @return Closed Loop Control Name + */ + private String closedLoopControlName; + + + /** + * Closed Loop Event Status + * + * @param closedLoopEventStatus New value for Closed Loop Event Status + * @return Closed Loop Event Status + */ + private ClosedLoopEventStatus closedLoopEventStatus; + + /** + * Threshold Version + * + * @param version New value for Threshold Version + * @return Threshold Version + */ + private String version; + + /** + * Path of the field inside Common Event Format which needs to be monitored by TCA App + * for threshold crossing + * + * @param fieldPath New value for Path of the field inside CEF which needs to be monitored for TCA + * @return Path of the field inside Common Event Format which needs to be monitored by TCA App + */ + private String fieldPath; + + /** + * Threshold Value + * + * @param thresholdValue New value for Threshold Value + * @return Threshold Value + */ + private Long thresholdValue; + + /** + * Direction of threshold + * + * @param direction New value for Direction of threshold + * @return Direction of threshold + */ + private Direction direction; + + /** + * Severity of Event based on CEF Convention + * + * @param severity New value for Severity of Event based on CEF Convention + * @return Severity of Event based on CEF Convention + */ + private EventSeverity severity; + + + /** + * Actual Field value that caused the threshold violation. Note: Ignored for serialization / deserialization + * + * + * @param actualFieldValue new value for actual Field value that caused the violation + * @return actual field value that caused the violation + */ + private BigDecimal actualFieldValue; + + /** + * Creates a deep copy of give {@link Threshold} + * + * @param threshold threshold that need to be copied + * + * @return new instance of threshold with copied value for give threshold + */ + public static Threshold copy(final Threshold threshold) { + final Threshold newThreshold = new Threshold(); + newThreshold.setClosedLoopControlName(threshold.getClosedLoopControlName()); + newThreshold.setClosedLoopEventStatus(threshold.getClosedLoopEventStatus()); + newThreshold.setFieldPath(threshold.getFieldPath()); + newThreshold.setThresholdValue(threshold.getThresholdValue()); + newThreshold.setDirection(threshold.getDirection()); + newThreshold.setSeverity(threshold.getSeverity()); + newThreshold.setVersion(threshold.getVersion()); + newThreshold.setActualFieldValue(threshold.getActualFieldValue()); + return newThreshold; + } + +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/facade/FacadeModel.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/facade/FacadeModel.java new file mode 100644 index 0000000..195a6c2 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/facade/FacadeModel.java @@ -0,0 +1,33 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.facade; + +import org.onap.dcae.apod.analytics.model.DCAEAnalyticsModel; + +/** + *

+ * Marker Interface for all Facade (outgoing) DCAE Analytics Model + *

+ * + * @author Rajiv Singla . Creation Date: 11/9/2016. + */ +public interface FacadeModel extends DCAEAnalyticsModel { +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/facade/tca/AAI.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/facade/tca/AAI.java new file mode 100644 index 0000000..f878917 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/facade/tca/AAI.java @@ -0,0 +1,41 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.facade.tca; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.onap.dcae.apod.analytics.model.BaseDynamicPropertiesProvider; + +/** + * + * @author Rajiv Singla . Creation Date: 11/9/2016. + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class AAI extends BaseDynamicPropertiesProvider implements TCAFacadeModel { + + private static final long serialVersionUID = 1L; + + private String genericVNFName; + + private String genericServerName; + +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/facade/tca/TCAFacadeModel.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/facade/tca/TCAFacadeModel.java new file mode 100644 index 0000000..8b8b88c --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/facade/tca/TCAFacadeModel.java @@ -0,0 +1,31 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.facade.tca; + +import org.onap.dcae.apod.analytics.model.facade.FacadeModel; + +/** + * Marker Interface for all TCA Facade Models + * + * @author Rajiv Singla . Creation Date: 11/9/2016. + */ +public interface TCAFacadeModel extends FacadeModel { +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/facade/tca/TCAVESResponse.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/facade/tca/TCAVESResponse.java new file mode 100644 index 0000000..6e8024f --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/facade/tca/TCAVESResponse.java @@ -0,0 +1,50 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.facade.tca; + +import lombok.Data; + +/** + * Response generated by TCA for VES Message + * + * @author Rajiv Singla . Creation Date: 11/9/2016. + */ +@Data +public class TCAVESResponse implements TCAFacadeModel { + + private static final long serialVersionUID = 1L; + + private AAI aai; + private Long closedLoopAlarmEnd; + private Long closedLoopAlarmStart; + private String closedLoopControlName; + private String closedLoopEventClient; + private String closedLoopEventStatus; + private String from; + private String policyName; + private String policyScope; + private String policyVersion; + private String requestID; + private String target; + private String targetType; + private String version; + +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/AnalyticsModelIOUtils.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/AnalyticsModelIOUtils.java new file mode 100644 index 0000000..a0f374c --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/AnalyticsModelIOUtils.java @@ -0,0 +1,132 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util; + +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.databind.JsonMappingException; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.nio.charset.Charset; +import java.util.Properties; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Utility class containing methods for IO related operations + *

+ * @author Rajiv Singla . Creation Date: 10/17/2016. + */ +public abstract class AnalyticsModelIOUtils extends AnalyticsModelJsonUtils { + + private static final Logger LOG = LoggerFactory.getLogger(AnalyticsModelIOUtils.class); + + /** + * Parses given valid JSON file Location to object of given binding class type. + * + * @param fileLocation valid JSON File Location + * @param bindingClass class Type of Binding object + * + * @param binding Class Type + * + * @return binding Class Object which properties populated from JSON File Location + * @throws IOException when fails to do IO operations + */ + public static final T convertToJsonObject(String fileLocation, Class bindingClass) throws IOException { + + // Load Resource from give path + final InputStream resourceAsStream = loadResourceAsStream(fileLocation); + + // If resource is null throw an exception + if (resourceAsStream == null) { + final String errorMessage = String.format("Invalid File location: %s", fileLocation); + throw new IOException(errorMessage, new FileNotFoundException(errorMessage)); + } + + // Parse input stream + try (InputStreamReader inputStreamReader = new InputStreamReader(resourceAsStream, Charset.forName("UTF-8"))) { + + return ANALYTICS_MODEL_OBJECT_MAPPER.readValue(inputStreamReader, bindingClass); + } catch (JsonMappingException | JsonParseException e) { + + // If parsing fails due to Invalid Json or Json IO Issues throw an exception + final String errorMessage = String.format("Json parsing error while parsing Json File location: %s", + fileLocation); + + LOG.error(errorMessage); + throw new IOException(errorMessage, e); + } catch (IOException e) { + + // If parsing fails due to IO Issues throw an exception + final String errorMessage = String.format("IO Error while parsing Json File location: %s", fileLocation); + LOG.error(errorMessage); + throw new IOException(errorMessage, e); + } + } + + /** + * Loads properties from a given file location. Throws {@link RuntimeException} if file location is invalid + * or there were exception when loading properties + * + * @param propertiesFileLocation path string for properties file + * @param properties properties object that needs to be populated with give file properties + * + * @return properties object with populated properties from properties file + * + */ + public static Properties loadPropertiesFile(String propertiesFileLocation, final Properties properties) { + + // Load Resource from give properties file path + final InputStream propertiesFileInputStream = loadResourceAsStream(propertiesFileLocation); + + // If properties file is not present throw an exception + if (propertiesFileInputStream == null) { + final String errorMessage = String.format("Invalid Properties File at location: %s", + propertiesFileLocation); + //TODO: discuss and change this excpeiton as well. + throw new RuntimeException(errorMessage, new FileNotFoundException(errorMessage)); + } + + try { + properties.load(propertiesFileInputStream); + } catch (IOException e) { + final String errorMessage = String.format("IO Exception while reading Properties File at location: %s", + propertiesFileLocation); + throw new RuntimeException(errorMessage, e); + } + + return properties; + + } + + /** + * Loads Input file from the given classpath file location and returns file InputStream + * + * @param fileLocation classpath file location + * + * @return {@link InputStream} for classpath file + */ + public static InputStream loadResourceAsStream(String fileLocation) { + // Load Resource from give path + return Thread.currentThread().getContextClassLoader().getResourceAsStream(fileLocation); + } +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/AnalyticsModelJsonUtils.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/AnalyticsModelJsonUtils.java new file mode 100644 index 0000000..35834d1 --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/AnalyticsModelJsonUtils.java @@ -0,0 +1,104 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.common.base.Suppliers; +import org.onap.dcae.apod.analytics.model.util.json.AnalyticsModelObjectMapperSupplier; + +import java.io.IOException; +import java.io.InputStream; + +/** + * + * @author Rajiv Singla . Creation Date: 11/7/2016. + */ +public abstract class AnalyticsModelJsonUtils { + + /** + * Object mapper to be used for all TCA Json Parsing + */ + protected static final ObjectMapper ANALYTICS_MODEL_OBJECT_MAPPER = + Suppliers.memoize(new AnalyticsModelObjectMapperSupplier()).get(); + + + /** + * Converts Input Stream to given type reference object + * + * @param inputStream input stream + * @param valueTypeRef type reference + * @param type of type reference + * + * @return parsed json object + * + * @throws IOException IO Exception + */ + public static T readValue(InputStream inputStream, TypeReference valueTypeRef) throws IOException { + return ANALYTICS_MODEL_OBJECT_MAPPER.readValue(inputStream, valueTypeRef); + } + + + /** + * Converts Input Stream to given target class object + * + * @param inputStream input stream + * @param targetClass target class type + * @param type of class + * + * @return parsed json object + * + * @throws IOException IO Exception + */ + public static T readValue(InputStream inputStream, Class targetClass) throws IOException { + return ANALYTICS_MODEL_OBJECT_MAPPER.readValue(inputStream, targetClass); + } + + + /** + * Converts given object to JSON string + * + * @param value object that needs to converted to json string + * + * @return json string + * @throws JsonProcessingException Json Processing exception + */ + public static String writeValueAsString(Object value) throws JsonProcessingException { + return ANALYTICS_MODEL_OBJECT_MAPPER.writeValueAsString(value); + } + + + /** + * Method to deserialize JSON content from given JSON content String. + * + * @param jsonString JSON String + * @param objectClass target object class + * @param object class type + * + * @return converted Object from JSON String + * + * @throws IOException IO Exception + */ + public static T readValue(final String jsonString, final Class objectClass) throws IOException { + return ANALYTICS_MODEL_OBJECT_MAPPER.readValue(jsonString, objectClass); + } +} diff --git a/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/AnalyticsModelObjectMapperSupplier.java b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/AnalyticsModelObjectMapperSupplier.java new file mode 100644 index 0000000..d5e2d9f --- /dev/null +++ b/dcae-analytics-model/src/main/java/org/onap/dcae/apod/analytics/model/util/json/AnalyticsModelObjectMapperSupplier.java @@ -0,0 +1,115 @@ +/* + * ===============================LICENSE_START====================================== + * dcae-analytics + * ================================================================================ + * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================LICENSE_END=========================================== + */ + +package org.onap.dcae.apod.analytics.model.util.json; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.common.base.Supplier; +import com.jayway.jsonpath.Configuration; +import com.jayway.jsonpath.JsonPath; +import com.jayway.jsonpath.Option; +import com.jayway.jsonpath.spi.json.JacksonJsonProvider; +import com.jayway.jsonpath.spi.json.JsonProvider; +import com.jayway.jsonpath.spi.mapper.JacksonMappingProvider; +import com.jayway.jsonpath.spi.mapper.MappingProvider; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + +import java.util.EnumSet; +import java.util.Set; + +/** + *

+ * {@link Supplier} that can be used by clients to get Object Mapper which specializes + * in serialize and deserialize - DCAE Analytics Model JSON Objects. Clients can + * choose to memoize this Supplier for performance enhancements + *
+ * NOTE: This supplier also setups up {@link JsonPath} default + * config to make use of this Supplier object mapper + *

+ * @author Rajiv Singla . Creation Date: 11/10/2016. + */ +@SuppressFBWarnings("SIC_INNER_SHOULD_BE_STATIC_ANON") +public class AnalyticsModelObjectMapperSupplier implements Supplier { + + @Override + public ObjectMapper get() { + + final ObjectMapper objectMapper = new ObjectMapper(); + + // Serialize null values + objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + + // Don't fail on unknown properties + objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + + // Register Common Event Format Module + objectMapper.registerModule(new CommonEventFormatModule()); + // Register TCA Policy Module + objectMapper.registerModule(new TCAPolicyModule()); + // Register TCA Facade Module + objectMapper.registerModule(new TCAFacadeModelModule()); + // Register TCA Controller App Config Module + objectMapper.registerModule(new TCAControllerConfigModule()); + + + // Setup JsonPath default config + setupJsonPathDefaultConfig(objectMapper); + + return objectMapper; + } + + + /** + * Setups up default Config for {@link JsonPath} + * + * @param objectMapper Jackson object mapper + */ + private void setupJsonPathDefaultConfig(final ObjectMapper objectMapper) { + + Configuration.setDefaults(new Configuration.Defaults() { + + private final JsonProvider jsonProvider = new JacksonJsonProvider(objectMapper); + private final MappingProvider mappingProvider = new JacksonMappingProvider(objectMapper); + + @Override + public JsonProvider jsonProvider() { + return jsonProvider; + } + + @Override + public MappingProvider mappingProvider() { + return mappingProvider; + } + + @Override + public Set