From 13cff67514ca6e18d74c47cbbb9a71214230747a Mon Sep 17 00:00:00 2001 From: Sergii Iakovenko Date: Sat, 23 Jul 2022 17:37:07 +0300 Subject: [PATCH] Clean up the base topology module. --- .../base-messaging-mappers/build.gradle | 18 +++ .../checkstyle/checkstyle-suppressions.xml | 6 + .../mappers/DetectConnectedDevicesMapper.java | 0 .../share/mappers/FeatureTogglesMapper.java | 0 .../wfm/share/mappers/FlowMapper.java | 0 .../wfm/share/mappers/FlowPathMapper.java | 0 .../wfm/share/mappers/IslMapper.java | 0 .../mappers/KildaConfigurationMapper.java | 0 .../wfm/share/mappers/PortMapper.java | 0 .../wfm/share/mappers/SwitchMapper.java | 0 .../share/mappers/SwitchPropertiesMapper.java | 0 .../openkilda/wfm/share/model/Endpoint.java | 0 .../wfm/share/model/IslReference.java | 0 .../wfm/share/mappers/FlowMapperTest.java | 0 .../wfm/share/mappers/IslMapperTest.java | 0 .../wfm/share/mappers/PortMapperTest.java | 0 .../base-topology/base-messaging/build.gradle | 2 +- .../base-storm-topology/build.gradle | 6 +- .../checkstyle/checkstyle-suppressions.xml | 11 -- .../java/org/openkilda/wfm/CtrlBoltRef.java | 44 ------- .../main/java/org/openkilda/wfm/WatchDog.java | 60 --------- .../org/openkilda/wfm/ctrl/RouteAction.java | 91 -------------- .../org/openkilda/wfm/ctrl/RouteBolt.java | 88 ------------- .../openkilda/wfm/error/ClientException.java | 29 ----- .../FeatureTogglesNotEnabledException.java | 23 ---- .../wfm/error/ImplementationError.java | 1 + .../wfm/error/JsonDecodeException.java | 32 ----- .../wfm/error/NameCollisionException.java | 26 ---- .../NoPoolResourcesAvailableException.java | 22 ---- .../error/StreamNameCollisionException.java | 26 ---- .../wfm/protocol/AbstractMessage.java | 1 + .../share/flow/resources/ResourceUtils.java | 38 ------ .../openkilda/wfm/share/utils/WatchDog.java | 54 -------- .../wfm/topology/AbstractTopology.java | 7 +- .../org/openkilda/wfm/topology/Topology.java | 4 +- .../flow/model/FlowPathWithEncapsulation.java | 31 ----- .../model/FlowPathsWithEncapsulation.java | 117 ------------------ .../wfm/share/flow/TestFlowBuilder.java | 52 -------- .../build.gradle | 2 +- .../floodlight-modules/build.gradle | 6 +- .../build.gradle | 4 +- .../flowhs-messaging/build.gradle | 1 - .../flowhs-storm-topology/build.gradle | 20 +-- .../flowhs/bolts/FlowCreateHubBolt.java | 4 +- .../flowhs/bolts/FlowDeleteHubBolt.java | 4 +- .../flowhs/bolts/FlowPathSwapHubBolt.java | 4 +- .../flowhs/bolts/FlowRerouteHubBolt.java | 2 +- .../flowhs/bolts/FlowSyncHubBolt.java | 4 +- .../flowhs/bolts/FlowUpdateHubBolt.java | 4 +- .../flowhs/bolts/FlowValidationHubBolt.java | 4 +- .../flowhs/bolts/YFlowCreateHubBolt.java | 4 +- .../flowhs/bolts/YFlowDeleteHubBolt.java | 4 +- .../flowhs/bolts/YFlowPathSwapHubBolt.java | 4 +- .../flowhs/bolts/YFlowRerouteHubBolt.java | 4 +- .../flowhs/bolts/YFlowUpdateHubBolt.java | 6 +- .../flowhs/bolts/YFlowValidationHubBolt.java | 4 +- .../DuplicateKeyException.java | 2 +- .../FlowAlreadyExistException.java | 2 +- .../FlowProcessingException.java | 2 +- .../IllegalFlowStateException.java | 2 +- .../InsufficientDataException.java | 2 +- .../UnknownKeyException.java | 2 +- .../flowhs/fsm/common/YFlowProcessingFsm.java | 2 +- .../actions/AllocateYFlowResourcesAction.java | 2 +- .../actions/BaseFlowPathRemovalAction.java | 2 +- .../actions/BaseFlowRuleRemovalAction.java | 6 +- .../actions/BaseResourceAllocationAction.java | 4 +- ...lowProcessingWithHistorySupportAction.java | 6 +- .../fsm/common/actions/NbTrackableAction.java | 2 +- .../NbTrackableWithHistorySupportAction.java | 2 +- .../common/actions/YFlowProcessingAction.java | 2 +- ...lowProcessingWithHistorySupportAction.java | 2 +- .../actions/CompleteFlowCreateAction.java | 2 +- .../create/actions/FlowValidateAction.java | 2 +- .../actions/ResourcesAllocationAction.java | 12 +- .../actions/ResourcesDeallocationAction.java | 2 +- .../CompleteFlowPathRemovalAction.java | 2 +- .../fsm/delete/actions/RemoveRulesAction.java | 8 +- .../delete/actions/ValidateFlowAction.java | 2 +- .../EmitUpdateRulesRequestsAction.java | 10 +- .../actions/PostResourceAllocationAction.java | 2 +- .../actions/ResourceAllocationAction.java | 2 +- .../create/actions/ValidateRequestAction.java | 2 +- ...allocateFlowMirrorPathResourcesAction.java | 2 +- .../actions/EmitCommandRequestsAction.java | 10 +- .../delete/actions/ValidateRequestAction.java | 2 +- .../pathswap/actions/FlowValidateAction.java | 2 +- .../actions/InstallIngressRulesAction.java | 6 +- .../actions/RemoveOldRulesAction.java | 6 +- .../actions/RevertNewRulesAction.java | 6 +- .../actions/RevertPathsSwapAction.java | 2 +- .../AllocatePrimaryResourcesAction.java | 2 +- .../AllocateProtectedResourcesAction.java | 2 +- .../CompleteFlowPathRemovalAction.java | 2 +- .../actions/InstallIngressRulesAction.java | 6 +- .../actions/InstallNonIngressRulesAction.java | 4 +- .../reroute/actions/RemoveOldRulesAction.java | 6 +- .../reroute/actions/RevertNewRulesAction.java | 6 +- .../reroute/actions/ValidateFlowAction.java | 2 +- .../actions/OnFinishedNbTrackableAction.java | 2 +- .../actions/ValidateFlowsAction.java | 2 +- .../topology/flowhs/fsm/sync/FlowSyncFsm.java | 2 +- .../actions/CreateSyncHandlersAction.java | 10 +- .../fsm/sync/actions/FlowSyncSetupAction.java | 2 +- .../AllocatePrimaryResourcesAction.java | 2 +- .../AllocateProtectedResourcesAction.java | 2 +- .../CompleteFlowPathRemovalAction.java | 2 +- .../actions/InstallIngressRulesAction.java | 6 +- .../actions/InstallNonIngressRulesAction.java | 4 +- .../update/actions/RemoveOldRulesAction.java | 8 +- .../fsm/update/actions/RevertFlowAction.java | 2 +- .../update/actions/RevertNewRulesAction.java | 6 +- .../fsm/update/actions/UpdateFlowAction.java | 2 +- .../update/actions/ValidateFlowAction.java | 2 +- .../fsm/validation/FlowValidationFsm.java | 2 +- .../fsm/validation/FlowValidationService.java | 2 +- .../actions/CreateDraftYFlowAction.java | 2 +- .../actions/OnSubFlowAllocatedAction.java | 2 +- .../create/actions/ValidateYFlowAction.java | 2 +- .../delete/actions/ValidateYFlowAction.java | 2 +- .../actions/CompleteYFlowSwappingAction.java | 2 +- .../RevertSharedEndpointRulesAction.java | 2 +- .../UpdateSharedEndpointRulesAction.java | 2 +- .../pathswap/actions/ValidateYFlowAction.java | 2 +- .../actions/OnSubFlowAllocatedAction.java | 2 +- .../reroute/actions/ValidateYFlowAction.java | 2 +- .../OnRevertSubFlowAllocatedAction.java | 2 +- .../actions/OnSubFlowAllocatedAction.java | 2 +- .../update/actions/ValidateYFlowAction.java | 2 +- .../actions/DumpYFlowResourcesAction.java | 2 +- .../actions/PreValidateYFlowAction.java | 2 +- .../actions/ValidateSubFlowsAction.java | 2 +- .../topology/flowhs}/model/FlowPathPair.java | 2 +- .../flowhs/service/FlowCreateService.java | 6 +- .../flowhs/service/FlowDeleteService.java | 6 +- .../flowhs/service/FlowPathSwapService.java | 6 +- .../flowhs/service/FlowRerouteService.java | 2 +- .../flowhs/service/FlowSyncCarrier.java | 4 +- .../flowhs/service/FlowUpdateService.java | 6 +- .../service/FlowValidationHubService.java | 6 +- .../service/common}/FlowPathBuilder.java | 2 +- .../flowhs/service/path/FlowPathService.java | 4 +- .../service/speaker}/FlowCommandBuilder.java | 6 +- .../FlowCommandBuilderFactory.java | 3 +- .../FlowSegmentRequestFactoriesSequence.java | 2 +- .../service/speaker}/MirrorContext.java | 2 +- .../SpeakerFlowSegmentRequestBuilder.java | 8 +- .../speaker}/SpeakerRequestBuildContext.java | 2 +- .../service/yflow/YFlowCreateService.java | 4 +- .../service/yflow/YFlowDeleteService.java | 4 +- .../service/yflow/YFlowPathSwapService.java | 4 +- .../service/yflow/YFlowRerouteService.java | 4 +- .../service/yflow/YFlowUpdateService.java | 6 +- .../yflow/YFlowValidationHubService.java | 4 +- .../BaseFlowRuleRemovalActionTest.java | 2 +- .../flowhs/service/FlowCreateServiceTest.java | 4 +- .../flowhs/service/FlowDeleteServiceTest.java | 4 +- .../service/FlowRerouteServiceTest.java | 2 +- .../flowhs/service/FlowUpdateServiceTest.java | 4 +- .../service/FlowValidationHubServiceTest.java | 4 +- .../service/common}/FlowPathBuilderTest.java | 2 +- .../service/path/FlowPathServiceTest.java | 2 +- .../SpeakerFlowSegmentRequestBuilderTest.java | 3 +- .../service/yflow/YFlowCreateServiceTest.java | 4 +- .../service/yflow/YFlowDeleteServiceTest.java | 4 +- .../yflow/YFlowPathSwapServiceTest.java | 4 +- .../yflow/YFlowRerouteServiceTest.java | 4 +- .../service/yflow/YFlowUpdateServiceTest.java | 4 +- .../yflow/YFlowValidationHubServiceTest.java | 2 +- .../build.gradle | 14 +-- .../grpc-speaker/grpc-service/build.gradle | 4 +- .../history-storm-topology/build.gradle | 3 +- .../isllatency-storm-topology/build.gradle | 8 +- src-java/kilda-history-records/README.md | 3 + src-java/kilda-history-records/build.gradle | 23 ++++ .../checkstyle/checkstyle-suppressions.xml | 6 + .../wfm/share/history/model/FlowDumpData.java | 0 .../share/history/model/FlowEventData.java | 0 .../share/history/model/FlowHistoryData.java | 0 .../history/model/FlowHistoryHolder.java | 0 .../share/history/model/PortEventData.java | 0 .../share/history/model/PortHistoryEvent.java | 0 .../share/history/service/HistoryService.java | 0 .../wfm/share/mappers/HistoryMapper.java | 0 .../wfm/share/mappers/HistoryMapperTest.java | 0 .../kilda-persistence-hibernate/build.gradle | 2 +- .../hibernate/KildaObjectMapperSupplier.java | 8 +- src-java/kilda-resource-pools/README.md | 3 + src-java/kilda-resource-pools/build.gradle | 21 ++++ .../checkstyle/checkstyle-suppressions.xml | 8 ++ .../wfm/share/flow/resources/CookiePool.java | 0 .../resources/EncapsulationResources.java | 0 .../EncapsulationResourcesProvider.java | 0 .../resources/FlowMirrorPathResources.java | 0 .../share/flow/resources/FlowResources.java | 0 .../flow/resources/FlowResourcesConfig.java | 0 .../flow/resources/FlowResourcesManager.java | 0 .../resources/MeterIdPoolEntityAdapter.java | 0 .../flow/resources/MirrorGroupIdPool.java | 0 .../ResourceAllocationException.java | 0 .../ResourceNotAvailableException.java | 0 .../transitvlan/TransitVlanEncapsulation.java | 0 .../transitvlan/TransitVlanPool.java | 0 .../resources/vxlan/VxlanEncapsulation.java | 0 .../share/flow/resources/vxlan/VxlanPool.java | 0 .../wfm/share/utils/PoolEntityAdapter.java | 0 .../wfm/share/utils/PoolManager.java | 0 .../share/flow/resources/CookiePoolTest.java | 0 .../resources/FlowResourcesManagerTest.java | 0 .../transitvlan/TransitVlanPoolTest.java | 0 .../flow/resources/vxlan/VxlanPoolTest.java | 0 .../utils/InMemorySetPoolEntityAdapter.java | 0 .../wfm/share/utils/PoolManagerTest.java | 0 .../share/utils/PredictablePoolManager.java | 0 src-java/kilda-utils/stubs/build.gradle | 4 - .../nbworker-messaging/build.gradle | 3 +- .../nbworker-storm-topology/build.gradle | 13 +- .../nbworker/bolts/LinkOperationsBolt.java | 4 +- .../nbworker/bolts/SwitchOperationsBolt.java | 4 +- .../IllegalSwitchPropertiesException.java | 2 +- .../IllegalSwitchStateException.java | 2 +- .../exceptions}/LinkPropsException.java | 2 +- .../nbworker}/mappers/LinkPropsMapper.java | 4 +- .../nbworker}/mappers/PathMapper.java | 2 +- .../nbworker/services/PathsService.java | 2 +- .../services/SwitchOperationsService.java | 4 +- .../services/SwitchOperationsServiceTest.java | 2 +- .../network-storm-topology/build.gradle | 19 +-- .../northbound/build.gradle | 14 +-- .../opentsdb-storm-topology/build.gradle | 2 +- .../ping-topology/ping-messaging/build.gradle | 3 +- .../ping-storm-topology/build.gradle | 9 +- .../topology/ping/bolt/GroupCollector.java | 2 +- .../ping/exceptions}/WorkflowException.java | 2 +- .../portstate-storm-topology/build.gradle | 6 +- .../bolt}/AbstractKafkaParserBolt.java | 4 +- .../portstate/bolt/TopoDiscoParseBolt.java | 3 +- .../portstate/bolt/WfmStatsParseBolt.java | 3 +- .../exceptions}/MessageException.java | 2 +- .../reroute-storm-topology/build.gradle | 6 +- .../rule-manager-api/build.gradle | 6 +- src-java/settings.gradle | 4 + .../stats-storm-topology/build.gradle | 8 +- .../swmanager-messaging/build.gradle | 3 +- .../swmanager-storm-topology/build.gradle | 11 +- 245 files changed, 427 insertions(+), 1091 deletions(-) create mode 100644 src-java/base-topology/base-messaging-mappers/build.gradle create mode 100644 src-java/base-topology/base-messaging-mappers/src/checkstyle/checkstyle-suppressions.xml rename src-java/base-topology/{base-storm-topology => base-messaging-mappers}/src/main/java/org/openkilda/wfm/share/mappers/DetectConnectedDevicesMapper.java (100%) rename src-java/base-topology/{base-storm-topology => base-messaging-mappers}/src/main/java/org/openkilda/wfm/share/mappers/FeatureTogglesMapper.java (100%) rename src-java/base-topology/{base-storm-topology => base-messaging-mappers}/src/main/java/org/openkilda/wfm/share/mappers/FlowMapper.java (100%) rename src-java/base-topology/{base-storm-topology => base-messaging-mappers}/src/main/java/org/openkilda/wfm/share/mappers/FlowPathMapper.java (100%) rename src-java/base-topology/{base-storm-topology => base-messaging-mappers}/src/main/java/org/openkilda/wfm/share/mappers/IslMapper.java (100%) rename src-java/base-topology/{base-storm-topology => base-messaging-mappers}/src/main/java/org/openkilda/wfm/share/mappers/KildaConfigurationMapper.java (100%) rename src-java/base-topology/{base-storm-topology => base-messaging-mappers}/src/main/java/org/openkilda/wfm/share/mappers/PortMapper.java (100%) rename src-java/base-topology/{base-storm-topology => base-messaging-mappers}/src/main/java/org/openkilda/wfm/share/mappers/SwitchMapper.java (100%) rename src-java/base-topology/{base-storm-topology => base-messaging-mappers}/src/main/java/org/openkilda/wfm/share/mappers/SwitchPropertiesMapper.java (100%) rename src-java/base-topology/{base-storm-topology => base-messaging-mappers}/src/main/java/org/openkilda/wfm/share/model/Endpoint.java (100%) rename src-java/base-topology/{base-storm-topology => base-messaging-mappers}/src/main/java/org/openkilda/wfm/share/model/IslReference.java (100%) rename src-java/base-topology/{base-storm-topology => base-messaging-mappers}/src/test/java/org/openkilda/wfm/share/mappers/FlowMapperTest.java (100%) rename src-java/base-topology/{base-storm-topology => base-messaging-mappers}/src/test/java/org/openkilda/wfm/share/mappers/IslMapperTest.java (100%) rename src-java/base-topology/{base-storm-topology => base-messaging-mappers}/src/test/java/org/openkilda/wfm/share/mappers/PortMapperTest.java (100%) delete mode 100644 src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/CtrlBoltRef.java delete mode 100644 src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/WatchDog.java delete mode 100644 src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/ctrl/RouteAction.java delete mode 100644 src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/ctrl/RouteBolt.java delete mode 100644 src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/ClientException.java delete mode 100644 src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/FeatureTogglesNotEnabledException.java delete mode 100644 src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/JsonDecodeException.java delete mode 100644 src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/NameCollisionException.java delete mode 100644 src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/NoPoolResourcesAvailableException.java delete mode 100644 src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/StreamNameCollisionException.java delete mode 100644 src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/ResourceUtils.java delete mode 100644 src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/utils/WatchDog.java delete mode 100644 src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/flow/model/FlowPathWithEncapsulation.java delete mode 100644 src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/flow/model/FlowPathsWithEncapsulation.java rename src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/{exception => exceptions}/DuplicateKeyException.java (94%) rename src-java/{base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error => flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/exceptions}/FlowAlreadyExistException.java (94%) rename src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/{exception => exceptions}/FlowProcessingException.java (95%) rename src-java/{base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error => flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/exceptions}/IllegalFlowStateException.java (94%) rename src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/{exception => exceptions}/InsufficientDataException.java (93%) rename src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/{exception => exceptions}/UnknownKeyException.java (94%) rename src-java/{base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/flow => flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs}/model/FlowPathPair.java (96%) rename src-java/{base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service => flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/common}/FlowPathBuilder.java (99%) rename src-java/{base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service => flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/speaker}/FlowCommandBuilder.java (96%) rename src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/{ => speaker}/FlowCommandBuilderFactory.java (92%) rename src-java/{base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service => flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/speaker}/FlowSegmentRequestFactoriesSequence.java (94%) rename src-java/{base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/model => flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/speaker}/MirrorContext.java (94%) rename src-java/{base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/service => flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/speaker}/SpeakerFlowSegmentRequestBuilder.java (98%) rename src-java/{base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/model => flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/speaker}/SpeakerRequestBuildContext.java (97%) rename src-java/{base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service => flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/common}/FlowPathBuilderTest.java (99%) rename src-java/{base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/share/service => flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/speaker}/SpeakerFlowSegmentRequestBuilderTest.java (99%) create mode 100644 src-java/kilda-history-records/README.md create mode 100644 src-java/kilda-history-records/build.gradle create mode 100644 src-java/kilda-history-records/src/checkstyle/checkstyle-suppressions.xml rename src-java/{base-topology/base-storm-topology => kilda-history-records}/src/main/java/org/openkilda/wfm/share/history/model/FlowDumpData.java (100%) rename src-java/{base-topology/base-storm-topology => kilda-history-records}/src/main/java/org/openkilda/wfm/share/history/model/FlowEventData.java (100%) rename src-java/{base-topology/base-storm-topology => kilda-history-records}/src/main/java/org/openkilda/wfm/share/history/model/FlowHistoryData.java (100%) rename src-java/{base-topology/base-storm-topology => kilda-history-records}/src/main/java/org/openkilda/wfm/share/history/model/FlowHistoryHolder.java (100%) rename src-java/{base-topology/base-storm-topology => kilda-history-records}/src/main/java/org/openkilda/wfm/share/history/model/PortEventData.java (100%) rename src-java/{base-topology/base-storm-topology => kilda-history-records}/src/main/java/org/openkilda/wfm/share/history/model/PortHistoryEvent.java (100%) rename src-java/{base-topology/base-storm-topology => kilda-history-records}/src/main/java/org/openkilda/wfm/share/history/service/HistoryService.java (100%) rename src-java/{base-topology/base-storm-topology => kilda-history-records}/src/main/java/org/openkilda/wfm/share/mappers/HistoryMapper.java (100%) rename src-java/{base-topology/base-storm-topology => kilda-history-records}/src/test/java/org/openkilda/wfm/share/mappers/HistoryMapperTest.java (100%) create mode 100644 src-java/kilda-resource-pools/README.md create mode 100644 src-java/kilda-resource-pools/build.gradle create mode 100644 src-java/kilda-resource-pools/src/checkstyle/checkstyle-suppressions.xml rename src-java/{base-topology/base-storm-topology => kilda-resource-pools}/src/main/java/org/openkilda/wfm/share/flow/resources/CookiePool.java (100%) rename src-java/{base-topology/base-storm-topology => kilda-resource-pools}/src/main/java/org/openkilda/wfm/share/flow/resources/EncapsulationResources.java (100%) rename src-java/{base-topology/base-storm-topology => kilda-resource-pools}/src/main/java/org/openkilda/wfm/share/flow/resources/EncapsulationResourcesProvider.java (100%) rename src-java/{base-topology/base-storm-topology => kilda-resource-pools}/src/main/java/org/openkilda/wfm/share/flow/resources/FlowMirrorPathResources.java (100%) rename src-java/{base-topology/base-storm-topology => kilda-resource-pools}/src/main/java/org/openkilda/wfm/share/flow/resources/FlowResources.java (100%) rename src-java/{base-topology/base-storm-topology => kilda-resource-pools}/src/main/java/org/openkilda/wfm/share/flow/resources/FlowResourcesConfig.java (100%) rename src-java/{base-topology/base-storm-topology => kilda-resource-pools}/src/main/java/org/openkilda/wfm/share/flow/resources/FlowResourcesManager.java (100%) rename src-java/{base-topology/base-storm-topology => kilda-resource-pools}/src/main/java/org/openkilda/wfm/share/flow/resources/MeterIdPoolEntityAdapter.java (100%) rename src-java/{base-topology/base-storm-topology => kilda-resource-pools}/src/main/java/org/openkilda/wfm/share/flow/resources/MirrorGroupIdPool.java (100%) rename src-java/{base-topology/base-storm-topology => kilda-resource-pools}/src/main/java/org/openkilda/wfm/share/flow/resources/ResourceAllocationException.java (100%) rename src-java/{base-topology/base-storm-topology => kilda-resource-pools}/src/main/java/org/openkilda/wfm/share/flow/resources/ResourceNotAvailableException.java (100%) rename src-java/{base-topology/base-storm-topology => kilda-resource-pools}/src/main/java/org/openkilda/wfm/share/flow/resources/transitvlan/TransitVlanEncapsulation.java (100%) rename src-java/{base-topology/base-storm-topology => kilda-resource-pools}/src/main/java/org/openkilda/wfm/share/flow/resources/transitvlan/TransitVlanPool.java (100%) rename src-java/{base-topology/base-storm-topology => kilda-resource-pools}/src/main/java/org/openkilda/wfm/share/flow/resources/vxlan/VxlanEncapsulation.java (100%) rename src-java/{base-topology/base-storm-topology => kilda-resource-pools}/src/main/java/org/openkilda/wfm/share/flow/resources/vxlan/VxlanPool.java (100%) rename src-java/{base-topology/base-storm-topology => kilda-resource-pools}/src/main/java/org/openkilda/wfm/share/utils/PoolEntityAdapter.java (100%) rename src-java/{base-topology/base-storm-topology => kilda-resource-pools}/src/main/java/org/openkilda/wfm/share/utils/PoolManager.java (100%) rename src-java/{base-topology/base-storm-topology => kilda-resource-pools}/src/test/java/org/openkilda/wfm/share/flow/resources/CookiePoolTest.java (100%) rename src-java/{base-topology/base-storm-topology => kilda-resource-pools}/src/test/java/org/openkilda/wfm/share/flow/resources/FlowResourcesManagerTest.java (100%) rename src-java/{base-topology/base-storm-topology => kilda-resource-pools}/src/test/java/org/openkilda/wfm/share/flow/resources/transitvlan/TransitVlanPoolTest.java (100%) rename src-java/{base-topology/base-storm-topology => kilda-resource-pools}/src/test/java/org/openkilda/wfm/share/flow/resources/vxlan/VxlanPoolTest.java (100%) rename src-java/{base-topology/base-storm-topology => kilda-resource-pools}/src/test/java/org/openkilda/wfm/share/utils/InMemorySetPoolEntityAdapter.java (100%) rename src-java/{base-topology/base-storm-topology => kilda-resource-pools}/src/test/java/org/openkilda/wfm/share/utils/PoolManagerTest.java (100%) rename src-java/{base-topology/base-storm-topology => kilda-resource-pools}/src/test/java/org/openkilda/wfm/share/utils/PredictablePoolManager.java (100%) rename src-java/{base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error => nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/exceptions}/IllegalSwitchPropertiesException.java (93%) rename src-java/{base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error => nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/exceptions}/IllegalSwitchStateException.java (94%) rename src-java/{base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error => nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/exceptions}/LinkPropsException.java (94%) rename src-java/{base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share => nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker}/mappers/LinkPropsMapper.java (96%) rename src-java/{base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share => nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker}/mappers/PathMapper.java (97%) rename src-java/{base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error => ping-topology/ping-storm-topology/src/main/java/org/openkilda/wfm/topology/ping/exceptions}/WorkflowException.java (95%) rename src-java/{base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/utils => portstate-topology/portstate-storm-topology/src/main/java/org/openkilda/wfm/topology/portstate/bolt}/AbstractKafkaParserBolt.java (91%) rename src-java/{base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error => portstate-topology/portstate-storm-topology/src/main/java/org/openkilda/wfm/topology/portstate/exceptions}/MessageException.java (94%) diff --git a/src-java/base-topology/base-messaging-mappers/build.gradle b/src-java/base-topology/base-messaging-mappers/build.gradle new file mode 100644 index 00000000000..961b69ee720 --- /dev/null +++ b/src-java/base-topology/base-messaging-mappers/build.gradle @@ -0,0 +1,18 @@ +description = 'Base Topology Messaging Mappers' +dependencies { + implementation project(':base-messaging') + + implementation 'com.google.guava:guava' + implementation 'com.fasterxml.jackson.core:jackson-annotations' + testImplementation 'org.junit.jupiter:junit-jupiter-api' + testImplementation 'org.junit.vintage:junit-vintage-engine' + + implementation 'org.mapstruct:mapstruct' + implementation 'org.mapstruct:mapstruct-processor' + annotationProcessor 'org.mapstruct:mapstruct-processor' + testAnnotationProcessor 'org.mapstruct:mapstruct-processor' + + compileOnly 'org.projectlombok:lombok' + annotationProcessor 'org.projectlombok:lombok' + annotationProcessor 'org.projectlombok:lombok-mapstruct-binding' +} diff --git a/src-java/base-topology/base-messaging-mappers/src/checkstyle/checkstyle-suppressions.xml b/src-java/base-topology/base-messaging-mappers/src/checkstyle/checkstyle-suppressions.xml new file mode 100644 index 00000000000..722b573f214 --- /dev/null +++ b/src-java/base-topology/base-messaging-mappers/src/checkstyle/checkstyle-suppressions.xml @@ -0,0 +1,6 @@ + + + + diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/mappers/DetectConnectedDevicesMapper.java b/src-java/base-topology/base-messaging-mappers/src/main/java/org/openkilda/wfm/share/mappers/DetectConnectedDevicesMapper.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/mappers/DetectConnectedDevicesMapper.java rename to src-java/base-topology/base-messaging-mappers/src/main/java/org/openkilda/wfm/share/mappers/DetectConnectedDevicesMapper.java diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/mappers/FeatureTogglesMapper.java b/src-java/base-topology/base-messaging-mappers/src/main/java/org/openkilda/wfm/share/mappers/FeatureTogglesMapper.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/mappers/FeatureTogglesMapper.java rename to src-java/base-topology/base-messaging-mappers/src/main/java/org/openkilda/wfm/share/mappers/FeatureTogglesMapper.java diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/mappers/FlowMapper.java b/src-java/base-topology/base-messaging-mappers/src/main/java/org/openkilda/wfm/share/mappers/FlowMapper.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/mappers/FlowMapper.java rename to src-java/base-topology/base-messaging-mappers/src/main/java/org/openkilda/wfm/share/mappers/FlowMapper.java diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/mappers/FlowPathMapper.java b/src-java/base-topology/base-messaging-mappers/src/main/java/org/openkilda/wfm/share/mappers/FlowPathMapper.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/mappers/FlowPathMapper.java rename to src-java/base-topology/base-messaging-mappers/src/main/java/org/openkilda/wfm/share/mappers/FlowPathMapper.java diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/mappers/IslMapper.java b/src-java/base-topology/base-messaging-mappers/src/main/java/org/openkilda/wfm/share/mappers/IslMapper.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/mappers/IslMapper.java rename to src-java/base-topology/base-messaging-mappers/src/main/java/org/openkilda/wfm/share/mappers/IslMapper.java diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/mappers/KildaConfigurationMapper.java b/src-java/base-topology/base-messaging-mappers/src/main/java/org/openkilda/wfm/share/mappers/KildaConfigurationMapper.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/mappers/KildaConfigurationMapper.java rename to src-java/base-topology/base-messaging-mappers/src/main/java/org/openkilda/wfm/share/mappers/KildaConfigurationMapper.java diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/mappers/PortMapper.java b/src-java/base-topology/base-messaging-mappers/src/main/java/org/openkilda/wfm/share/mappers/PortMapper.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/mappers/PortMapper.java rename to src-java/base-topology/base-messaging-mappers/src/main/java/org/openkilda/wfm/share/mappers/PortMapper.java diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/mappers/SwitchMapper.java b/src-java/base-topology/base-messaging-mappers/src/main/java/org/openkilda/wfm/share/mappers/SwitchMapper.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/mappers/SwitchMapper.java rename to src-java/base-topology/base-messaging-mappers/src/main/java/org/openkilda/wfm/share/mappers/SwitchMapper.java diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/mappers/SwitchPropertiesMapper.java b/src-java/base-topology/base-messaging-mappers/src/main/java/org/openkilda/wfm/share/mappers/SwitchPropertiesMapper.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/mappers/SwitchPropertiesMapper.java rename to src-java/base-topology/base-messaging-mappers/src/main/java/org/openkilda/wfm/share/mappers/SwitchPropertiesMapper.java diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/model/Endpoint.java b/src-java/base-topology/base-messaging-mappers/src/main/java/org/openkilda/wfm/share/model/Endpoint.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/model/Endpoint.java rename to src-java/base-topology/base-messaging-mappers/src/main/java/org/openkilda/wfm/share/model/Endpoint.java diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/model/IslReference.java b/src-java/base-topology/base-messaging-mappers/src/main/java/org/openkilda/wfm/share/model/IslReference.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/model/IslReference.java rename to src-java/base-topology/base-messaging-mappers/src/main/java/org/openkilda/wfm/share/model/IslReference.java diff --git a/src-java/base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/share/mappers/FlowMapperTest.java b/src-java/base-topology/base-messaging-mappers/src/test/java/org/openkilda/wfm/share/mappers/FlowMapperTest.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/share/mappers/FlowMapperTest.java rename to src-java/base-topology/base-messaging-mappers/src/test/java/org/openkilda/wfm/share/mappers/FlowMapperTest.java diff --git a/src-java/base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/share/mappers/IslMapperTest.java b/src-java/base-topology/base-messaging-mappers/src/test/java/org/openkilda/wfm/share/mappers/IslMapperTest.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/share/mappers/IslMapperTest.java rename to src-java/base-topology/base-messaging-mappers/src/test/java/org/openkilda/wfm/share/mappers/IslMapperTest.java diff --git a/src-java/base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/share/mappers/PortMapperTest.java b/src-java/base-topology/base-messaging-mappers/src/test/java/org/openkilda/wfm/share/mappers/PortMapperTest.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/share/mappers/PortMapperTest.java rename to src-java/base-topology/base-messaging-mappers/src/test/java/org/openkilda/wfm/share/mappers/PortMapperTest.java diff --git a/src-java/base-topology/base-messaging/build.gradle b/src-java/base-topology/base-messaging/build.gradle index 0488bb67a9b..17f485f10e3 100644 --- a/src-java/base-topology/base-messaging/build.gradle +++ b/src-java/base-topology/base-messaging/build.gradle @@ -4,8 +4,8 @@ plugins { description = 'Base Topology Messaging' dependencies { - api project(':kilda-model') implementation project(':blue-green') + api project(':kilda-model') implementation 'com.fasterxml.jackson.core:jackson-core' implementation 'com.fasterxml.jackson.core:jackson-annotations' diff --git a/src-java/base-topology/base-storm-topology/build.gradle b/src-java/base-topology/base-storm-topology/build.gradle index c0e9905d94d..b30d1b5897c 100644 --- a/src-java/base-topology/base-storm-topology/build.gradle +++ b/src-java/base-topology/base-storm-topology/build.gradle @@ -22,15 +22,13 @@ compileJava.ajc.options.compilerArgs += '-verbose' description = 'Base Storm Topology' dependencies { + api project(':blue-green') api project(':base-messaging') + api project(':base-messaging-mappers') api project(':kilda-configuration') api project(':kilda-persistence-api') aspect project(':kilda-persistence-api') - api project(':blue-green') - implementation project(':kilda-pce') implementation project(':kilda-reporting') - implementation project(':floodlight-api') - implementation project(':grpc-api') testImplementation project(path: ':kilda-persistence-api', configuration: 'testArtifacts') testImplementation project(path: ':kilda-persistence-tinkerpop', configuration: 'testArtifacts') testImplementation project(':kilda-utils:stubs') diff --git a/src-java/base-topology/base-storm-topology/src/checkstyle/checkstyle-suppressions.xml b/src-java/base-topology/base-storm-topology/src/checkstyle/checkstyle-suppressions.xml index 33c0345692b..8a84ada9b97 100644 --- a/src-java/base-topology/base-storm-topology/src/checkstyle/checkstyle-suppressions.xml +++ b/src-java/base-topology/base-storm-topology/src/checkstyle/checkstyle-suppressions.xml @@ -6,21 +6,10 @@ - - - - - - - - - - - diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/CtrlBoltRef.java b/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/CtrlBoltRef.java deleted file mode 100644 index f93c25572fd..00000000000 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/CtrlBoltRef.java +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright 2018 Telstra Open Source - * - * 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. - */ - -package org.openkilda.wfm; - -import org.openkilda.wfm.ctrl.ICtrlBolt; - -import org.apache.storm.topology.BoltDeclarer; - -public class CtrlBoltRef { - private final String boltId; - private final ICtrlBolt bolt; - private final BoltDeclarer declarer; - - public CtrlBoltRef(String boltId, ICtrlBolt bolt, BoltDeclarer declarer) { - this.boltId = boltId; - this.bolt = bolt; - this.declarer = declarer; - } - - public String getBoltId() { - return boltId; - } - - public ICtrlBolt getBolt() { - return bolt; - } - - public BoltDeclarer getDeclarer() { - return declarer; - } -} diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/WatchDog.java b/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/WatchDog.java deleted file mode 100644 index 6442a0b623a..00000000000 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/WatchDog.java +++ /dev/null @@ -1,60 +0,0 @@ -/* Copyright 2018 Telstra Open Source - * - * 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. - */ - -package org.openkilda.wfm; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class WatchDog { - private static final Logger logger = LoggerFactory.getLogger(WatchDog.class); - - private final long safePeriod; - private long lastReset; - private boolean available = true; - - public WatchDog(float safePeriod) { - this((long) (safePeriod * 1000)); - } - - public WatchDog(long safePeriod) { - this.lastReset = System.currentTimeMillis(); - this.safePeriod = safePeriod; - } - - public void reset() { - lastReset = System.currentTimeMillis(); - logger.debug("Being kicked"); - } - - public boolean isTimeout() { - return ! this.isAvailable(); - } - - public boolean isAvailable() { - long current = System.currentTimeMillis(); - if (current < lastReset) { - lastReset = current; - } - - boolean become = (current - lastReset) < safePeriod; - if (available != become) { - logger.info(String.format("Become %savailable", become ? "" : "un")); - } - available = become; - - return available; - } -} diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/ctrl/RouteAction.java b/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/ctrl/RouteAction.java deleted file mode 100644 index 9485fad83e1..00000000000 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/ctrl/RouteAction.java +++ /dev/null @@ -1,91 +0,0 @@ -/* Copyright 2018 Telstra Open Source - * - * 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. - */ - -package org.openkilda.wfm.ctrl; - -import org.openkilda.messaging.Message; -import org.openkilda.messaging.ctrl.CtrlRequest; -import org.openkilda.wfm.AbstractAction; -import org.openkilda.wfm.IKildaBolt; -import org.openkilda.wfm.error.MessageFormatException; -import org.openkilda.wfm.protocol.KafkaMessage; - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.google.common.base.Strings; -import org.apache.storm.tuple.Tuple; - -import java.nio.file.FileSystem; -import java.nio.file.FileSystems; -import java.nio.file.Path; -import java.nio.file.PathMatcher; -import java.util.List; -import java.util.Map; - -public class RouteAction extends AbstractAction { - private String topologyName; - private Map endpoints; - - public RouteAction( - IKildaBolt bolt, Tuple tuple, - String topologyName, Map endpoint) { - super(bolt, tuple); - - this.topologyName = topologyName; - this.endpoints = endpoint; - } - - @Override - protected void handle() throws MessageFormatException, JsonProcessingException { - KafkaMessage input = new KafkaMessage(getTuple()); - Message payload = input.getPayload(); - - if (! (payload instanceof CtrlRequest)) { - log.debug(String.format( - "Skip foreign message (correlation-id: %s timestamp: %s)", - payload.getCorrelationId(), payload.getTimestamp())); - return; - } - - handleMessage((CtrlRequest) payload); - } - - private void handleMessage(CtrlRequest payload) throws JsonProcessingException { - RouteMessage message = new RouteMessage( - payload.getData(), payload.getCorrelationId(), topologyName); - List packedMessage = message.pack(); - - String glob = payload.getRoute(); - - if (Strings.isNullOrEmpty(glob)) { - glob = "**"; - } else if (glob.equals("*")) { - glob = "**"; - } - - FileSystem fs = FileSystems.getDefault(); - PathMatcher matcher = fs.getPathMatcher("glob:" + glob); - - for (String bolt : endpoints.keySet()) { - Path route = fs.getPath(topologyName, bolt); - - if (! matcher.matches(route)) { - continue; - } - - getOutputCollector().emit( - endpoints.get(bolt), getTuple(), packedMessage); - } - } -} diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/ctrl/RouteBolt.java b/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/ctrl/RouteBolt.java deleted file mode 100644 index 9be8fd4cd33..00000000000 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/ctrl/RouteBolt.java +++ /dev/null @@ -1,88 +0,0 @@ -/* Copyright 2018 Telstra Open Source - * - * 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. - */ - -package org.openkilda.wfm.ctrl; - -import org.openkilda.wfm.IKildaBolt; -import org.openkilda.wfm.error.StreamNameCollisionException; -import org.openkilda.wfm.protocol.KafkaMessage; - -import org.apache.storm.task.OutputCollector; -import org.apache.storm.task.TopologyContext; -import org.apache.storm.topology.OutputFieldsDeclarer; -import org.apache.storm.topology.base.BaseRichBolt; -import org.apache.storm.tuple.Tuple; - -import java.util.HashMap; -import java.util.Map; - -public class RouteBolt extends BaseRichBolt implements IKildaBolt { - private static final String PREFIX_STREAM_ID = "ctrl."; - public static final String STREAM_ID_ERROR = PREFIX_STREAM_ID + "_error"; - - String topologyName; - TopologyContext context; - OutputCollector output; - - HashMap endpointMapping; - - public RouteBolt(String topology) { - topologyName = topology; - - endpointMapping = new HashMap<>(); - } - - public String registerEndpoint(String boltId) throws StreamNameCollisionException { - if (endpointMapping.containsKey(boltId)) { - throw new StreamNameCollisionException(); - } - - String stream = PREFIX_STREAM_ID + boltId; - endpointMapping.put(boltId, stream); - - return stream; - } - - @Override - public void prepare(Map stormConf, TopologyContext context, OutputCollector collector) { - this.context = context; - this.output = collector; - } - - @Override - public void execute(Tuple input) { - RouteAction action = new RouteAction( - this, input, topologyName, endpointMapping); - action.run(); - } - - @Override - public void declareOutputFields(OutputFieldsDeclarer declarer) { - declarer.declareStream(STREAM_ID_ERROR, KafkaMessage.FORMAT); - for (String streamId : endpointMapping.values()) { - declarer.declareStream(streamId, RouteMessage.FORMAT); - } - } - - @Override - public TopologyContext getContext() { - return context; - } - - @Override - public OutputCollector getOutput() { - return output; - } -} diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/ClientException.java b/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/ClientException.java deleted file mode 100644 index cbfc1987462..00000000000 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/ClientException.java +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright 2019 Telstra Open Source - * - * 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. - */ - -package org.openkilda.wfm.error; - -import org.openkilda.messaging.error.ErrorType; -import org.openkilda.messaging.error.MessageException; - -/** - * The exception for notifying warnings. - */ -public class ClientException extends MessageException { - public ClientException( - String correlationId, long timestamp, ErrorType errorType, String errorMessage, String errorDescription) { - super(correlationId, timestamp, errorType, errorMessage, errorDescription); - } -} diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/FeatureTogglesNotEnabledException.java b/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/FeatureTogglesNotEnabledException.java deleted file mode 100644 index e4e92d465ba..00000000000 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/FeatureTogglesNotEnabledException.java +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright 2018 Telstra Open Source - * - * 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. - */ - -package org.openkilda.wfm.error; - -public class FeatureTogglesNotEnabledException extends Exception { - public FeatureTogglesNotEnabledException(String operation) { - super(String.format("Feature toggles not enabled for %s operation.", operation)); - } -} - diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/ImplementationError.java b/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/ImplementationError.java index 7b3e9b1cb85..ea67c6b882d 100644 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/ImplementationError.java +++ b/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/ImplementationError.java @@ -15,6 +15,7 @@ package org.openkilda.wfm.error; +// TODO: revise the purpose of the class (what's specific in this error?) and provide javadoc. public class ImplementationError extends Error { public ImplementationError(String message) { super(message); diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/JsonDecodeException.java b/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/JsonDecodeException.java deleted file mode 100644 index b2bf2d025b9..00000000000 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/JsonDecodeException.java +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright 2018 Telstra Open Source - * - * 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. - */ - -package org.openkilda.wfm.error; - -import lombok.Getter; - -public class JsonDecodeException extends Exception { - @Getter - private final String json; - - public JsonDecodeException(Class klass, String json, Throwable throwable) { - super(formatMessage(klass, throwable), throwable); - this.json = json; - } - - private static String formatMessage(Class klass, Throwable cause) { - return String.format("Can't decode %s object from JSON: %s", klass.getName(), cause); - } -} diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/NameCollisionException.java b/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/NameCollisionException.java deleted file mode 100644 index e7ddba7b74e..00000000000 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/NameCollisionException.java +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright 2018 Telstra Open Source - * - * 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. - */ - -package org.openkilda.wfm.error; - -public class NameCollisionException extends Exception { - public NameCollisionException() { - this("Topology component's ID collision"); - } - - NameCollisionException(String s) { - super(s); - } -} diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/NoPoolResourcesAvailableException.java b/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/NoPoolResourcesAvailableException.java deleted file mode 100644 index 7c71e2b68b2..00000000000 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/NoPoolResourcesAvailableException.java +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright 2021 Telstra Open Source - * - * 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. - */ - -package org.openkilda.wfm.error; - -public class NoPoolResourcesAvailableException extends Exception { - public NoPoolResourcesAvailableException() { - super("Unable to allocate pool entity - all entity slots are busy"); - } -} diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/StreamNameCollisionException.java b/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/StreamNameCollisionException.java deleted file mode 100644 index 03ee296752c..00000000000 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/StreamNameCollisionException.java +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright 2018 Telstra Open Source - * - * 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. - */ - -package org.openkilda.wfm.error; - -public class StreamNameCollisionException extends NameCollisionException { - public StreamNameCollisionException() { - this("Stream ID's collision"); - } - - private StreamNameCollisionException(String s) { - super(s); - } -} diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/protocol/AbstractMessage.java b/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/protocol/AbstractMessage.java index 2b9dc992744..1db75b68fa6 100644 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/protocol/AbstractMessage.java +++ b/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/protocol/AbstractMessage.java @@ -35,6 +35,7 @@ public List pack() throws JsonProcessingException { return Arrays.asList(packed); } + // TODO: revise the purpose and name of the method. protected Object packField(String fieldId) throws JsonProcessingException { throw new ImplementationError(String.format( "Class %s does not implement packField(\"%s\")", diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/ResourceUtils.java b/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/ResourceUtils.java deleted file mode 100644 index 73ba148701b..00000000000 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/ResourceUtils.java +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright 2020 Telstra Open Source - * - * 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. - */ - -package org.openkilda.wfm.share.flow.resources; - -import java.util.Random; - -public final class ResourceUtils { - /** - * Return a random integer value between minValue and maxValue. - */ - public static int computeStartValue(int minValue, int maxValue) { - return new Random().ints(1, minValue, maxValue).iterator().nextInt(); - } - - /** - * Return a random long value between minValue and maxValue. - */ - public static long computeStartValue(long minValue, long maxValue) { - return new Random().longs(1, minValue, maxValue).iterator().nextLong(); - } - - private ResourceUtils() { - throw new UnsupportedOperationException(); - } -} diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/utils/WatchDog.java b/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/utils/WatchDog.java deleted file mode 100644 index c2d8c5b0c19..00000000000 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/utils/WatchDog.java +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright 2018 Telstra Open Source - * - * 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. - */ - -package org.openkilda.wfm.share.utils; - -import lombok.extern.slf4j.Slf4j; - -@Slf4j -public class WatchDog { - private final String name; - private final long safePeriod; - private long lastReset; - private boolean failedNow = false; - - public WatchDog(String name, long safePeriod, long timestamp) { - this.name = name; - this.lastReset = timestamp; - this.safePeriod = safePeriod; - } - - public void reset(long timestamp) { - lastReset = timestamp; - log.debug("WatchDog {}: being kicked", name); - } - - /** - * Check and return current "target" status. - */ - public boolean detectFailure(long timestamp) { - if (timestamp < lastReset) { - lastReset = timestamp; - } - - boolean isFailed = safePeriod < (timestamp - lastReset); - if (failedNow != isFailed) { - log.info("WatchDog {}: become {}", name, isFailed ? "failed" : "recovered"); - } - failedNow = isFailed; - - return isFailed; - } -} diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/AbstractTopology.java b/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/AbstractTopology.java index 473151a1c13..08bda36509a 100644 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/AbstractTopology.java +++ b/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/AbstractTopology.java @@ -36,7 +36,6 @@ import org.openkilda.wfm.config.naming.TopologyNamingStrategy; import org.openkilda.wfm.config.provider.MultiPrefixConfigurationProvider; import org.openkilda.wfm.error.ConfigurationException; -import org.openkilda.wfm.error.NameCollisionException; import org.openkilda.wfm.kafka.AbstractMessageDeserializer; import org.openkilda.wfm.kafka.CustomNamedSubscription; import org.openkilda.wfm.kafka.MessageDeserializer; @@ -161,7 +160,7 @@ private Optional getTopologyWorkers() { return Optional.empty(); } - protected void setup() throws TException, NameCollisionException { + protected void setup() throws TException { if (topologyConfig.getUseLocalCluster()) { setupLocal(); } else { @@ -169,7 +168,7 @@ protected void setup() throws TException, NameCollisionException { } } - private void setupRemote() throws TException, NameCollisionException { + private void setupRemote() throws TException { Config config = makeStormConfig(); config.setDebug(false); @@ -177,7 +176,7 @@ private void setupRemote() throws TException, NameCollisionException { StormSubmitter.submitTopology(topologyName, config, createTopology()); } - private void setupLocal() throws NameCollisionException { + private void setupLocal() { Config config = makeStormConfig(); config.setDebug(true); diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/Topology.java b/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/Topology.java index b210f0e0cb2..19ff08c025a 100644 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/Topology.java +++ b/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/Topology.java @@ -15,8 +15,6 @@ package org.openkilda.wfm.topology; -import org.openkilda.wfm.error.NameCollisionException; - import org.apache.storm.generated.StormTopology; /** @@ -37,5 +35,5 @@ public interface Topology { * * @return {@link StormTopology} */ - StormTopology createTopology() throws NameCollisionException; + StormTopology createTopology(); } diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/flow/model/FlowPathWithEncapsulation.java b/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/flow/model/FlowPathWithEncapsulation.java deleted file mode 100644 index 4ebfb5f3d0b..00000000000 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/flow/model/FlowPathWithEncapsulation.java +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright 2018 Telstra Open Source - * - * 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. - */ - -package org.openkilda.wfm.topology.flow.model; - -import org.openkilda.model.FlowPath; -import org.openkilda.wfm.share.flow.resources.EncapsulationResources; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; - -@AllArgsConstructor -@Builder(toBuilder = true) -@Getter -public class FlowPathWithEncapsulation { - private final FlowPath flowPath; - private final EncapsulationResources encapsulation; -} diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/flow/model/FlowPathsWithEncapsulation.java b/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/flow/model/FlowPathsWithEncapsulation.java deleted file mode 100644 index c58b6ec8b94..00000000000 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/flow/model/FlowPathsWithEncapsulation.java +++ /dev/null @@ -1,117 +0,0 @@ -/* Copyright 2018 Telstra Open Source - * - * 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. - */ - -package org.openkilda.wfm.topology.flow.model; - -import org.openkilda.model.Flow; -import org.openkilda.model.FlowPath; -import org.openkilda.wfm.share.flow.resources.EncapsulationResources; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.ToString; - -@Getter -@ToString(exclude = {"flow"}) -@AllArgsConstructor -@Builder(toBuilder = true) -public class FlowPathsWithEncapsulation { - private final Flow flow; - private final FlowPath forwardPath; - private final FlowPath reversePath; - private final FlowPath protectedForwardPath; - private final FlowPath protectedReversePath; - - private final EncapsulationResources forwardEncapsulation; - private final EncapsulationResources reverseEncapsulation; - private final EncapsulationResources protectedForwardEncapsulation; - private final EncapsulationResources protectedReverseEncapsulation; - - public FlowPathsWithEncapsulation(FlowPathsWithEncapsulation entityToClone) { - flow = new Flow(entityToClone.flow); - if (entityToClone.forwardPath != null) { - forwardPath = new FlowPath(entityToClone.forwardPath, flow); - } else { - forwardPath = null; - } - if (entityToClone.reversePath != null) { - reversePath = new FlowPath(entityToClone.reversePath, flow); - } else { - reversePath = null; - } - if (entityToClone.protectedForwardPath != null) { - protectedForwardPath = new FlowPath(entityToClone.protectedForwardPath, flow); - } else { - protectedForwardPath = null; - } - if (entityToClone.protectedReversePath != null) { - protectedReversePath = new FlowPath(entityToClone.protectedReversePath, flow); - } else { - protectedReversePath = null; - } - forwardEncapsulation = entityToClone.forwardEncapsulation; - reverseEncapsulation = entityToClone.reverseEncapsulation; - protectedForwardEncapsulation = entityToClone.protectedForwardEncapsulation; - protectedReverseEncapsulation = entityToClone.protectedReverseEncapsulation; - } - - /** - * Returns the allocate protected path flag. - */ - public boolean isAllocateProtectedPath() { - return flow.isAllocateProtectedPath(); - } - - /** - * Returns the forward path of the flow. - */ - public FlowPathWithEncapsulation getForward() { - return FlowPathWithEncapsulation.builder() - .flowPath(forwardPath) - .encapsulation(forwardEncapsulation) - .build(); - } - - /** - * Returns the protected forward path of the flow. - */ - public FlowPathWithEncapsulation getProtectedForward() { - return FlowPathWithEncapsulation.builder() - .flowPath(protectedForwardPath) - .encapsulation(protectedForwardEncapsulation) - .build(); - } - - /** - * Returns the reverse path of the flow. - */ - public FlowPathWithEncapsulation getReverse() { - return FlowPathWithEncapsulation.builder() - .flowPath(reversePath) - .encapsulation(reverseEncapsulation) - .build(); - } - - /** - * Returns the protected reverse path of the flow. - */ - public FlowPathWithEncapsulation getProtectedReverse() { - return FlowPathWithEncapsulation.builder() - .flowPath(protectedReversePath) - .encapsulation(protectedReverseEncapsulation) - .build(); - } -} diff --git a/src-java/base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/share/flow/TestFlowBuilder.java b/src-java/base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/share/flow/TestFlowBuilder.java index 1b98f7fa1a1..d79f2f0a4be 100644 --- a/src-java/base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/share/flow/TestFlowBuilder.java +++ b/src-java/base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/share/flow/TestFlowBuilder.java @@ -29,14 +29,7 @@ import org.openkilda.model.PathSegment; import org.openkilda.model.Switch; import org.openkilda.model.SwitchId; -import org.openkilda.model.TransitVlan; -import org.openkilda.model.Vxlan; import org.openkilda.model.cookie.FlowSegmentCookie; -import org.openkilda.wfm.share.flow.resources.EncapsulationResources; -import org.openkilda.wfm.share.flow.resources.transitvlan.TransitVlanEncapsulation; -import org.openkilda.wfm.share.flow.resources.vxlan.VxlanEncapsulation; -import org.openkilda.wfm.topology.flow.model.FlowPathsWithEncapsulation; -import org.openkilda.wfm.topology.flow.model.FlowPathsWithEncapsulation.FlowPathsWithEncapsulationBuilder; import com.google.common.collect.Lists; import lombok.AccessLevel; @@ -234,51 +227,6 @@ private FlowPath buildFlowPath( .build(); } - /** - * Build a UnidirectionalFlow with set properties. - */ - public FlowPathsWithEncapsulation buildFlowPathsWithEncapsulation() { - Flow flow = build(); - FlowPathsWithEncapsulationBuilder encapsulationBuilder = FlowPathsWithEncapsulation.builder() - .flow(flow) - .forwardPath(flow.getForwardPath()) - .forwardEncapsulation( - buildEncapsulationResources(flow.getForwardPathId(), forwardTransitEncapsulationId)) - .reversePath(flow.getReversePath()) - .reverseEncapsulation( - buildEncapsulationResources(flow.getReversePathId(), reverseTransitEncapsulationId)); - if (flow.getProtectedForwardPathId() != null) { - encapsulationBuilder.protectedForwardEncapsulation( - buildEncapsulationResources(flow.getProtectedForwardPathId(), - protectedForwardTransitEncapsulationId)); - } - if (flow.getProtectedReversePathId() != null) { - encapsulationBuilder.protectedReverseEncapsulation( - buildEncapsulationResources(flow.getProtectedReversePathId(), - protectedReverseTransitEncapsulationId)); - } - return encapsulationBuilder.build(); - } - - private EncapsulationResources buildEncapsulationResources(PathId pathId, int encapsulationId) { - if (FlowEncapsulationType.TRANSIT_VLAN.equals(encapsulationType)) { - TransitVlan transitVlan = TransitVlan.builder() - .flowId(flowId) - .pathId(pathId) - .vlan(encapsulationId > 0 ? encapsulationId : srcVlan + destVlan + 1) - .build(); - return TransitVlanEncapsulation.builder().transitVlan(transitVlan).build(); - } else if (FlowEncapsulationType.VXLAN.equals(encapsulationType)) { - Vxlan vxlan = Vxlan.builder() - .flowId(flowId) - .pathId(pathId) - .vni(encapsulationId > 0 ? encapsulationId : srcVlan + destVlan + 1) - .build(); - return VxlanEncapsulation.builder().vxlan(vxlan).build(); - } - throw new IllegalStateException("Unsupported encapsulation type: " + encapsulationType); - } - @Data @AllArgsConstructor @NoArgsConstructor diff --git a/src-java/connecteddevices-topology/connecteddevices-storm-topology/build.gradle b/src-java/connecteddevices-topology/connecteddevices-storm-topology/build.gradle index ef71fe9da82..6d1a1dbf9bc 100644 --- a/src-java/connecteddevices-topology/connecteddevices-storm-topology/build.gradle +++ b/src-java/connecteddevices-topology/connecteddevices-storm-topology/build.gradle @@ -8,8 +8,8 @@ compileJava.ajc.options.compilerArgs += '-verbose' description = 'Connected Devices Storm Topology' dependencies { - implementation project(':base-storm-topology') implementation project(':blue-green') + implementation project(':base-storm-topology') runtimeOnly project(path: ':base-storm-topology', configuration: 'releaseArtifacts') testImplementation project(path: ':base-storm-topology', configuration: 'testArtifacts') runtimeOnly project(':kilda-persistence-orientdb') diff --git a/src-java/floodlight-service/floodlight-modules/build.gradle b/src-java/floodlight-service/floodlight-modules/build.gradle index 4e2454cb668..ced6d82760b 100644 --- a/src-java/floodlight-service/floodlight-modules/build.gradle +++ b/src-java/floodlight-service/floodlight-modules/build.gradle @@ -7,13 +7,13 @@ compileJava.ajc.options.compilerArgs += '-verbose' description = 'Floodlight Service Modules' dependencies { - implementation project(':floodlight-api') + implementation project(':blue-green') implementation project(':kilda-configuration') implementation project(':kilda-model') implementation project(':kilda-reporting') - implementation project(':blue-green') - implementation project(':rule-manager-api') testImplementation project(':kilda-utils:stubs') + implementation project(':floodlight-api') + implementation project(':rule-manager-api') implementation('org.projectfloodlight:openflowj') compileOnly('org.projectfloodlight:floodlight') diff --git a/src-java/floodlightrouter-topology/floodlightrouter-storm-topology/build.gradle b/src-java/floodlightrouter-topology/floodlightrouter-storm-topology/build.gradle index 70b77e68b5c..6decd202cd3 100644 --- a/src-java/floodlightrouter-topology/floodlightrouter-storm-topology/build.gradle +++ b/src-java/floodlightrouter-topology/floodlightrouter-storm-topology/build.gradle @@ -8,15 +8,15 @@ compileJava.ajc.options.compilerArgs += '-verbose' description = 'Floodlight Router Storm Topology' dependencies { + implementation project(':blue-green') implementation project(':base-storm-topology') runtimeOnly project(path: ':base-storm-topology', configuration: 'releaseArtifacts') testImplementation project(path: ':base-storm-topology', configuration: 'testArtifacts') testImplementation project(':kilda-utils:stubs') - implementation project(':floodlight-api') - implementation project(':blue-green') runtimeOnly project(':kilda-persistence-orientdb') runtimeOnly project(':kilda-persistence-hibernate') testImplementation project(path: ':kilda-persistence-tinkerpop', configuration: 'testArtifacts') + implementation project(':floodlight-api') implementation 'org.mapstruct:mapstruct' implementation 'org.mapstruct:mapstruct-processor' diff --git a/src-java/flowhs-topology/flowhs-messaging/build.gradle b/src-java/flowhs-topology/flowhs-messaging/build.gradle index 11f08b8fd24..c26d7911352 100644 --- a/src-java/flowhs-topology/flowhs-messaging/build.gradle +++ b/src-java/flowhs-topology/flowhs-messaging/build.gradle @@ -6,7 +6,6 @@ description = 'Flow H&S Topology Messaging' dependencies { api project(':base-messaging') implementation project(':blue-green') - testImplementation project(path: ':base-messaging', configuration: 'testArtifacts') implementation 'com.fasterxml.jackson.core:jackson-core' diff --git a/src-java/flowhs-topology/flowhs-storm-topology/build.gradle b/src-java/flowhs-topology/flowhs-storm-topology/build.gradle index 70f15816cce..dbb940175c9 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/build.gradle +++ b/src-java/flowhs-topology/flowhs-storm-topology/build.gradle @@ -9,25 +9,27 @@ compileJava.ajc.options.compilerArgs += '-verbose' description = 'Flow H&S Storm Topology' dependencies { implementation project(':blue-green') - implementation project(':flowhs-messaging') - implementation project(':flowmonitoring-messaging') - implementation project(':ping-messaging') - implementation project(':reroute-messaging') - implementation project(':server42-control-messaging') implementation project(':base-storm-topology') - implementation project(':stats-messaging') aspect project(':base-storm-topology') runtimeOnly project(path: ':base-storm-topology', configuration: 'releaseArtifacts') testImplementation project(path: ':base-storm-topology', configuration: 'testArtifacts') implementation project(':kilda-pce') - implementation project(':rule-manager-api') - implementation project(':rule-manager-implementation') implementation project(':kilda-reporting') - implementation project(':floodlight-api') + implementation project(':kilda-resource-pools') + implementation project(':kilda-history-records') runtimeOnly project(':kilda-persistence-orientdb') runtimeOnly project(':kilda-persistence-hibernate') testImplementation project(path: ':kilda-persistence-api', configuration: 'testArtifacts') testImplementation project(path: ':kilda-persistence-tinkerpop', configuration: 'testArtifacts') + implementation project(':rule-manager-api') + implementation project(':rule-manager-implementation') + implementation project(':flowhs-messaging') + implementation project(':flowmonitoring-messaging') + implementation project(':ping-messaging') + implementation project(':reroute-messaging') + implementation project(':server42-control-messaging') + implementation project(':stats-messaging') + implementation project(':floodlight-api') compileOnly('org.apache.storm:storm-core') testImplementation('org.apache.storm:storm-core') diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/FlowCreateHubBolt.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/FlowCreateHubBolt.java index 990f43cbb01..4f8ce2010fd 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/FlowCreateHubBolt.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/FlowCreateHubBolt.java @@ -50,8 +50,8 @@ import org.openkilda.wfm.share.zk.ZkStreams; import org.openkilda.wfm.share.zk.ZooKeeperBolt; import org.openkilda.wfm.topology.flowhs.FlowHsTopology.Stream; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.mapper.RequestedFlowMapper; import org.openkilda.wfm.topology.flowhs.model.RequestedFlow; import org.openkilda.wfm.topology.flowhs.service.FlowCreateService; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/FlowDeleteHubBolt.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/FlowDeleteHubBolt.java index 4ca605c7fdd..e4fb6e12c6f 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/FlowDeleteHubBolt.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/FlowDeleteHubBolt.java @@ -47,8 +47,8 @@ import org.openkilda.wfm.share.zk.ZkStreams; import org.openkilda.wfm.share.zk.ZooKeeperBolt; import org.openkilda.wfm.topology.flowhs.FlowHsTopology.Stream; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.service.FlowDeleteService; import org.openkilda.wfm.topology.flowhs.service.FlowGenericCarrier; import org.openkilda.wfm.topology.utils.MessageKafkaTranslator; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/FlowPathSwapHubBolt.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/FlowPathSwapHubBolt.java index 3d948cb6884..0799e1947d0 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/FlowPathSwapHubBolt.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/FlowPathSwapHubBolt.java @@ -47,8 +47,8 @@ import org.openkilda.wfm.share.zk.ZkStreams; import org.openkilda.wfm.share.zk.ZooKeeperBolt; import org.openkilda.wfm.topology.flowhs.FlowHsTopology.Stream; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.service.FlowPathSwapHubCarrier; import org.openkilda.wfm.topology.flowhs.service.FlowPathSwapService; import org.openkilda.wfm.topology.utils.MessageKafkaTranslator; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/FlowRerouteHubBolt.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/FlowRerouteHubBolt.java index c6e23caea22..b79fcdbb305 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/FlowRerouteHubBolt.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/FlowRerouteHubBolt.java @@ -52,7 +52,7 @@ import org.openkilda.wfm.share.zk.ZkStreams; import org.openkilda.wfm.share.zk.ZooKeeperBolt; import org.openkilda.wfm.topology.flowhs.FlowHsTopology.Stream; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.service.FlowRerouteHubCarrier; import org.openkilda.wfm.topology.flowhs.service.FlowRerouteService; import org.openkilda.wfm.topology.utils.MessageKafkaTranslator; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/FlowSyncHubBolt.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/FlowSyncHubBolt.java index d7c6d50fde6..b157a3284af 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/FlowSyncHubBolt.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/FlowSyncHubBolt.java @@ -46,8 +46,8 @@ import org.openkilda.wfm.share.zk.ZooKeeperBolt; import org.openkilda.wfm.topology.flowhs.FlowHsTopology.ComponentId; import org.openkilda.wfm.topology.flowhs.FlowHsTopology.Stream; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.model.path.FlowPathOperationConfig; import org.openkilda.wfm.topology.flowhs.model.path.FlowPathRequest; import org.openkilda.wfm.topology.flowhs.model.path.FlowPathResult; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/FlowUpdateHubBolt.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/FlowUpdateHubBolt.java index 30142554a48..59666d7f219 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/FlowUpdateHubBolt.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/FlowUpdateHubBolt.java @@ -56,8 +56,8 @@ import org.openkilda.wfm.share.zk.ZkStreams; import org.openkilda.wfm.share.zk.ZooKeeperBolt; import org.openkilda.wfm.topology.flowhs.FlowHsTopology.Stream; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.mapper.RequestedFlowMapper; import org.openkilda.wfm.topology.flowhs.model.RequestedFlow; import org.openkilda.wfm.topology.flowhs.service.FlowUpdateHubCarrier; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/FlowValidationHubBolt.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/FlowValidationHubBolt.java index f269432e9bc..5c829e3b02b 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/FlowValidationHubBolt.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/FlowValidationHubBolt.java @@ -37,8 +37,8 @@ import org.openkilda.wfm.share.zk.ZkStreams; import org.openkilda.wfm.share.zk.ZooKeeperBolt; import org.openkilda.wfm.topology.flowhs.FlowHsTopology.Stream; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.service.FlowValidationHubCarrier; import org.openkilda.wfm.topology.flowhs.service.FlowValidationHubService; import org.openkilda.wfm.topology.utils.MessageKafkaTranslator; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/YFlowCreateHubBolt.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/YFlowCreateHubBolt.java index cc4b9874813..e1b68e48cf3 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/YFlowCreateHubBolt.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/YFlowCreateHubBolt.java @@ -55,8 +55,8 @@ import org.openkilda.wfm.share.zk.ZooKeeperBolt; import org.openkilda.wfm.topology.flowhs.FlowHsTopology.Stream; import org.openkilda.wfm.topology.flowhs.bolts.FlowCreateHubBolt.FlowCreateConfig; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.mapper.RequestedFlowMapper; import org.openkilda.wfm.topology.flowhs.model.RequestedFlow; import org.openkilda.wfm.topology.flowhs.service.FlowCreateService; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/YFlowDeleteHubBolt.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/YFlowDeleteHubBolt.java index c0e5f8b60c1..a1c638c0215 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/YFlowDeleteHubBolt.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/YFlowDeleteHubBolt.java @@ -51,8 +51,8 @@ import org.openkilda.wfm.share.zk.ZkStreams; import org.openkilda.wfm.share.zk.ZooKeeperBolt; import org.openkilda.wfm.topology.flowhs.FlowHsTopology.Stream; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.service.FlowDeleteService; import org.openkilda.wfm.topology.flowhs.service.FlowGenericCarrier; import org.openkilda.wfm.topology.flowhs.service.yflow.YFlowDeleteService; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/YFlowPathSwapHubBolt.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/YFlowPathSwapHubBolt.java index d4e9c58b5a8..2f6627bf3c9 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/YFlowPathSwapHubBolt.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/YFlowPathSwapHubBolt.java @@ -46,8 +46,8 @@ import org.openkilda.wfm.share.zk.ZkStreams; import org.openkilda.wfm.share.zk.ZooKeeperBolt; import org.openkilda.wfm.topology.flowhs.FlowHsTopology.Stream; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.service.FlowGenericCarrier; import org.openkilda.wfm.topology.flowhs.service.FlowPathSwapHubCarrier; import org.openkilda.wfm.topology.flowhs.service.FlowPathSwapService; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/YFlowRerouteHubBolt.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/YFlowRerouteHubBolt.java index 6e6c1833659..2ee17f2ea90 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/YFlowRerouteHubBolt.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/YFlowRerouteHubBolt.java @@ -58,8 +58,8 @@ import org.openkilda.wfm.share.zk.ZooKeeperBolt; import org.openkilda.wfm.topology.flowhs.FlowHsTopology.Stream; import org.openkilda.wfm.topology.flowhs.bolts.FlowRerouteHubBolt.FlowRerouteConfig; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.mapper.RequestedFlowMapper; import org.openkilda.wfm.topology.flowhs.model.RequestedFlow; import org.openkilda.wfm.topology.flowhs.service.FlowRerouteHubCarrier; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/YFlowUpdateHubBolt.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/YFlowUpdateHubBolt.java index cd638cd5fe5..b01c2661976 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/YFlowUpdateHubBolt.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/YFlowUpdateHubBolt.java @@ -59,9 +59,9 @@ import org.openkilda.wfm.share.zk.ZooKeeperBolt; import org.openkilda.wfm.topology.flowhs.FlowHsTopology.Stream; import org.openkilda.wfm.topology.flowhs.bolts.FlowUpdateHubBolt.FlowUpdateConfig; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.mapper.RequestedFlowMapper; import org.openkilda.wfm.topology.flowhs.model.RequestedFlow; import org.openkilda.wfm.topology.flowhs.service.FlowUpdateHubCarrier; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/YFlowValidationHubBolt.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/YFlowValidationHubBolt.java index b2d409ad447..44b6ba8039a 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/YFlowValidationHubBolt.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/bolts/YFlowValidationHubBolt.java @@ -36,8 +36,8 @@ import org.openkilda.wfm.share.zk.ZkStreams; import org.openkilda.wfm.share.zk.ZooKeeperBolt; import org.openkilda.wfm.topology.flowhs.FlowHsTopology.Stream; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.fsm.yflow.validation.YFlowValidationService; import org.openkilda.wfm.topology.flowhs.service.FlowValidationHubCarrier; import org.openkilda.wfm.topology.flowhs.service.FlowValidationHubService; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/exception/DuplicateKeyException.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/exceptions/DuplicateKeyException.java similarity index 94% rename from src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/exception/DuplicateKeyException.java rename to src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/exceptions/DuplicateKeyException.java index 23d30e239e9..ba883c32342 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/exception/DuplicateKeyException.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/exceptions/DuplicateKeyException.java @@ -13,7 +13,7 @@ * limitations under the License. */ -package org.openkilda.wfm.topology.flowhs.exception; +package org.openkilda.wfm.topology.flowhs.exceptions; import lombok.Getter; diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/FlowAlreadyExistException.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/exceptions/FlowAlreadyExistException.java similarity index 94% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/FlowAlreadyExistException.java rename to src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/exceptions/FlowAlreadyExistException.java index 489c05f25bf..ee9f3a0b79e 100644 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/FlowAlreadyExistException.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/exceptions/FlowAlreadyExistException.java @@ -13,7 +13,7 @@ * limitations under the License. */ -package org.openkilda.wfm.error; +package org.openkilda.wfm.topology.flowhs.exceptions; /** * {@code FlowAlreadyExistException} indicates that a flow already exist. diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/exception/FlowProcessingException.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/exceptions/FlowProcessingException.java similarity index 95% rename from src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/exception/FlowProcessingException.java rename to src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/exceptions/FlowProcessingException.java index 3ce44fbbecf..aa82470bb06 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/exception/FlowProcessingException.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/exceptions/FlowProcessingException.java @@ -13,7 +13,7 @@ * limitations under the License. */ -package org.openkilda.wfm.topology.flowhs.exception; +package org.openkilda.wfm.topology.flowhs.exceptions; import org.openkilda.messaging.error.ErrorType; diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/IllegalFlowStateException.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/exceptions/IllegalFlowStateException.java similarity index 94% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/IllegalFlowStateException.java rename to src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/exceptions/IllegalFlowStateException.java index bd7692f16b0..d0c9611460f 100644 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/IllegalFlowStateException.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/exceptions/IllegalFlowStateException.java @@ -13,7 +13,7 @@ * limitations under the License. */ -package org.openkilda.wfm.error; +package org.openkilda.wfm.topology.flowhs.exceptions; /** * Exception which indicates that some flow operation couldn't be completed because the flow is in illegal state. diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/exception/InsufficientDataException.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/exceptions/InsufficientDataException.java similarity index 93% rename from src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/exception/InsufficientDataException.java rename to src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/exceptions/InsufficientDataException.java index c3ba7b815b3..b03f67e08dd 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/exception/InsufficientDataException.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/exceptions/InsufficientDataException.java @@ -13,7 +13,7 @@ * limitations under the License. */ -package org.openkilda.wfm.topology.flowhs.exception; +package org.openkilda.wfm.topology.flowhs.exceptions; public class InsufficientDataException extends Exception { public InsufficientDataException(String message) { diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/exception/UnknownKeyException.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/exceptions/UnknownKeyException.java similarity index 94% rename from src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/exception/UnknownKeyException.java rename to src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/exceptions/UnknownKeyException.java index a826ce73836..32c4ca6a434 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/exception/UnknownKeyException.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/exceptions/UnknownKeyException.java @@ -13,7 +13,7 @@ * limitations under the License. */ -package org.openkilda.wfm.topology.flowhs.exception; +package org.openkilda.wfm.topology.flowhs.exceptions; import lombok.Getter; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/YFlowProcessingFsm.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/YFlowProcessingFsm.java index ad1a888cd46..e696018121d 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/YFlowProcessingFsm.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/YFlowProcessingFsm.java @@ -23,7 +23,7 @@ import org.openkilda.model.FlowStatus; import org.openkilda.model.SwitchId; import org.openkilda.wfm.CommandContext; -import org.openkilda.wfm.topology.flowhs.exception.InsufficientDataException; +import org.openkilda.wfm.topology.flowhs.exceptions.InsufficientDataException; import org.openkilda.wfm.topology.flowhs.model.yflow.YFlowResources; import org.openkilda.wfm.topology.flowhs.service.FlowGenericCarrier; import org.openkilda.wfm.topology.flowhs.service.common.ProcessingEventListener; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/AllocateYFlowResourcesAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/AllocateYFlowResourcesAction.java index edb5928658d..fdb1a19562c 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/AllocateYFlowResourcesAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/AllocateYFlowResourcesAction.java @@ -29,7 +29,7 @@ import org.openkilda.persistence.exceptions.ConstraintViolationException; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; import org.openkilda.wfm.share.flow.resources.ResourceAllocationException; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.YFlowProcessingFsm; import org.openkilda.wfm.topology.flowhs.model.yflow.YFlowResources; import org.openkilda.wfm.topology.flowhs.model.yflow.YFlowResources.EndpointResources; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/BaseFlowPathRemovalAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/BaseFlowPathRemovalAction.java index ef6f35f3e4e..04498544fba 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/BaseFlowPathRemovalAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/BaseFlowPathRemovalAction.java @@ -24,8 +24,8 @@ import org.openkilda.wfm.share.history.model.FlowDumpData; import org.openkilda.wfm.share.history.model.FlowDumpData.DumpType; import org.openkilda.wfm.share.mappers.HistoryMapper; -import org.openkilda.wfm.topology.flow.model.FlowPathPair; import org.openkilda.wfm.topology.flowhs.fsm.common.FlowProcessingWithHistorySupportFsm; +import org.openkilda.wfm.topology.flowhs.model.FlowPathPair; import lombok.extern.slf4j.Slf4j; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/BaseFlowRuleRemovalAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/BaseFlowRuleRemovalAction.java index 2cf37860f01..d6bfc6dac1b 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/BaseFlowRuleRemovalAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/BaseFlowRuleRemovalAction.java @@ -21,11 +21,11 @@ import org.openkilda.model.SwitchProperties; import org.openkilda.persistence.PersistenceManager; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; -import org.openkilda.wfm.share.model.SpeakerRequestBuildContext; -import org.openkilda.wfm.share.model.SpeakerRequestBuildContext.PathContext; import org.openkilda.wfm.topology.flowhs.fsm.common.FlowProcessingWithHistorySupportFsm; import org.openkilda.wfm.topology.flowhs.model.RequestedFlow; -import org.openkilda.wfm.topology.flowhs.service.FlowCommandBuilderFactory; +import org.openkilda.wfm.topology.flowhs.service.speaker.FlowCommandBuilderFactory; +import org.openkilda.wfm.topology.flowhs.service.speaker.SpeakerRequestBuildContext; +import org.openkilda.wfm.topology.flowhs.service.speaker.SpeakerRequestBuildContext.PathContext; import lombok.extern.slf4j.Slf4j; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/BaseResourceAllocationAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/BaseResourceAllocationAction.java index c327f3bc14f..7671f18ca7c 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/BaseResourceAllocationAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/BaseResourceAllocationAction.java @@ -54,9 +54,9 @@ import org.openkilda.wfm.share.history.model.FlowDumpData.DumpType; import org.openkilda.wfm.share.logger.FlowOperationsDashboardLogger; import org.openkilda.wfm.share.mappers.HistoryMapper; -import org.openkilda.wfm.topology.flow.model.FlowPathPair; import org.openkilda.wfm.topology.flowhs.fsm.common.FlowPathSwappingFsm; -import org.openkilda.wfm.topology.flowhs.service.FlowPathBuilder; +import org.openkilda.wfm.topology.flowhs.model.FlowPathPair; +import org.openkilda.wfm.topology.flowhs.service.common.FlowPathBuilder; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Suppliers; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/FlowProcessingWithHistorySupportAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/FlowProcessingWithHistorySupportAction.java index c152ec09b9b..564ce0594b5 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/FlowProcessingWithHistorySupportAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/FlowProcessingWithHistorySupportAction.java @@ -43,10 +43,10 @@ import org.openkilda.persistence.tx.TransactionManager; import org.openkilda.wfm.CommandContext; import org.openkilda.wfm.share.mappers.FlowMapper; -import org.openkilda.wfm.share.model.SpeakerRequestBuildContext; -import org.openkilda.wfm.share.model.SpeakerRequestBuildContext.PathContext; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.FlowProcessingWithHistorySupportFsm; +import org.openkilda.wfm.topology.flowhs.service.speaker.SpeakerRequestBuildContext; +import org.openkilda.wfm.topology.flowhs.service.speaker.SpeakerRequestBuildContext.PathContext; import com.fasterxml.uuid.Generators; import com.fasterxml.uuid.NoArgGenerator; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/NbTrackableAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/NbTrackableAction.java index 28cc05fbdb9..601c7e0366b 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/NbTrackableAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/NbTrackableAction.java @@ -19,7 +19,7 @@ import org.openkilda.messaging.Message; import org.openkilda.messaging.error.ErrorType; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.NbTrackableFlowProcessingFsm; import lombok.extern.slf4j.Slf4j; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/NbTrackableWithHistorySupportAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/NbTrackableWithHistorySupportAction.java index 85ac2912081..73fd4c0a45c 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/NbTrackableWithHistorySupportAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/NbTrackableWithHistorySupportAction.java @@ -20,7 +20,7 @@ import org.openkilda.messaging.Message; import org.openkilda.messaging.error.ErrorType; import org.openkilda.persistence.PersistenceManager; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.FlowProcessingWithHistorySupportFsm; import lombok.extern.slf4j.Slf4j; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/YFlowProcessingAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/YFlowProcessingAction.java index c8e50c87ead..d139d67681e 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/YFlowProcessingAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/YFlowProcessingAction.java @@ -23,7 +23,7 @@ import org.openkilda.persistence.repositories.RepositoryFactory; import org.openkilda.persistence.repositories.YFlowRepository; import org.openkilda.persistence.tx.TransactionManager; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.FlowProcessingFsm; import lombok.extern.slf4j.Slf4j; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/YFlowProcessingWithHistorySupportAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/YFlowProcessingWithHistorySupportAction.java index 52386d904a6..1aea7befc85 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/YFlowProcessingWithHistorySupportAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/YFlowProcessingWithHistorySupportAction.java @@ -25,7 +25,7 @@ import org.openkilda.persistence.repositories.RepositoryFactory; import org.openkilda.persistence.repositories.YFlowRepository; import org.openkilda.persistence.tx.TransactionManager; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.FlowProcessingWithHistorySupportFsm; import com.fasterxml.uuid.Generators; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/create/actions/CompleteFlowCreateAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/create/actions/CompleteFlowCreateAction.java index fb24c862f8f..74d2bda7035 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/create/actions/CompleteFlowCreateAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/create/actions/CompleteFlowCreateAction.java @@ -22,7 +22,7 @@ import org.openkilda.model.FlowStatus; import org.openkilda.persistence.PersistenceManager; import org.openkilda.wfm.share.logger.FlowOperationsDashboardLogger; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.FlowProcessingWithHistorySupportAction; import org.openkilda.wfm.topology.flowhs.fsm.create.FlowCreateContext; import org.openkilda.wfm.topology.flowhs.fsm.create.FlowCreateFsm; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/create/actions/FlowValidateAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/create/actions/FlowValidateAction.java index 65212138d22..ff245088e9a 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/create/actions/FlowValidateAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/create/actions/FlowValidateAction.java @@ -25,7 +25,7 @@ import org.openkilda.persistence.repositories.YFlowRepository; import org.openkilda.wfm.share.history.model.FlowEventData; import org.openkilda.wfm.share.logger.FlowOperationsDashboardLogger; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.NbTrackableWithHistorySupportAction; import org.openkilda.wfm.topology.flowhs.fsm.create.FlowCreateContext; import org.openkilda.wfm.topology.flowhs.fsm.create.FlowCreateFsm; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/create/actions/ResourcesAllocationAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/create/actions/ResourcesAllocationAction.java index 67c0829a48e..8d1ef1c7d15 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/create/actions/ResourcesAllocationAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/create/actions/ResourcesAllocationAction.java @@ -46,7 +46,6 @@ import org.openkilda.persistence.repositories.SwitchPropertiesRepository; import org.openkilda.persistence.repositories.YFlowRepository; import org.openkilda.wfm.CommandContext; -import org.openkilda.wfm.error.FlowAlreadyExistException; import org.openkilda.wfm.error.FlowNotFoundException; import org.openkilda.wfm.share.flow.resources.FlowResources; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; @@ -54,8 +53,8 @@ import org.openkilda.wfm.share.history.model.FlowDumpData; import org.openkilda.wfm.share.history.model.FlowDumpData.DumpType; import org.openkilda.wfm.share.mappers.HistoryMapper; -import org.openkilda.wfm.share.model.SpeakerRequestBuildContext; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowAlreadyExistException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.NbTrackableWithHistorySupportAction; import org.openkilda.wfm.topology.flowhs.fsm.create.FlowCreateContext; import org.openkilda.wfm.topology.flowhs.fsm.create.FlowCreateFsm; @@ -63,9 +62,10 @@ import org.openkilda.wfm.topology.flowhs.fsm.create.FlowCreateFsm.State; import org.openkilda.wfm.topology.flowhs.mapper.RequestedFlowMapper; import org.openkilda.wfm.topology.flowhs.model.RequestedFlow; -import org.openkilda.wfm.topology.flowhs.service.FlowCommandBuilder; -import org.openkilda.wfm.topology.flowhs.service.FlowCommandBuilderFactory; -import org.openkilda.wfm.topology.flowhs.service.FlowPathBuilder; +import org.openkilda.wfm.topology.flowhs.service.common.FlowPathBuilder; +import org.openkilda.wfm.topology.flowhs.service.speaker.FlowCommandBuilder; +import org.openkilda.wfm.topology.flowhs.service.speaker.FlowCommandBuilderFactory; +import org.openkilda.wfm.topology.flowhs.service.speaker.SpeakerRequestBuildContext; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/create/actions/ResourcesDeallocationAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/create/actions/ResourcesDeallocationAction.java index f876cf1f256..f7f81156dbd 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/create/actions/ResourcesDeallocationAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/create/actions/ResourcesDeallocationAction.java @@ -23,7 +23,7 @@ import org.openkilda.persistence.repositories.IslRepository; import org.openkilda.wfm.share.flow.resources.FlowResources; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.FlowProcessingWithHistorySupportAction; import org.openkilda.wfm.topology.flowhs.fsm.create.FlowCreateContext; import org.openkilda.wfm.topology.flowhs.fsm.create.FlowCreateFsm; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/delete/actions/CompleteFlowPathRemovalAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/delete/actions/CompleteFlowPathRemovalAction.java index 50fb212bb25..6390f4628c2 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/delete/actions/CompleteFlowPathRemovalAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/delete/actions/CompleteFlowPathRemovalAction.java @@ -21,12 +21,12 @@ import org.openkilda.persistence.repositories.FlowMirrorPathRepository; import org.openkilda.persistence.repositories.FlowMirrorPointsRepository; import org.openkilda.wfm.share.flow.resources.FlowMirrorPathResources; -import org.openkilda.wfm.topology.flow.model.FlowPathPair; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.BaseFlowPathRemovalAction; import org.openkilda.wfm.topology.flowhs.fsm.delete.FlowDeleteContext; import org.openkilda.wfm.topology.flowhs.fsm.delete.FlowDeleteFsm; import org.openkilda.wfm.topology.flowhs.fsm.delete.FlowDeleteFsm.Event; import org.openkilda.wfm.topology.flowhs.fsm.delete.FlowDeleteFsm.State; +import org.openkilda.wfm.topology.flowhs.model.FlowPathPair; import lombok.extern.slf4j.Slf4j; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/delete/actions/RemoveRulesAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/delete/actions/RemoveRulesAction.java index 9e40b06c8cb..747adb824fa 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/delete/actions/RemoveRulesAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/delete/actions/RemoveRulesAction.java @@ -26,15 +26,15 @@ import org.openkilda.wfm.share.flow.resources.FlowResources; import org.openkilda.wfm.share.flow.resources.FlowResources.PathResources; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; -import org.openkilda.wfm.share.model.MirrorContext; -import org.openkilda.wfm.share.model.SpeakerRequestBuildContext; -import org.openkilda.wfm.share.model.SpeakerRequestBuildContext.PathContext; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.BaseFlowRuleRemovalAction; import org.openkilda.wfm.topology.flowhs.fsm.delete.FlowDeleteContext; import org.openkilda.wfm.topology.flowhs.fsm.delete.FlowDeleteFsm; import org.openkilda.wfm.topology.flowhs.fsm.delete.FlowDeleteFsm.Event; import org.openkilda.wfm.topology.flowhs.fsm.delete.FlowDeleteFsm.State; -import org.openkilda.wfm.topology.flowhs.service.FlowCommandBuilder; +import org.openkilda.wfm.topology.flowhs.service.speaker.FlowCommandBuilder; +import org.openkilda.wfm.topology.flowhs.service.speaker.MirrorContext; +import org.openkilda.wfm.topology.flowhs.service.speaker.SpeakerRequestBuildContext; +import org.openkilda.wfm.topology.flowhs.service.speaker.SpeakerRequestBuildContext.PathContext; import org.openkilda.wfm.topology.flowhs.utils.SpeakerRemoveSegmentEmitter; import lombok.extern.slf4j.Slf4j; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/delete/actions/ValidateFlowAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/delete/actions/ValidateFlowAction.java index b3d69b20621..1a104d8ae00 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/delete/actions/ValidateFlowAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/delete/actions/ValidateFlowAction.java @@ -26,7 +26,7 @@ import org.openkilda.persistence.repositories.RepositoryFactory; import org.openkilda.wfm.share.history.model.FlowEventData; import org.openkilda.wfm.share.logger.FlowOperationsDashboardLogger; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.NbTrackableWithHistorySupportAction; import org.openkilda.wfm.topology.flowhs.fsm.delete.FlowDeleteContext; import org.openkilda.wfm.topology.flowhs.fsm.delete.FlowDeleteFsm; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/mirrorpoint/create/actions/EmitUpdateRulesRequestsAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/mirrorpoint/create/actions/EmitUpdateRulesRequestsAction.java index 5e542275ce8..61b8acbc7a4 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/mirrorpoint/create/actions/EmitUpdateRulesRequestsAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/mirrorpoint/create/actions/EmitUpdateRulesRequestsAction.java @@ -28,17 +28,17 @@ import org.openkilda.persistence.repositories.FlowMirrorPointsRepository; import org.openkilda.wfm.CommandContext; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; -import org.openkilda.wfm.share.model.MirrorContext; -import org.openkilda.wfm.share.model.SpeakerRequestBuildContext; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.FlowProcessingWithHistorySupportAction; import org.openkilda.wfm.topology.flowhs.fsm.mirrorpoint.create.FlowMirrorPointCreateContext; import org.openkilda.wfm.topology.flowhs.fsm.mirrorpoint.create.FlowMirrorPointCreateFsm; import org.openkilda.wfm.topology.flowhs.fsm.mirrorpoint.create.FlowMirrorPointCreateFsm.Event; import org.openkilda.wfm.topology.flowhs.fsm.mirrorpoint.create.FlowMirrorPointCreateFsm.State; import org.openkilda.wfm.topology.flowhs.model.RequestedFlowMirrorPoint; -import org.openkilda.wfm.topology.flowhs.service.FlowCommandBuilder; -import org.openkilda.wfm.topology.flowhs.service.FlowCommandBuilderFactory; +import org.openkilda.wfm.topology.flowhs.service.speaker.FlowCommandBuilder; +import org.openkilda.wfm.topology.flowhs.service.speaker.FlowCommandBuilderFactory; +import org.openkilda.wfm.topology.flowhs.service.speaker.MirrorContext; +import org.openkilda.wfm.topology.flowhs.service.speaker.SpeakerRequestBuildContext; import org.openkilda.wfm.topology.flowhs.utils.SpeakerInstallSegmentEmitter; import org.openkilda.wfm.topology.flowhs.utils.SpeakerRemoveSegmentEmitter; import org.openkilda.wfm.topology.flowhs.utils.SpeakerRequestEmitter; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/mirrorpoint/create/actions/PostResourceAllocationAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/mirrorpoint/create/actions/PostResourceAllocationAction.java index 9751d8ea79f..c6cb22c1b97 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/mirrorpoint/create/actions/PostResourceAllocationAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/mirrorpoint/create/actions/PostResourceAllocationAction.java @@ -28,7 +28,7 @@ import org.openkilda.persistence.PersistenceManager; import org.openkilda.persistence.repositories.FlowMirrorPathRepository; import org.openkilda.wfm.CommandContext; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.NbTrackableWithHistorySupportAction; import org.openkilda.wfm.topology.flowhs.fsm.mirrorpoint.create.FlowMirrorPointCreateContext; import org.openkilda.wfm.topology.flowhs.fsm.mirrorpoint.create.FlowMirrorPointCreateFsm; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/mirrorpoint/create/actions/ResourceAllocationAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/mirrorpoint/create/actions/ResourceAllocationAction.java index 257d790e3f3..c16205cd05f 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/mirrorpoint/create/actions/ResourceAllocationAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/mirrorpoint/create/actions/ResourceAllocationAction.java @@ -39,7 +39,7 @@ import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; import org.openkilda.wfm.share.flow.resources.ResourceAllocationException; import org.openkilda.wfm.share.logger.FlowOperationsDashboardLogger; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.BaseResourceAllocationAction; import org.openkilda.wfm.topology.flowhs.fsm.mirrorpoint.create.FlowMirrorPointCreateContext; import org.openkilda.wfm.topology.flowhs.fsm.mirrorpoint.create.FlowMirrorPointCreateFsm; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/mirrorpoint/create/actions/ValidateRequestAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/mirrorpoint/create/actions/ValidateRequestAction.java index 487a8fea9b8..7da8a3a1534 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/mirrorpoint/create/actions/ValidateRequestAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/mirrorpoint/create/actions/ValidateRequestAction.java @@ -28,7 +28,7 @@ import org.openkilda.persistence.repositories.PhysicalPortRepository; import org.openkilda.wfm.share.history.model.FlowEventData; import org.openkilda.wfm.share.logger.FlowOperationsDashboardLogger; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.NbTrackableWithHistorySupportAction; import org.openkilda.wfm.topology.flowhs.fsm.mirrorpoint.create.FlowMirrorPointCreateContext; import org.openkilda.wfm.topology.flowhs.fsm.mirrorpoint.create.FlowMirrorPointCreateFsm; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/mirrorpoint/delete/actions/DeallocateFlowMirrorPathResourcesAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/mirrorpoint/delete/actions/DeallocateFlowMirrorPathResourcesAction.java index 6fb65dba8c5..e720648c4ff 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/mirrorpoint/delete/actions/DeallocateFlowMirrorPathResourcesAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/mirrorpoint/delete/actions/DeallocateFlowMirrorPathResourcesAction.java @@ -24,7 +24,7 @@ import org.openkilda.persistence.PersistenceManager; import org.openkilda.persistence.repositories.FlowMirrorPathRepository; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.BaseFlowPathRemovalAction; import org.openkilda.wfm.topology.flowhs.fsm.mirrorpoint.delete.FlowMirrorPointDeleteContext; import org.openkilda.wfm.topology.flowhs.fsm.mirrorpoint.delete.FlowMirrorPointDeleteFsm; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/mirrorpoint/delete/actions/EmitCommandRequestsAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/mirrorpoint/delete/actions/EmitCommandRequestsAction.java index f437f323caf..663af09c6ae 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/mirrorpoint/delete/actions/EmitCommandRequestsAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/mirrorpoint/delete/actions/EmitCommandRequestsAction.java @@ -28,16 +28,16 @@ import org.openkilda.persistence.repositories.FlowMirrorPointsRepository; import org.openkilda.wfm.CommandContext; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; -import org.openkilda.wfm.share.model.MirrorContext; -import org.openkilda.wfm.share.model.SpeakerRequestBuildContext; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.FlowProcessingWithHistorySupportAction; import org.openkilda.wfm.topology.flowhs.fsm.mirrorpoint.delete.FlowMirrorPointDeleteContext; import org.openkilda.wfm.topology.flowhs.fsm.mirrorpoint.delete.FlowMirrorPointDeleteFsm; import org.openkilda.wfm.topology.flowhs.fsm.mirrorpoint.delete.FlowMirrorPointDeleteFsm.Event; import org.openkilda.wfm.topology.flowhs.fsm.mirrorpoint.delete.FlowMirrorPointDeleteFsm.State; -import org.openkilda.wfm.topology.flowhs.service.FlowCommandBuilder; -import org.openkilda.wfm.topology.flowhs.service.FlowCommandBuilderFactory; +import org.openkilda.wfm.topology.flowhs.service.speaker.FlowCommandBuilder; +import org.openkilda.wfm.topology.flowhs.service.speaker.FlowCommandBuilderFactory; +import org.openkilda.wfm.topology.flowhs.service.speaker.MirrorContext; +import org.openkilda.wfm.topology.flowhs.service.speaker.SpeakerRequestBuildContext; import org.openkilda.wfm.topology.flowhs.utils.SpeakerInstallSegmentEmitter; import org.openkilda.wfm.topology.flowhs.utils.SpeakerRemoveSegmentEmitter; import org.openkilda.wfm.topology.flowhs.utils.SpeakerRequestEmitter; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/mirrorpoint/delete/actions/ValidateRequestAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/mirrorpoint/delete/actions/ValidateRequestAction.java index 7812c515f68..af7c9f76bfd 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/mirrorpoint/delete/actions/ValidateRequestAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/mirrorpoint/delete/actions/ValidateRequestAction.java @@ -33,7 +33,7 @@ import org.openkilda.wfm.CommandContext; import org.openkilda.wfm.share.history.model.FlowEventData; import org.openkilda.wfm.share.logger.FlowOperationsDashboardLogger; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.NbTrackableWithHistorySupportAction; import org.openkilda.wfm.topology.flowhs.fsm.mirrorpoint.delete.FlowMirrorPointDeleteContext; import org.openkilda.wfm.topology.flowhs.fsm.mirrorpoint.delete.FlowMirrorPointDeleteFsm; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/pathswap/actions/FlowValidateAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/pathswap/actions/FlowValidateAction.java index 82a5aba531a..e47ac8fb293 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/pathswap/actions/FlowValidateAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/pathswap/actions/FlowValidateAction.java @@ -27,7 +27,7 @@ import org.openkilda.persistence.repositories.RepositoryFactory; import org.openkilda.wfm.share.history.model.FlowEventData; import org.openkilda.wfm.share.logger.FlowOperationsDashboardLogger; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.NbTrackableWithHistorySupportAction; import org.openkilda.wfm.topology.flowhs.fsm.pathswap.FlowPathSwapContext; import org.openkilda.wfm.topology.flowhs.fsm.pathswap.FlowPathSwapFsm; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/pathswap/actions/InstallIngressRulesAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/pathswap/actions/InstallIngressRulesAction.java index 74328735f0b..cbf910d3f7a 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/pathswap/actions/InstallIngressRulesAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/pathswap/actions/InstallIngressRulesAction.java @@ -22,14 +22,14 @@ import org.openkilda.model.FlowPath; import org.openkilda.persistence.PersistenceManager; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; -import org.openkilda.wfm.share.model.SpeakerRequestBuildContext; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.FlowProcessingWithHistorySupportAction; import org.openkilda.wfm.topology.flowhs.fsm.pathswap.FlowPathSwapContext; import org.openkilda.wfm.topology.flowhs.fsm.pathswap.FlowPathSwapFsm; import org.openkilda.wfm.topology.flowhs.fsm.pathswap.FlowPathSwapFsm.Event; import org.openkilda.wfm.topology.flowhs.fsm.pathswap.FlowPathSwapFsm.State; -import org.openkilda.wfm.topology.flowhs.service.FlowCommandBuilder; -import org.openkilda.wfm.topology.flowhs.service.FlowCommandBuilderFactory; +import org.openkilda.wfm.topology.flowhs.service.speaker.FlowCommandBuilder; +import org.openkilda.wfm.topology.flowhs.service.speaker.FlowCommandBuilderFactory; +import org.openkilda.wfm.topology.flowhs.service.speaker.SpeakerRequestBuildContext; import org.openkilda.wfm.topology.flowhs.utils.SpeakerInstallSegmentEmitter; import lombok.extern.slf4j.Slf4j; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/pathswap/actions/RemoveOldRulesAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/pathswap/actions/RemoveOldRulesAction.java index c05c231f091..5e9b4cf6b16 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/pathswap/actions/RemoveOldRulesAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/pathswap/actions/RemoveOldRulesAction.java @@ -20,14 +20,14 @@ import org.openkilda.model.FlowPath; import org.openkilda.persistence.PersistenceManager; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; -import org.openkilda.wfm.share.model.MirrorContext; -import org.openkilda.wfm.share.model.SpeakerRequestBuildContext; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.BaseFlowRuleRemovalAction; import org.openkilda.wfm.topology.flowhs.fsm.pathswap.FlowPathSwapContext; import org.openkilda.wfm.topology.flowhs.fsm.pathswap.FlowPathSwapFsm; import org.openkilda.wfm.topology.flowhs.fsm.pathswap.FlowPathSwapFsm.Event; import org.openkilda.wfm.topology.flowhs.fsm.pathswap.FlowPathSwapFsm.State; -import org.openkilda.wfm.topology.flowhs.service.FlowCommandBuilder; +import org.openkilda.wfm.topology.flowhs.service.speaker.FlowCommandBuilder; +import org.openkilda.wfm.topology.flowhs.service.speaker.MirrorContext; +import org.openkilda.wfm.topology.flowhs.service.speaker.SpeakerRequestBuildContext; import org.openkilda.wfm.topology.flowhs.utils.SpeakerRemoveSegmentEmitter; import lombok.extern.slf4j.Slf4j; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/pathswap/actions/RevertNewRulesAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/pathswap/actions/RevertNewRulesAction.java index b39fe048a75..11d1d896e76 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/pathswap/actions/RevertNewRulesAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/pathswap/actions/RevertNewRulesAction.java @@ -19,14 +19,14 @@ import org.openkilda.model.Flow; import org.openkilda.persistence.PersistenceManager; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; -import org.openkilda.wfm.share.model.MirrorContext; -import org.openkilda.wfm.share.model.SpeakerRequestBuildContext; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.BaseFlowRuleRemovalAction; import org.openkilda.wfm.topology.flowhs.fsm.pathswap.FlowPathSwapContext; import org.openkilda.wfm.topology.flowhs.fsm.pathswap.FlowPathSwapFsm; import org.openkilda.wfm.topology.flowhs.fsm.pathswap.FlowPathSwapFsm.Event; import org.openkilda.wfm.topology.flowhs.fsm.pathswap.FlowPathSwapFsm.State; -import org.openkilda.wfm.topology.flowhs.service.FlowCommandBuilder; +import org.openkilda.wfm.topology.flowhs.service.speaker.FlowCommandBuilder; +import org.openkilda.wfm.topology.flowhs.service.speaker.MirrorContext; +import org.openkilda.wfm.topology.flowhs.service.speaker.SpeakerRequestBuildContext; import org.openkilda.wfm.topology.flowhs.utils.SpeakerInstallSegmentEmitter; import org.openkilda.wfm.topology.flowhs.utils.SpeakerRemoveSegmentEmitter; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/pathswap/actions/RevertPathsSwapAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/pathswap/actions/RevertPathsSwapAction.java index 49907c53108..3d72b131d47 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/pathswap/actions/RevertPathsSwapAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/pathswap/actions/RevertPathsSwapAction.java @@ -21,12 +21,12 @@ import org.openkilda.model.FlowPath; import org.openkilda.model.PathId; import org.openkilda.persistence.PersistenceManager; -import org.openkilda.wfm.topology.flow.model.FlowPathPair; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.FlowProcessingWithHistorySupportAction; import org.openkilda.wfm.topology.flowhs.fsm.pathswap.FlowPathSwapContext; import org.openkilda.wfm.topology.flowhs.fsm.pathswap.FlowPathSwapFsm; import org.openkilda.wfm.topology.flowhs.fsm.pathswap.FlowPathSwapFsm.Event; import org.openkilda.wfm.topology.flowhs.fsm.pathswap.FlowPathSwapFsm.State; +import org.openkilda.wfm.topology.flowhs.model.FlowPathPair; import lombok.extern.slf4j.Slf4j; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/reroute/actions/AllocatePrimaryResourcesAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/reroute/actions/AllocatePrimaryResourcesAction.java index f08584ba93e..2148a18563b 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/reroute/actions/AllocatePrimaryResourcesAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/reroute/actions/AllocatePrimaryResourcesAction.java @@ -29,12 +29,12 @@ import org.openkilda.wfm.share.flow.resources.ResourceAllocationException; import org.openkilda.wfm.share.logger.FlowOperationsDashboardLogger; import org.openkilda.wfm.share.metrics.TimedExecution; -import org.openkilda.wfm.topology.flow.model.FlowPathPair; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.BaseResourceAllocationAction; import org.openkilda.wfm.topology.flowhs.fsm.reroute.FlowRerouteContext; import org.openkilda.wfm.topology.flowhs.fsm.reroute.FlowRerouteFsm; import org.openkilda.wfm.topology.flowhs.fsm.reroute.FlowRerouteFsm.Event; import org.openkilda.wfm.topology.flowhs.fsm.reroute.FlowRerouteFsm.State; +import org.openkilda.wfm.topology.flowhs.model.FlowPathPair; import com.google.common.collect.Lists; import lombok.extern.slf4j.Slf4j; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/reroute/actions/AllocateProtectedResourcesAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/reroute/actions/AllocateProtectedResourcesAction.java index eb5cebfcb32..e676324ab97 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/reroute/actions/AllocateProtectedResourcesAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/reroute/actions/AllocateProtectedResourcesAction.java @@ -29,12 +29,12 @@ import org.openkilda.wfm.share.flow.resources.ResourceAllocationException; import org.openkilda.wfm.share.logger.FlowOperationsDashboardLogger; import org.openkilda.wfm.share.metrics.TimedExecution; -import org.openkilda.wfm.topology.flow.model.FlowPathPair; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.BaseResourceAllocationAction; import org.openkilda.wfm.topology.flowhs.fsm.reroute.FlowRerouteContext; import org.openkilda.wfm.topology.flowhs.fsm.reroute.FlowRerouteFsm; import org.openkilda.wfm.topology.flowhs.fsm.reroute.FlowRerouteFsm.Event; import org.openkilda.wfm.topology.flowhs.fsm.reroute.FlowRerouteFsm.State; +import org.openkilda.wfm.topology.flowhs.model.FlowPathPair; import com.google.common.collect.Lists; import lombok.extern.slf4j.Slf4j; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/reroute/actions/CompleteFlowPathRemovalAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/reroute/actions/CompleteFlowPathRemovalAction.java index 2c073998521..1ff7217ee76 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/reroute/actions/CompleteFlowPathRemovalAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/reroute/actions/CompleteFlowPathRemovalAction.java @@ -20,12 +20,12 @@ import org.openkilda.model.PathId; import org.openkilda.persistence.PersistenceManager; import org.openkilda.wfm.share.metrics.TimedExecution; -import org.openkilda.wfm.topology.flow.model.FlowPathPair; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.BaseFlowPathRemovalAction; import org.openkilda.wfm.topology.flowhs.fsm.reroute.FlowRerouteContext; import org.openkilda.wfm.topology.flowhs.fsm.reroute.FlowRerouteFsm; import org.openkilda.wfm.topology.flowhs.fsm.reroute.FlowRerouteFsm.Event; import org.openkilda.wfm.topology.flowhs.fsm.reroute.FlowRerouteFsm.State; +import org.openkilda.wfm.topology.flowhs.model.FlowPathPair; import lombok.extern.slf4j.Slf4j; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/reroute/actions/InstallIngressRulesAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/reroute/actions/InstallIngressRulesAction.java index b3aeefce1d3..e1ba44eb773 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/reroute/actions/InstallIngressRulesAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/reroute/actions/InstallIngressRulesAction.java @@ -21,14 +21,14 @@ import org.openkilda.model.FlowPath; import org.openkilda.persistence.PersistenceManager; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; -import org.openkilda.wfm.share.model.SpeakerRequestBuildContext; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.FlowProcessingWithHistorySupportAction; import org.openkilda.wfm.topology.flowhs.fsm.reroute.FlowRerouteContext; import org.openkilda.wfm.topology.flowhs.fsm.reroute.FlowRerouteFsm; import org.openkilda.wfm.topology.flowhs.fsm.reroute.FlowRerouteFsm.Event; import org.openkilda.wfm.topology.flowhs.fsm.reroute.FlowRerouteFsm.State; -import org.openkilda.wfm.topology.flowhs.service.FlowCommandBuilder; -import org.openkilda.wfm.topology.flowhs.service.FlowCommandBuilderFactory; +import org.openkilda.wfm.topology.flowhs.service.speaker.FlowCommandBuilder; +import org.openkilda.wfm.topology.flowhs.service.speaker.FlowCommandBuilderFactory; +import org.openkilda.wfm.topology.flowhs.service.speaker.SpeakerRequestBuildContext; import lombok.extern.slf4j.Slf4j; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/reroute/actions/InstallNonIngressRulesAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/reroute/actions/InstallNonIngressRulesAction.java index 5ffcaf34da9..8f0637b3b2f 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/reroute/actions/InstallNonIngressRulesAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/reroute/actions/InstallNonIngressRulesAction.java @@ -26,8 +26,8 @@ import org.openkilda.wfm.topology.flowhs.fsm.reroute.FlowRerouteFsm; import org.openkilda.wfm.topology.flowhs.fsm.reroute.FlowRerouteFsm.Event; import org.openkilda.wfm.topology.flowhs.fsm.reroute.FlowRerouteFsm.State; -import org.openkilda.wfm.topology.flowhs.service.FlowCommandBuilder; -import org.openkilda.wfm.topology.flowhs.service.FlowCommandBuilderFactory; +import org.openkilda.wfm.topology.flowhs.service.speaker.FlowCommandBuilder; +import org.openkilda.wfm.topology.flowhs.service.speaker.FlowCommandBuilderFactory; import lombok.extern.slf4j.Slf4j; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/reroute/actions/RemoveOldRulesAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/reroute/actions/RemoveOldRulesAction.java index ddeec02de8f..a9e776f63c4 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/reroute/actions/RemoveOldRulesAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/reroute/actions/RemoveOldRulesAction.java @@ -23,14 +23,14 @@ import org.openkilda.persistence.PersistenceManager; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; import org.openkilda.wfm.share.metrics.TimedExecution; -import org.openkilda.wfm.share.model.MirrorContext; -import org.openkilda.wfm.share.model.SpeakerRequestBuildContext; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.PathSwappingRuleRemovalAction; import org.openkilda.wfm.topology.flowhs.fsm.reroute.FlowRerouteContext; import org.openkilda.wfm.topology.flowhs.fsm.reroute.FlowRerouteFsm; import org.openkilda.wfm.topology.flowhs.fsm.reroute.FlowRerouteFsm.Event; import org.openkilda.wfm.topology.flowhs.fsm.reroute.FlowRerouteFsm.State; -import org.openkilda.wfm.topology.flowhs.service.FlowCommandBuilder; +import org.openkilda.wfm.topology.flowhs.service.speaker.FlowCommandBuilder; +import org.openkilda.wfm.topology.flowhs.service.speaker.MirrorContext; +import org.openkilda.wfm.topology.flowhs.service.speaker.SpeakerRequestBuildContext; import lombok.extern.slf4j.Slf4j; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/reroute/actions/RevertNewRulesAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/reroute/actions/RevertNewRulesAction.java index ac6b7b4e626..a806e1ddcaa 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/reroute/actions/RevertNewRulesAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/reroute/actions/RevertNewRulesAction.java @@ -21,14 +21,14 @@ import org.openkilda.model.FlowPath; import org.openkilda.persistence.PersistenceManager; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; -import org.openkilda.wfm.share.model.MirrorContext; -import org.openkilda.wfm.share.model.SpeakerRequestBuildContext; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.BaseFlowRuleRemovalAction; import org.openkilda.wfm.topology.flowhs.fsm.reroute.FlowRerouteContext; import org.openkilda.wfm.topology.flowhs.fsm.reroute.FlowRerouteFsm; import org.openkilda.wfm.topology.flowhs.fsm.reroute.FlowRerouteFsm.Event; import org.openkilda.wfm.topology.flowhs.fsm.reroute.FlowRerouteFsm.State; -import org.openkilda.wfm.topology.flowhs.service.FlowCommandBuilder; +import org.openkilda.wfm.topology.flowhs.service.speaker.FlowCommandBuilder; +import org.openkilda.wfm.topology.flowhs.service.speaker.MirrorContext; +import org.openkilda.wfm.topology.flowhs.service.speaker.SpeakerRequestBuildContext; import org.openkilda.wfm.topology.flowhs.utils.SpeakerInstallSegmentEmitter; import org.openkilda.wfm.topology.flowhs.utils.SpeakerRemoveSegmentEmitter; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/reroute/actions/ValidateFlowAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/reroute/actions/ValidateFlowAction.java index 025232d5dbb..06c79e722c7 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/reroute/actions/ValidateFlowAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/reroute/actions/ValidateFlowAction.java @@ -34,7 +34,7 @@ import org.openkilda.wfm.share.history.model.FlowEventData; import org.openkilda.wfm.share.logger.FlowOperationsDashboardLogger; import org.openkilda.wfm.share.metrics.TimedExecution; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.NbTrackableWithHistorySupportAction; import org.openkilda.wfm.topology.flowhs.fsm.reroute.FlowRerouteContext; import org.openkilda.wfm.topology.flowhs.fsm.reroute.FlowRerouteFsm; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/swapendpoints/actions/OnFinishedNbTrackableAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/swapendpoints/actions/OnFinishedNbTrackableAction.java index ee3c6f91104..9a1b9bfa802 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/swapendpoints/actions/OnFinishedNbTrackableAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/swapendpoints/actions/OnFinishedNbTrackableAction.java @@ -21,7 +21,7 @@ import org.openkilda.model.FlowStatus; import org.openkilda.persistence.PersistenceManager; import org.openkilda.wfm.share.logger.FlowOperationsDashboardLogger; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.NbTrackableWithHistorySupportAction; import org.openkilda.wfm.topology.flowhs.fsm.swapendpoints.FlowSwapEndpointsContext; import org.openkilda.wfm.topology.flowhs.fsm.swapendpoints.FlowSwapEndpointsFsm; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/swapendpoints/actions/ValidateFlowsAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/swapendpoints/actions/ValidateFlowsAction.java index 7fe710184ed..c5a744f0f9d 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/swapendpoints/actions/ValidateFlowsAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/swapendpoints/actions/ValidateFlowsAction.java @@ -25,7 +25,7 @@ import org.openkilda.persistence.repositories.KildaFeatureTogglesRepository; import org.openkilda.persistence.repositories.RepositoryFactory; import org.openkilda.wfm.share.history.model.FlowEventData; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.FlowProcessingWithHistorySupportAction; import org.openkilda.wfm.topology.flowhs.fsm.swapendpoints.FlowSwapEndpointsContext; import org.openkilda.wfm.topology.flowhs.fsm.swapendpoints.FlowSwapEndpointsFsm; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/sync/FlowSyncFsm.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/sync/FlowSyncFsm.java index 73201dbfe60..818395cd15c 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/sync/FlowSyncFsm.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/sync/FlowSyncFsm.java @@ -21,7 +21,7 @@ import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; import org.openkilda.wfm.share.logger.FlowOperationsDashboardLogger; import org.openkilda.wfm.share.utils.FsmExecutor; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.fsm.FsmUtil; import org.openkilda.wfm.topology.flowhs.fsm.common.FlowProcessingWithHistorySupportFsm; import org.openkilda.wfm.topology.flowhs.fsm.sync.FlowSyncFsm.Event; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/sync/actions/CreateSyncHandlersAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/sync/actions/CreateSyncHandlersAction.java index eb83db9382f..bca26af4336 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/sync/actions/CreateSyncHandlersAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/sync/actions/CreateSyncHandlersAction.java @@ -21,8 +21,7 @@ import org.openkilda.persistence.PersistenceManager; import org.openkilda.wfm.CommandContext; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; -import org.openkilda.wfm.share.model.SpeakerRequestBuildContext; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.FlowProcessingWithHistorySupportAction; import org.openkilda.wfm.topology.flowhs.fsm.sync.FlowSyncContext; import org.openkilda.wfm.topology.flowhs.fsm.sync.FlowSyncFsm; @@ -33,10 +32,11 @@ import org.openkilda.wfm.topology.flowhs.model.path.FlowPathOperationDescriptor; import org.openkilda.wfm.topology.flowhs.model.path.FlowPathRequest; import org.openkilda.wfm.topology.flowhs.model.path.FlowPathRequest.PathChunkType; -import org.openkilda.wfm.topology.flowhs.service.FlowCommandBuilder; -import org.openkilda.wfm.topology.flowhs.service.FlowCommandBuilderFactory; -import org.openkilda.wfm.topology.flowhs.service.FlowSegmentRequestFactoriesSequence; import org.openkilda.wfm.topology.flowhs.service.FlowSyncCarrier; +import org.openkilda.wfm.topology.flowhs.service.speaker.FlowCommandBuilder; +import org.openkilda.wfm.topology.flowhs.service.speaker.FlowCommandBuilderFactory; +import org.openkilda.wfm.topology.flowhs.service.speaker.FlowSegmentRequestFactoriesSequence; +import org.openkilda.wfm.topology.flowhs.service.speaker.SpeakerRequestBuildContext; import lombok.NonNull; import org.apache.commons.lang3.tuple.Pair; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/sync/actions/FlowSyncSetupAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/sync/actions/FlowSyncSetupAction.java index e076529ac72..dcaecb3a65c 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/sync/actions/FlowSyncSetupAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/sync/actions/FlowSyncSetupAction.java @@ -23,7 +23,7 @@ import org.openkilda.persistence.PersistenceManager; import org.openkilda.wfm.share.history.model.FlowEventData; import org.openkilda.wfm.share.logger.FlowOperationsDashboardLogger; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.FlowProcessingWithHistorySupportAction; import org.openkilda.wfm.topology.flowhs.fsm.sync.FlowSyncContext; import org.openkilda.wfm.topology.flowhs.fsm.sync.FlowSyncFsm; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/AllocatePrimaryResourcesAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/AllocatePrimaryResourcesAction.java index 86f25db7fc7..6f8883ba53b 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/AllocatePrimaryResourcesAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/AllocatePrimaryResourcesAction.java @@ -27,12 +27,12 @@ import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; import org.openkilda.wfm.share.flow.resources.ResourceAllocationException; import org.openkilda.wfm.share.logger.FlowOperationsDashboardLogger; -import org.openkilda.wfm.topology.flow.model.FlowPathPair; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.BaseResourceAllocationAction; import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateContext; import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateFsm; import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateFsm.Event; import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateFsm.State; +import org.openkilda.wfm.topology.flowhs.model.FlowPathPair; import com.google.common.collect.Sets; import lombok.extern.slf4j.Slf4j; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/AllocateProtectedResourcesAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/AllocateProtectedResourcesAction.java index b73efa3cd9c..ceaecb89fd3 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/AllocateProtectedResourcesAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/AllocateProtectedResourcesAction.java @@ -28,12 +28,12 @@ import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; import org.openkilda.wfm.share.flow.resources.ResourceAllocationException; import org.openkilda.wfm.share.logger.FlowOperationsDashboardLogger; -import org.openkilda.wfm.topology.flow.model.FlowPathPair; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.BaseResourceAllocationAction; import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateContext; import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateFsm; import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateFsm.Event; import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateFsm.State; +import org.openkilda.wfm.topology.flowhs.model.FlowPathPair; import com.google.common.collect.Sets; import lombok.extern.slf4j.Slf4j; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/CompleteFlowPathRemovalAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/CompleteFlowPathRemovalAction.java index afa5b107e98..ca2fa560d1b 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/CompleteFlowPathRemovalAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/CompleteFlowPathRemovalAction.java @@ -19,13 +19,13 @@ import org.openkilda.model.FlowPath; import org.openkilda.model.PathId; import org.openkilda.persistence.PersistenceManager; -import org.openkilda.wfm.topology.flow.model.FlowPathPair; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.BaseFlowPathRemovalAction; import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateContext; import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateFsm; import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateFsm.Event; import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateFsm.State; import org.openkilda.wfm.topology.flowhs.mapper.RequestedFlowMapper; +import org.openkilda.wfm.topology.flowhs.model.FlowPathPair; import lombok.extern.slf4j.Slf4j; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/InstallIngressRulesAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/InstallIngressRulesAction.java index fecf474bcfe..0a08c6b1c5d 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/InstallIngressRulesAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/InstallIngressRulesAction.java @@ -22,7 +22,6 @@ import org.openkilda.model.FlowPath; import org.openkilda.persistence.PersistenceManager; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; -import org.openkilda.wfm.share.model.SpeakerRequestBuildContext; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.FlowProcessingWithHistorySupportAction; import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateContext; import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateFsm; @@ -30,8 +29,9 @@ import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateFsm.FlowLoopOperation; import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateFsm.State; import org.openkilda.wfm.topology.flowhs.model.RequestedFlow; -import org.openkilda.wfm.topology.flowhs.service.FlowCommandBuilder; -import org.openkilda.wfm.topology.flowhs.service.FlowCommandBuilderFactory; +import org.openkilda.wfm.topology.flowhs.service.speaker.FlowCommandBuilder; +import org.openkilda.wfm.topology.flowhs.service.speaker.FlowCommandBuilderFactory; +import org.openkilda.wfm.topology.flowhs.service.speaker.SpeakerRequestBuildContext; import org.openkilda.wfm.topology.flowhs.utils.SpeakerInstallSegmentEmitter; import lombok.extern.slf4j.Slf4j; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/InstallNonIngressRulesAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/InstallNonIngressRulesAction.java index b9038ff915f..aab4a0e592b 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/InstallNonIngressRulesAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/InstallNonIngressRulesAction.java @@ -27,8 +27,8 @@ import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateFsm.Event; import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateFsm.State; import org.openkilda.wfm.topology.flowhs.model.RequestedFlow; -import org.openkilda.wfm.topology.flowhs.service.FlowCommandBuilder; -import org.openkilda.wfm.topology.flowhs.service.FlowCommandBuilderFactory; +import org.openkilda.wfm.topology.flowhs.service.speaker.FlowCommandBuilder; +import org.openkilda.wfm.topology.flowhs.service.speaker.FlowCommandBuilderFactory; import org.openkilda.wfm.topology.flowhs.utils.SpeakerInstallSegmentEmitter; import lombok.extern.slf4j.Slf4j; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/RemoveOldRulesAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/RemoveOldRulesAction.java index 2afb24d5e1b..596841bda7d 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/RemoveOldRulesAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/RemoveOldRulesAction.java @@ -23,16 +23,16 @@ import org.openkilda.model.FlowPath; import org.openkilda.persistence.PersistenceManager; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; -import org.openkilda.wfm.share.model.MirrorContext; -import org.openkilda.wfm.share.model.SpeakerRequestBuildContext; -import org.openkilda.wfm.share.model.SpeakerRequestBuildContext.PathContext; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.PathSwappingRuleRemovalAction; import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateContext; import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateFsm; import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateFsm.Event; import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateFsm.State; import org.openkilda.wfm.topology.flowhs.model.RequestedFlow; -import org.openkilda.wfm.topology.flowhs.service.FlowCommandBuilder; +import org.openkilda.wfm.topology.flowhs.service.speaker.FlowCommandBuilder; +import org.openkilda.wfm.topology.flowhs.service.speaker.MirrorContext; +import org.openkilda.wfm.topology.flowhs.service.speaker.SpeakerRequestBuildContext; +import org.openkilda.wfm.topology.flowhs.service.speaker.SpeakerRequestBuildContext.PathContext; import org.openkilda.wfm.topology.flowhs.utils.SpeakerRemoveSegmentEmitter; import lombok.extern.slf4j.Slf4j; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/RevertFlowAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/RevertFlowAction.java index 4488ed9dea6..70860c225e2 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/RevertFlowAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/RevertFlowAction.java @@ -22,7 +22,7 @@ import org.openkilda.model.Switch; import org.openkilda.persistence.PersistenceManager; import org.openkilda.persistence.repositories.SwitchRepository; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.FlowProcessingWithHistorySupportAction; import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateContext; import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateFsm; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/RevertNewRulesAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/RevertNewRulesAction.java index c74821e31cc..5c18a242687 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/RevertNewRulesAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/RevertNewRulesAction.java @@ -26,8 +26,6 @@ import org.openkilda.persistence.PersistenceManager; import org.openkilda.wfm.CommandContext; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; -import org.openkilda.wfm.share.model.MirrorContext; -import org.openkilda.wfm.share.model.SpeakerRequestBuildContext; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.BaseFlowRuleRemovalAction; import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateContext; import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateFsm; @@ -35,7 +33,9 @@ import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateFsm.State; import org.openkilda.wfm.topology.flowhs.mapper.RequestedFlowMapper; import org.openkilda.wfm.topology.flowhs.model.RequestedFlow; -import org.openkilda.wfm.topology.flowhs.service.FlowCommandBuilder; +import org.openkilda.wfm.topology.flowhs.service.speaker.FlowCommandBuilder; +import org.openkilda.wfm.topology.flowhs.service.speaker.MirrorContext; +import org.openkilda.wfm.topology.flowhs.service.speaker.SpeakerRequestBuildContext; import org.openkilda.wfm.topology.flowhs.utils.SpeakerInstallSegmentEmitter; import org.openkilda.wfm.topology.flowhs.utils.SpeakerRemoveSegmentEmitter; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/UpdateFlowAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/UpdateFlowAction.java index 2f1c36d1143..a109526eb0e 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/UpdateFlowAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/UpdateFlowAction.java @@ -29,7 +29,7 @@ import org.openkilda.wfm.share.history.model.FlowDumpData; import org.openkilda.wfm.share.history.model.FlowDumpData.DumpType; import org.openkilda.wfm.share.mappers.HistoryMapper; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.NbTrackableWithHistorySupportAction; import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateContext; import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateFsm; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/ValidateFlowAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/ValidateFlowAction.java index 0735d30d89a..7bc94d9accf 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/ValidateFlowAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/update/actions/ValidateFlowAction.java @@ -26,7 +26,7 @@ import org.openkilda.persistence.repositories.RepositoryFactory; import org.openkilda.wfm.share.history.model.FlowEventData; import org.openkilda.wfm.share.logger.FlowOperationsDashboardLogger; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.NbTrackableWithHistorySupportAction; import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateContext; import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateFsm; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/validation/FlowValidationFsm.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/validation/FlowValidationFsm.java index 91886fc590f..10a2f2abb4b 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/validation/FlowValidationFsm.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/validation/FlowValidationFsm.java @@ -42,10 +42,10 @@ import org.openkilda.persistence.PersistenceManager; import org.openkilda.wfm.CommandContext; import org.openkilda.wfm.error.FlowNotFoundException; -import org.openkilda.wfm.error.IllegalFlowStateException; import org.openkilda.wfm.error.SwitchNotFoundException; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; import org.openkilda.wfm.share.metrics.MeterRegistryHolder; +import org.openkilda.wfm.topology.flowhs.exceptions.IllegalFlowStateException; import org.openkilda.wfm.topology.flowhs.fsm.common.NbTrackableFlowProcessingFsm; import org.openkilda.wfm.topology.flowhs.fsm.validation.FlowValidationFsm.Event; import org.openkilda.wfm.topology.flowhs.fsm.validation.FlowValidationFsm.State; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/validation/FlowValidationService.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/validation/FlowValidationService.java index de368141624..7eb47f8535b 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/validation/FlowValidationService.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/validation/FlowValidationService.java @@ -31,10 +31,10 @@ import org.openkilda.persistence.repositories.FlowRepository; import org.openkilda.persistence.repositories.SwitchRepository; import org.openkilda.wfm.error.FlowNotFoundException; -import org.openkilda.wfm.error.IllegalFlowStateException; import org.openkilda.wfm.error.SwitchNotFoundException; import org.openkilda.wfm.share.flow.resources.EncapsulationResources; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; +import org.openkilda.wfm.topology.flowhs.exceptions.IllegalFlowStateException; import lombok.NonNull; import lombok.extern.slf4j.Slf4j; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/create/actions/CreateDraftYFlowAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/create/actions/CreateDraftYFlowAction.java index 23a77dfbe9b..47f34649632 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/create/actions/CreateDraftYFlowAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/create/actions/CreateDraftYFlowAction.java @@ -25,7 +25,7 @@ import org.openkilda.persistence.PersistenceManager; import org.openkilda.persistence.repositories.RepositoryFactory; import org.openkilda.persistence.repositories.YFlowRepository; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.NbTrackableWithHistorySupportAction; import org.openkilda.wfm.topology.flowhs.fsm.yflow.create.YFlowCreateContext; import org.openkilda.wfm.topology.flowhs.fsm.yflow.create.YFlowCreateFsm; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/create/actions/OnSubFlowAllocatedAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/create/actions/OnSubFlowAllocatedAction.java index 4266af9cc0e..6982c83318e 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/create/actions/OnSubFlowAllocatedAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/create/actions/OnSubFlowAllocatedAction.java @@ -26,7 +26,7 @@ import org.openkilda.persistence.repositories.RepositoryFactory; import org.openkilda.persistence.repositories.YFlowRepository; import org.openkilda.wfm.CommandContext; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.NbTrackableWithHistorySupportAction; import org.openkilda.wfm.topology.flowhs.fsm.yflow.create.YFlowCreateContext; import org.openkilda.wfm.topology.flowhs.fsm.yflow.create.YFlowCreateFsm; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/create/actions/ValidateYFlowAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/create/actions/ValidateYFlowAction.java index 5950248590e..7606da5973c 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/create/actions/ValidateYFlowAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/create/actions/ValidateYFlowAction.java @@ -28,7 +28,7 @@ import org.openkilda.persistence.repositories.YFlowRepository; import org.openkilda.wfm.share.history.model.FlowEventData; import org.openkilda.wfm.share.logger.FlowOperationsDashboardLogger; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.NbTrackableWithHistorySupportAction; import org.openkilda.wfm.topology.flowhs.fsm.yflow.create.YFlowCreateContext; import org.openkilda.wfm.topology.flowhs.fsm.yflow.create.YFlowCreateFsm; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/delete/actions/ValidateYFlowAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/delete/actions/ValidateYFlowAction.java index 10396a86743..5d81a4dbf72 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/delete/actions/ValidateYFlowAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/delete/actions/ValidateYFlowAction.java @@ -30,7 +30,7 @@ import org.openkilda.wfm.CommandContext; import org.openkilda.wfm.share.history.model.FlowEventData; import org.openkilda.wfm.share.logger.FlowOperationsDashboardLogger; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.NbTrackableWithHistorySupportAction; import org.openkilda.wfm.topology.flowhs.fsm.yflow.delete.YFlowDeleteContext; import org.openkilda.wfm.topology.flowhs.fsm.yflow.delete.YFlowDeleteFsm; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/pathswap/actions/CompleteYFlowSwappingAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/pathswap/actions/CompleteYFlowSwappingAction.java index b8e23a5ff9b..4898f2055b1 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/pathswap/actions/CompleteYFlowSwappingAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/pathswap/actions/CompleteYFlowSwappingAction.java @@ -27,7 +27,7 @@ import org.openkilda.persistence.repositories.YFlowRepository; import org.openkilda.wfm.CommandContext; import org.openkilda.wfm.share.logger.FlowOperationsDashboardLogger; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.NbTrackableWithHistorySupportAction; import org.openkilda.wfm.topology.flowhs.fsm.yflow.pathswap.YFlowPathSwapContext; import org.openkilda.wfm.topology.flowhs.fsm.yflow.pathswap.YFlowPathSwapFsm; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/pathswap/actions/RevertSharedEndpointRulesAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/pathswap/actions/RevertSharedEndpointRulesAction.java index bba28bc2cd1..cfd1e40083f 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/pathswap/actions/RevertSharedEndpointRulesAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/pathswap/actions/RevertSharedEndpointRulesAction.java @@ -25,7 +25,7 @@ import org.openkilda.model.YFlow; import org.openkilda.persistence.PersistenceManager; import org.openkilda.rulemanager.RuleManager; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.converters.FlowRulesConverter; import org.openkilda.wfm.topology.flowhs.fsm.common.converters.OfCommandConverter; import org.openkilda.wfm.topology.flowhs.fsm.yflow.pathswap.YFlowPathSwapContext; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/pathswap/actions/UpdateSharedEndpointRulesAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/pathswap/actions/UpdateSharedEndpointRulesAction.java index eefb61a368b..1260661fbc3 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/pathswap/actions/UpdateSharedEndpointRulesAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/pathswap/actions/UpdateSharedEndpointRulesAction.java @@ -25,7 +25,7 @@ import org.openkilda.model.YFlow; import org.openkilda.persistence.PersistenceManager; import org.openkilda.rulemanager.RuleManager; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.YFlowRuleManagerProcessingAction; import org.openkilda.wfm.topology.flowhs.fsm.common.converters.FlowRulesConverter; import org.openkilda.wfm.topology.flowhs.fsm.common.converters.OfCommandConverter; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/pathswap/actions/ValidateYFlowAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/pathswap/actions/ValidateYFlowAction.java index 21ab3ead66d..06c57589b9c 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/pathswap/actions/ValidateYFlowAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/pathswap/actions/ValidateYFlowAction.java @@ -31,7 +31,7 @@ import org.openkilda.persistence.repositories.YFlowRepository; import org.openkilda.wfm.share.history.model.FlowEventData; import org.openkilda.wfm.share.logger.FlowOperationsDashboardLogger; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.NbTrackableWithHistorySupportAction; import org.openkilda.wfm.topology.flowhs.fsm.yflow.pathswap.YFlowPathSwapContext; import org.openkilda.wfm.topology.flowhs.fsm.yflow.pathswap.YFlowPathSwapFsm; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/reroute/actions/OnSubFlowAllocatedAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/reroute/actions/OnSubFlowAllocatedAction.java index c4be5daa15d..7e8374ed6a7 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/reroute/actions/OnSubFlowAllocatedAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/reroute/actions/OnSubFlowAllocatedAction.java @@ -35,7 +35,7 @@ import org.openkilda.wfm.CommandContext; import org.openkilda.wfm.share.mappers.FlowPathMapper; import org.openkilda.wfm.share.service.IntersectionComputer; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.NbTrackableWithHistorySupportAction; import org.openkilda.wfm.topology.flowhs.fsm.yflow.reroute.YFlowRerouteContext; import org.openkilda.wfm.topology.flowhs.fsm.yflow.reroute.YFlowRerouteFsm; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/reroute/actions/ValidateYFlowAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/reroute/actions/ValidateYFlowAction.java index c5db880466b..e01bb6ac583 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/reroute/actions/ValidateYFlowAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/reroute/actions/ValidateYFlowAction.java @@ -35,7 +35,7 @@ import org.openkilda.persistence.repositories.YFlowRepository; import org.openkilda.wfm.share.history.model.FlowEventData; import org.openkilda.wfm.share.logger.FlowOperationsDashboardLogger; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.NbTrackableWithHistorySupportAction; import org.openkilda.wfm.topology.flowhs.fsm.yflow.reroute.YFlowRerouteContext; import org.openkilda.wfm.topology.flowhs.fsm.yflow.reroute.YFlowRerouteFsm; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/update/actions/OnRevertSubFlowAllocatedAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/update/actions/OnRevertSubFlowAllocatedAction.java index c966ace9ca7..107bb0fb5f3 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/update/actions/OnRevertSubFlowAllocatedAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/update/actions/OnRevertSubFlowAllocatedAction.java @@ -29,7 +29,7 @@ import org.openkilda.persistence.repositories.RepositoryFactory; import org.openkilda.persistence.repositories.YFlowRepository; import org.openkilda.persistence.tx.TransactionManager; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.HistoryRecordingAction; import org.openkilda.wfm.topology.flowhs.fsm.yflow.update.YFlowUpdateContext; import org.openkilda.wfm.topology.flowhs.fsm.yflow.update.YFlowUpdateFsm; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/update/actions/OnSubFlowAllocatedAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/update/actions/OnSubFlowAllocatedAction.java index fb3e72968df..8a59d8d0f09 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/update/actions/OnSubFlowAllocatedAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/update/actions/OnSubFlowAllocatedAction.java @@ -31,7 +31,7 @@ import org.openkilda.persistence.repositories.RepositoryFactory; import org.openkilda.persistence.repositories.YFlowRepository; import org.openkilda.wfm.CommandContext; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.NbTrackableWithHistorySupportAction; import org.openkilda.wfm.topology.flowhs.fsm.yflow.update.YFlowUpdateContext; import org.openkilda.wfm.topology.flowhs.fsm.yflow.update.YFlowUpdateFsm; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/update/actions/ValidateYFlowAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/update/actions/ValidateYFlowAction.java index 9e2eb265faa..235fca4df20 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/update/actions/ValidateYFlowAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/update/actions/ValidateYFlowAction.java @@ -32,7 +32,7 @@ import org.openkilda.persistence.repositories.YFlowRepository; import org.openkilda.wfm.share.history.model.FlowEventData; import org.openkilda.wfm.share.logger.FlowOperationsDashboardLogger; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.NbTrackableWithHistorySupportAction; import org.openkilda.wfm.topology.flowhs.fsm.yflow.update.YFlowUpdateContext; import org.openkilda.wfm.topology.flowhs.fsm.yflow.update.YFlowUpdateFsm; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/validation/actions/DumpYFlowResourcesAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/validation/actions/DumpYFlowResourcesAction.java index e2b116dd133..9c6f3515456 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/validation/actions/DumpYFlowResourcesAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/validation/actions/DumpYFlowResourcesAction.java @@ -25,7 +25,7 @@ import org.openkilda.persistence.PersistenceManager; import org.openkilda.persistence.repositories.RepositoryFactory; import org.openkilda.persistence.repositories.YFlowRepository; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.YFlowProcessingAction; import org.openkilda.wfm.topology.flowhs.fsm.yflow.validation.YFlowValidationContext; import org.openkilda.wfm.topology.flowhs.fsm.yflow.validation.YFlowValidationFsm; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/validation/actions/PreValidateYFlowAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/validation/actions/PreValidateYFlowAction.java index 2278904333a..90d2d20f3dd 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/validation/actions/PreValidateYFlowAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/validation/actions/PreValidateYFlowAction.java @@ -24,7 +24,7 @@ import org.openkilda.persistence.PersistenceManager; import org.openkilda.persistence.repositories.RepositoryFactory; import org.openkilda.persistence.repositories.YFlowRepository; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.NbTrackableAction; import org.openkilda.wfm.topology.flowhs.fsm.yflow.validation.YFlowValidationContext; import org.openkilda.wfm.topology.flowhs.fsm.yflow.validation.YFlowValidationFsm; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/validation/actions/ValidateSubFlowsAction.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/validation/actions/ValidateSubFlowsAction.java index 68e7b009942..098604f9325 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/validation/actions/ValidateSubFlowsAction.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/fsm/yflow/validation/actions/ValidateSubFlowsAction.java @@ -22,7 +22,7 @@ import org.openkilda.model.YFlow; import org.openkilda.persistence.PersistenceManager; import org.openkilda.wfm.CommandContext; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; import org.openkilda.wfm.topology.flowhs.fsm.common.actions.YFlowProcessingAction; import org.openkilda.wfm.topology.flowhs.fsm.yflow.validation.YFlowValidationContext; import org.openkilda.wfm.topology.flowhs.fsm.yflow.validation.YFlowValidationFsm; diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/flow/model/FlowPathPair.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/model/FlowPathPair.java similarity index 96% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/flow/model/FlowPathPair.java rename to src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/model/FlowPathPair.java index b92fcfadeda..885a1700c78 100644 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/flow/model/FlowPathPair.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/model/FlowPathPair.java @@ -13,7 +13,7 @@ * limitations under the License. */ -package org.openkilda.wfm.topology.flow.model; +package org.openkilda.wfm.topology.flowhs.model; import org.openkilda.model.FlowPath; import org.openkilda.model.PathId; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowCreateService.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowCreateService.java index ba56ed6dfc9..787893ff14b 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowCreateService.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowCreateService.java @@ -27,9 +27,9 @@ import org.openkilda.wfm.CommandContext; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; import org.openkilda.wfm.share.utils.FsmExecutor; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.fsm.create.FlowCreateContext; import org.openkilda.wfm.topology.flowhs.fsm.create.FlowCreateFsm; import org.openkilda.wfm.topology.flowhs.fsm.create.FlowCreateFsm.Config; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowDeleteService.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowDeleteService.java index cfb5e0018bc..130d1128c10 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowDeleteService.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowDeleteService.java @@ -24,9 +24,9 @@ import org.openkilda.wfm.CommandContext; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; import org.openkilda.wfm.share.utils.FsmExecutor; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.fsm.delete.FlowDeleteContext; import org.openkilda.wfm.topology.flowhs.fsm.delete.FlowDeleteFsm; import org.openkilda.wfm.topology.flowhs.fsm.delete.FlowDeleteFsm.Event; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowPathSwapService.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowPathSwapService.java index 89d6b818801..68ca28374c1 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowPathSwapService.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowPathSwapService.java @@ -24,9 +24,9 @@ import org.openkilda.wfm.CommandContext; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; import org.openkilda.wfm.share.utils.FsmExecutor; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.fsm.pathswap.FlowPathSwapContext; import org.openkilda.wfm.topology.flowhs.fsm.pathswap.FlowPathSwapFsm; import org.openkilda.wfm.topology.flowhs.fsm.pathswap.FlowPathSwapFsm.Event; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowRerouteService.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowRerouteService.java index bb0cc1cc6b2..d8248a19f9d 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowRerouteService.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowRerouteService.java @@ -25,7 +25,7 @@ import org.openkilda.wfm.CommandContext; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; import org.openkilda.wfm.share.utils.FsmExecutor; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.fsm.reroute.FlowRerouteContext; import org.openkilda.wfm.topology.flowhs.fsm.reroute.FlowRerouteFsm; import org.openkilda.wfm.topology.flowhs.fsm.reroute.FlowRerouteFsm.Config; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowSyncCarrier.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowSyncCarrier.java index cf54af3ea7d..74aff9196ac 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowSyncCarrier.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowSyncCarrier.java @@ -17,8 +17,8 @@ import org.openkilda.model.PathId; import org.openkilda.wfm.CommandContext; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.model.path.FlowPathOperationConfig; import org.openkilda.wfm.topology.flowhs.model.path.FlowPathRequest; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowUpdateService.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowUpdateService.java index c46e75e533e..d3c1dc375e4 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowUpdateService.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowUpdateService.java @@ -34,9 +34,9 @@ import org.openkilda.wfm.CommandContext; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; import org.openkilda.wfm.share.utils.FsmExecutor; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateContext; import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateFsm; import org.openkilda.wfm.topology.flowhs.fsm.update.FlowUpdateFsm.Config; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowValidationHubService.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowValidationHubService.java index 6445dc4ae1e..4a3e777e74f 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowValidationHubService.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowValidationHubService.java @@ -29,9 +29,9 @@ import org.openkilda.wfm.CommandContext; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; import org.openkilda.wfm.share.utils.FsmExecutor; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.fsm.validation.FlowValidationFsm; import org.openkilda.wfm.topology.flowhs.fsm.validation.FlowValidationFsm.Config; import org.openkilda.wfm.topology.flowhs.fsm.validation.FlowValidationFsm.Event; diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowPathBuilder.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/common/FlowPathBuilder.java similarity index 99% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowPathBuilder.java rename to src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/common/FlowPathBuilder.java index 94e980832e7..663b6924e58 100644 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowPathBuilder.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/common/FlowPathBuilder.java @@ -13,7 +13,7 @@ * limitations under the License. */ -package org.openkilda.wfm.topology.flowhs.service; +package org.openkilda.wfm.topology.flowhs.service.common; import static java.lang.String.format; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/path/FlowPathService.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/path/FlowPathService.java index 83aa52b01d6..aafd2bdb406 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/path/FlowPathService.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/path/FlowPathService.java @@ -17,8 +17,8 @@ import org.openkilda.floodlight.api.response.SpeakerFlowSegmentResponse; import org.openkilda.wfm.CommandContext; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.fsm.path.FlowPathInstallFsm; import org.openkilda.wfm.topology.flowhs.fsm.path.FlowPathOperation; import org.openkilda.wfm.topology.flowhs.fsm.path.FlowPathRemoveFsm; diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowCommandBuilder.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/speaker/FlowCommandBuilder.java similarity index 96% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowCommandBuilder.java rename to src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/speaker/FlowCommandBuilder.java index d28a6c08b31..0a544c84b99 100644 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowCommandBuilder.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/speaker/FlowCommandBuilder.java @@ -13,15 +13,13 @@ * limitations under the License. */ -package org.openkilda.wfm.topology.flowhs.service; +package org.openkilda.wfm.topology.flowhs.service.speaker; import org.openkilda.floodlight.api.request.factory.FlowSegmentRequestFactory; import org.openkilda.model.Flow; import org.openkilda.model.FlowPath; import org.openkilda.wfm.CommandContext; -import org.openkilda.wfm.share.model.MirrorContext; -import org.openkilda.wfm.share.model.SpeakerRequestBuildContext; -import org.openkilda.wfm.share.model.SpeakerRequestBuildContext.PathContext; +import org.openkilda.wfm.topology.flowhs.service.speaker.SpeakerRequestBuildContext.PathContext; import org.apache.commons.lang3.tuple.Pair; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowCommandBuilderFactory.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/speaker/FlowCommandBuilderFactory.java similarity index 92% rename from src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowCommandBuilderFactory.java rename to src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/speaker/FlowCommandBuilderFactory.java index 8cb2c54e8ff..452da60fd0a 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowCommandBuilderFactory.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/speaker/FlowCommandBuilderFactory.java @@ -13,11 +13,10 @@ * limitations under the License. */ -package org.openkilda.wfm.topology.flowhs.service; +package org.openkilda.wfm.topology.flowhs.service.speaker; import org.openkilda.model.FlowEncapsulationType; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; -import org.openkilda.wfm.share.service.SpeakerFlowSegmentRequestBuilder; public class FlowCommandBuilderFactory { private final FlowResourcesManager resourcesManager; diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowSegmentRequestFactoriesSequence.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/speaker/FlowSegmentRequestFactoriesSequence.java similarity index 94% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowSegmentRequestFactoriesSequence.java rename to src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/speaker/FlowSegmentRequestFactoriesSequence.java index 91b114b4df9..ac1c59ef76f 100644 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/FlowSegmentRequestFactoriesSequence.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/speaker/FlowSegmentRequestFactoriesSequence.java @@ -13,7 +13,7 @@ * limitations under the License. */ -package org.openkilda.wfm.topology.flowhs.service; +package org.openkilda.wfm.topology.flowhs.service.speaker; import org.openkilda.floodlight.api.request.factory.FlowSegmentRequestFactory; diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/model/MirrorContext.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/speaker/MirrorContext.java similarity index 94% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/model/MirrorContext.java rename to src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/speaker/MirrorContext.java index fe7d946510f..292f7a5da04 100644 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/model/MirrorContext.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/speaker/MirrorContext.java @@ -13,7 +13,7 @@ * limitations under the License. */ -package org.openkilda.wfm.share.model; +package org.openkilda.wfm.topology.flowhs.service.speaker; import lombok.Builder; import lombok.Data; diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/service/SpeakerFlowSegmentRequestBuilder.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/speaker/SpeakerFlowSegmentRequestBuilder.java similarity index 98% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/service/SpeakerFlowSegmentRequestBuilder.java rename to src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/speaker/SpeakerFlowSegmentRequestBuilder.java index 89a8ca2b31c..651c7b1b1e5 100644 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/service/SpeakerFlowSegmentRequestBuilder.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/speaker/SpeakerFlowSegmentRequestBuilder.java @@ -13,7 +13,7 @@ * limitations under the License. */ -package org.openkilda.wfm.share.service; +package org.openkilda.wfm.topology.flowhs.service.speaker; import static java.lang.String.format; @@ -49,11 +49,7 @@ import org.openkilda.wfm.CommandContext; import org.openkilda.wfm.share.flow.resources.EncapsulationResources; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; -import org.openkilda.wfm.share.model.MirrorContext; -import org.openkilda.wfm.share.model.SpeakerRequestBuildContext; -import org.openkilda.wfm.share.model.SpeakerRequestBuildContext.PathContext; -import org.openkilda.wfm.topology.flowhs.service.FlowCommandBuilder; -import org.openkilda.wfm.topology.flowhs.service.FlowSegmentRequestFactoriesSequence; +import org.openkilda.wfm.topology.flowhs.service.speaker.SpeakerRequestBuildContext.PathContext; import com.fasterxml.uuid.Generators; import com.fasterxml.uuid.NoArgGenerator; diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/model/SpeakerRequestBuildContext.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/speaker/SpeakerRequestBuildContext.java similarity index 97% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/model/SpeakerRequestBuildContext.java rename to src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/speaker/SpeakerRequestBuildContext.java index 33f3e1e4f60..d4965f092ae 100644 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/model/SpeakerRequestBuildContext.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/speaker/SpeakerRequestBuildContext.java @@ -13,7 +13,7 @@ * limitations under the License. */ -package org.openkilda.wfm.share.model; +package org.openkilda.wfm.topology.flowhs.service.speaker; import org.openkilda.model.MacAddress; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowCreateService.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowCreateService.java index 9cb2fc0cdcb..7d750f0d559 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowCreateService.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowCreateService.java @@ -29,8 +29,8 @@ import org.openkilda.wfm.CommandContext; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; import org.openkilda.wfm.share.utils.FsmExecutor; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.fsm.yflow.create.YFlowCreateContext; import org.openkilda.wfm.topology.flowhs.fsm.yflow.create.YFlowCreateFsm; import org.openkilda.wfm.topology.flowhs.fsm.yflow.create.YFlowCreateFsm.Event; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowDeleteService.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowDeleteService.java index 0e70345abc0..f79db06a0be 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowDeleteService.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowDeleteService.java @@ -27,8 +27,8 @@ import org.openkilda.wfm.CommandContext; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; import org.openkilda.wfm.share.utils.FsmExecutor; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.fsm.yflow.delete.YFlowDeleteContext; import org.openkilda.wfm.topology.flowhs.fsm.yflow.delete.YFlowDeleteFsm; import org.openkilda.wfm.topology.flowhs.fsm.yflow.delete.YFlowDeleteFsm.Event; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowPathSwapService.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowPathSwapService.java index 95413f8bb43..fd643027177 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowPathSwapService.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowPathSwapService.java @@ -26,8 +26,8 @@ import org.openkilda.rulemanager.RuleManager; import org.openkilda.wfm.CommandContext; import org.openkilda.wfm.share.utils.FsmExecutor; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.fsm.yflow.pathswap.YFlowPathSwapContext; import org.openkilda.wfm.topology.flowhs.fsm.yflow.pathswap.YFlowPathSwapFsm; import org.openkilda.wfm.topology.flowhs.fsm.yflow.pathswap.YFlowPathSwapFsm.Event; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowRerouteService.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowRerouteService.java index 2712704ecbb..5d55ff4b8de 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowRerouteService.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowRerouteService.java @@ -27,8 +27,8 @@ import org.openkilda.wfm.CommandContext; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; import org.openkilda.wfm.share.utils.FsmExecutor; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.fsm.yflow.reroute.YFlowRerouteContext; import org.openkilda.wfm.topology.flowhs.fsm.yflow.reroute.YFlowRerouteFsm; import org.openkilda.wfm.topology.flowhs.fsm.yflow.reroute.YFlowRerouteFsm.Event; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowUpdateService.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowUpdateService.java index 47414839ce5..cdd6941dafb 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowUpdateService.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowUpdateService.java @@ -39,9 +39,9 @@ import org.openkilda.wfm.CommandContext; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; import org.openkilda.wfm.share.utils.FsmExecutor; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.FlowProcessingException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.FlowProcessingException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.fsm.yflow.update.YFlowUpdateContext; import org.openkilda.wfm.topology.flowhs.fsm.yflow.update.YFlowUpdateFsm; import org.openkilda.wfm.topology.flowhs.fsm.yflow.update.YFlowUpdateFsm.Event; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowValidationHubService.java b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowValidationHubService.java index f10b031c304..89ef4452a1e 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowValidationHubService.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowValidationHubService.java @@ -24,8 +24,8 @@ import org.openkilda.persistence.PersistenceManager; import org.openkilda.wfm.CommandContext; import org.openkilda.wfm.share.utils.FsmExecutor; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.fsm.yflow.validation.YFlowValidationContext; import org.openkilda.wfm.topology.flowhs.fsm.yflow.validation.YFlowValidationFsm; import org.openkilda.wfm.topology.flowhs.fsm.yflow.validation.YFlowValidationFsm.Event; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/BaseFlowRuleRemovalActionTest.java b/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/BaseFlowRuleRemovalActionTest.java index 368c96ccf8c..bfdbcd69838 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/BaseFlowRuleRemovalActionTest.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/fsm/common/actions/BaseFlowRuleRemovalActionTest.java @@ -32,10 +32,10 @@ import org.openkilda.persistence.repositories.FlowRepository; import org.openkilda.persistence.repositories.SwitchPropertiesRepository; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; -import org.openkilda.wfm.share.model.SpeakerRequestBuildContext; import org.openkilda.wfm.topology.flowhs.fsm.common.FlowProcessingFsm; import org.openkilda.wfm.topology.flowhs.model.DetectConnectedDevices; import org.openkilda.wfm.topology.flowhs.model.RequestedFlow; +import org.openkilda.wfm.topology.flowhs.service.speaker.SpeakerRequestBuildContext; import org.junit.Before; import org.junit.Test; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/FlowCreateServiceTest.java b/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/FlowCreateServiceTest.java index cb83a5fddaa..b4b88818e24 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/FlowCreateServiceTest.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/FlowCreateServiceTest.java @@ -40,8 +40,8 @@ import org.openkilda.pce.exception.RecoverableException; import org.openkilda.pce.exception.UnroutableFlowException; import org.openkilda.wfm.CommandContext; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.junit.Assert; import org.junit.Before; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/FlowDeleteServiceTest.java b/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/FlowDeleteServiceTest.java index 24648d49c53..d6c8b5b16db 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/FlowDeleteServiceTest.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/FlowDeleteServiceTest.java @@ -35,8 +35,8 @@ import org.openkilda.persistence.repositories.FlowRepository; import org.openkilda.persistence.repositories.RepositoryFactory; import org.openkilda.wfm.share.flow.resources.FlowResources.PathResources; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.hamcrest.Matchers; import org.junit.Assert; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/FlowRerouteServiceTest.java b/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/FlowRerouteServiceTest.java index e64dfa12033..55c6abf5d10 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/FlowRerouteServiceTest.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/FlowRerouteServiceTest.java @@ -57,7 +57,7 @@ import org.openkilda.persistence.repositories.IslRepository; import org.openkilda.wfm.CommandContext; import org.openkilda.wfm.share.flow.resources.ResourceAllocationException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.junit.Assert; import org.junit.Before; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/FlowUpdateServiceTest.java b/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/FlowUpdateServiceTest.java index 3e92c198491..3260b6b44c5 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/FlowUpdateServiceTest.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/FlowUpdateServiceTest.java @@ -58,8 +58,8 @@ import org.openkilda.persistence.repositories.FlowPathRepository; import org.openkilda.persistence.repositories.IslRepository; import org.openkilda.wfm.share.flow.resources.ResourceAllocationException; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import com.google.common.collect.Sets; import org.junit.Assert; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/FlowValidationHubServiceTest.java b/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/FlowValidationHubServiceTest.java index 8fbad1b8c15..c4eb9395236 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/FlowValidationHubServiceTest.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/FlowValidationHubServiceTest.java @@ -36,8 +36,8 @@ import org.openkilda.wfm.error.FlowNotFoundException; import org.openkilda.wfm.error.SwitchNotFoundException; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.fsm.validation.FlowValidationService; import org.openkilda.wfm.topology.flowhs.fsm.validation.FlowValidationTestBase; diff --git a/src-java/base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/FlowPathBuilderTest.java b/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/common/FlowPathBuilderTest.java similarity index 99% rename from src-java/base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/FlowPathBuilderTest.java rename to src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/common/FlowPathBuilderTest.java index 384290cc210..efeeb38bf73 100644 --- a/src-java/base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/FlowPathBuilderTest.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/common/FlowPathBuilderTest.java @@ -13,7 +13,7 @@ * limitations under the License. */ -package org.openkilda.wfm.topology.flowhs.service; +package org.openkilda.wfm.topology.flowhs.service.common; import static java.util.Arrays.asList; import static junit.framework.TestCase.assertTrue; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/path/FlowPathServiceTest.java b/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/path/FlowPathServiceTest.java index 4d35820ea3f..f3c380a2a63 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/path/FlowPathServiceTest.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/path/FlowPathServiceTest.java @@ -44,7 +44,7 @@ import org.openkilda.model.cookie.Cookie; import org.openkilda.model.cookie.FlowSegmentCookie; import org.openkilda.wfm.CommandContext; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.model.path.FlowPathChunk; import org.openkilda.wfm.topology.flowhs.model.path.FlowPathOperationConfig; import org.openkilda.wfm.topology.flowhs.model.path.FlowPathReference; diff --git a/src-java/base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/share/service/SpeakerFlowSegmentRequestBuilderTest.java b/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/speaker/SpeakerFlowSegmentRequestBuilderTest.java similarity index 99% rename from src-java/base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/share/service/SpeakerFlowSegmentRequestBuilderTest.java rename to src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/speaker/SpeakerFlowSegmentRequestBuilderTest.java index 7c5e24da443..33c85167301 100644 --- a/src-java/base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/share/service/SpeakerFlowSegmentRequestBuilderTest.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/speaker/SpeakerFlowSegmentRequestBuilderTest.java @@ -13,7 +13,7 @@ * limitations under the License. */ -package org.openkilda.wfm.share.service; +package org.openkilda.wfm.topology.flowhs.service.speaker; import static org.hamcrest.CoreMatchers.instanceOf; import static org.junit.Assert.assertEquals; @@ -47,7 +47,6 @@ import org.openkilda.wfm.CommandContext; import org.openkilda.wfm.share.flow.resources.FlowResourcesConfig; import org.openkilda.wfm.share.flow.resources.FlowResourcesManager; -import org.openkilda.wfm.share.model.SpeakerRequestBuildContext; import com.fasterxml.uuid.Generators; import com.fasterxml.uuid.NoArgGenerator; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowCreateServiceTest.java b/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowCreateServiceTest.java index 90ae21dd5ed..09146bb45de 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowCreateServiceTest.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowCreateServiceTest.java @@ -40,8 +40,8 @@ import org.openkilda.persistence.repositories.YFlowRepository; import org.openkilda.wfm.CommandContext; import org.openkilda.wfm.share.flow.resources.ResourceAllocationException; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.service.AbstractYFlowTest; import org.openkilda.wfm.topology.flowhs.service.FlowCreateService; import org.openkilda.wfm.topology.flowhs.service.FlowDeleteService; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowDeleteServiceTest.java b/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowDeleteServiceTest.java index b88b6f71748..b314501519f 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowDeleteServiceTest.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowDeleteServiceTest.java @@ -28,8 +28,8 @@ import org.openkilda.messaging.error.ErrorType; import org.openkilda.model.FlowStatus; import org.openkilda.wfm.CommandContext; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.service.AbstractYFlowTest; import org.openkilda.wfm.topology.flowhs.service.FlowDeleteService; import org.openkilda.wfm.topology.flowhs.service.FlowGenericCarrier; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowPathSwapServiceTest.java b/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowPathSwapServiceTest.java index aa36afd7fe8..ca31594e96f 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowPathSwapServiceTest.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowPathSwapServiceTest.java @@ -33,8 +33,8 @@ import org.openkilda.model.YSubFlow; import org.openkilda.persistence.repositories.YFlowRepository; import org.openkilda.wfm.CommandContext; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.service.AbstractYFlowTest; import org.openkilda.wfm.topology.flowhs.service.FlowGenericCarrier; import org.openkilda.wfm.topology.flowhs.service.FlowPathSwapHubCarrier; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowRerouteServiceTest.java b/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowRerouteServiceTest.java index 4803b02d93e..8d3c5f1591a 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowRerouteServiceTest.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowRerouteServiceTest.java @@ -48,8 +48,8 @@ import org.openkilda.pce.exception.UnroutableFlowException; import org.openkilda.wfm.CommandContext; import org.openkilda.wfm.share.flow.resources.ResourceAllocationException; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.service.AbstractYFlowTest; import org.openkilda.wfm.topology.flowhs.service.FlowCreateService; import org.openkilda.wfm.topology.flowhs.service.FlowDeleteService; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowUpdateServiceTest.java b/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowUpdateServiceTest.java index 4d6489d4aab..ff55ef90bb6 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowUpdateServiceTest.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowUpdateServiceTest.java @@ -46,8 +46,8 @@ import org.openkilda.pce.exception.UnroutableFlowException; import org.openkilda.wfm.CommandContext; import org.openkilda.wfm.share.flow.resources.ResourceAllocationException; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; -import org.openkilda.wfm.topology.flowhs.exception.UnknownKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.UnknownKeyException; import org.openkilda.wfm.topology.flowhs.service.AbstractYFlowTest; import org.openkilda.wfm.topology.flowhs.service.FlowCreateService; import org.openkilda.wfm.topology.flowhs.service.FlowDeleteService; diff --git a/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowValidationHubServiceTest.java b/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowValidationHubServiceTest.java index 6ca337d44b4..66a76cad0cd 100644 --- a/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowValidationHubServiceTest.java +++ b/src-java/flowhs-topology/flowhs-storm-topology/src/test/java/org/openkilda/wfm/topology/flowhs/service/yflow/YFlowValidationHubServiceTest.java @@ -49,7 +49,7 @@ import org.openkilda.model.YFlow; import org.openkilda.model.YSubFlow; import org.openkilda.wfm.CommandContext; -import org.openkilda.wfm.topology.flowhs.exception.DuplicateKeyException; +import org.openkilda.wfm.topology.flowhs.exceptions.DuplicateKeyException; import org.openkilda.wfm.topology.flowhs.fsm.yflow.validation.YFlowSwitchFlowEntriesBuilder; import org.openkilda.wfm.topology.flowhs.fsm.yflow.validation.YFlowValidationService; import org.openkilda.wfm.topology.flowhs.service.AbstractYFlowTest; diff --git a/src-java/flowmonitoring-topology/flowmonitoring-storm-topology/build.gradle b/src-java/flowmonitoring-topology/flowmonitoring-storm-topology/build.gradle index 870a589030a..40b958df05a 100644 --- a/src-java/flowmonitoring-topology/flowmonitoring-storm-topology/build.gradle +++ b/src-java/flowmonitoring-topology/flowmonitoring-storm-topology/build.gradle @@ -8,14 +8,8 @@ compileJava.ajc.options.compilerArgs += '-verbose' description = 'Flow Monitoring Storm Topology' dependencies { - implementation project(':flowmonitoring-messaging') - implementation project(':flowhs-messaging') - implementation project(':stats-messaging') - implementation project(':base-storm-topology') - implementation project(':server42-messaging') - implementation project(':network-messaging') - implementation project(':floodlight-api') implementation project(':blue-green') + implementation project(':base-storm-topology') runtimeOnly project(path: ':base-storm-topology', configuration: 'releaseArtifacts') testImplementation project(path: ':base-storm-topology', configuration: 'testArtifacts') runtimeOnly project(':kilda-persistence-orientdb') @@ -24,6 +18,12 @@ dependencies { aspect project(':kilda-persistence-api') testImplementation project(path: ':kilda-persistence-tinkerpop', configuration: 'testArtifacts') testImplementation project(':kilda-utils:stubs') + implementation project(':flowmonitoring-messaging') + implementation project(':flowhs-messaging') + implementation project(':stats-messaging') + implementation project(':server42-messaging') + implementation project(':network-messaging') + implementation project(':floodlight-api') compileOnly('org.apache.storm:storm-core') testImplementation('org.apache.storm:storm-core') diff --git a/src-java/grpc-speaker/grpc-service/build.gradle b/src-java/grpc-speaker/grpc-service/build.gradle index af3834b6af4..26cb6597e83 100644 --- a/src-java/grpc-speaker/grpc-service/build.gradle +++ b/src-java/grpc-speaker/grpc-service/build.gradle @@ -12,9 +12,9 @@ dependencies { implementation(platform('org.springframework:spring-framework-bom:5.2.19.RELEASE')) implementation(platform('org.springframework.boot:spring-boot-dependencies:2.2.13.RELEASE')) - implementation project(':grpc-api') - implementation project(':kilda-configuration') implementation project(':blue-green') + implementation project(':kilda-configuration') + implementation project(':grpc-api') implementation('org.springframework.boot:spring-boot-starter') implementation 'org.springframework.boot:spring-boot-starter-log4j2' diff --git a/src-java/history-topology/history-storm-topology/build.gradle b/src-java/history-topology/history-storm-topology/build.gradle index 59a01e8dfcb..6eebebcee98 100644 --- a/src-java/history-topology/history-storm-topology/build.gradle +++ b/src-java/history-topology/history-storm-topology/build.gradle @@ -8,11 +8,12 @@ compileJava.ajc.options.compilerArgs += '-verbose' description = 'History Storm Topology' dependencies { - implementation project(':base-storm-topology') implementation project(':blue-green') + implementation project(':base-storm-topology') runtimeOnly project(path: ':base-storm-topology', configuration: 'releaseArtifacts') runtimeOnly project(':kilda-persistence-orientdb') runtimeOnly project(':kilda-persistence-hibernate') + implementation project(':kilda-history-records') compileOnly('org.apache.storm:storm-core') diff --git a/src-java/isllatency-topology/isllatency-storm-topology/build.gradle b/src-java/isllatency-topology/isllatency-storm-topology/build.gradle index 580742c0166..3930f502366 100644 --- a/src-java/isllatency-topology/isllatency-storm-topology/build.gradle +++ b/src-java/isllatency-topology/isllatency-storm-topology/build.gradle @@ -8,18 +8,18 @@ compileJava.ajc.options.compilerArgs += '-verbose' description = 'Isl Latency Storm Topology' dependencies { + implementation project(':blue-green') implementation project(':base-storm-topology') runtimeOnly project(path: ':base-storm-topology', configuration: 'releaseArtifacts') testImplementation project(path: ':base-storm-topology', configuration: 'testArtifacts') - implementation project(':isllatency-messaging') - implementation project(':network-messaging') - implementation project(':floodlight-api') runtimeOnly project(':kilda-persistence-orientdb') runtimeOnly project(':kilda-persistence-hibernate') aspect project(':kilda-persistence-api') testImplementation project(path: ':kilda-persistence-api', configuration: 'testArtifacts') testImplementation project(path: ':kilda-persistence-tinkerpop', configuration: 'testArtifacts') - implementation project(':blue-green') + implementation project(':isllatency-messaging') + implementation project(':network-messaging') + implementation project(':floodlight-api') compileOnly('org.apache.storm:storm-core') testImplementation('org.apache.storm:storm-core') diff --git a/src-java/kilda-history-records/README.md b/src-java/kilda-history-records/README.md new file mode 100644 index 00000000000..9012c584f7a --- /dev/null +++ b/src-java/kilda-history-records/README.md @@ -0,0 +1,3 @@ +# OpenKilda History Records module + +This module holds the implementation for system-wide history records in OpenKilda controller application. diff --git a/src-java/kilda-history-records/build.gradle b/src-java/kilda-history-records/build.gradle new file mode 100644 index 00000000000..e0784917109 --- /dev/null +++ b/src-java/kilda-history-records/build.gradle @@ -0,0 +1,23 @@ +description = 'Kilda History Records' +dependencies { + implementation project(':base-messaging') + implementation project(':base-messaging-mappers') + implementation project(':kilda-model') + implementation project(':kilda-persistence-api') + implementation project(':kilda-resource-pools') + + implementation 'org.slf4j:slf4j-api' + implementation 'com.fasterxml.jackson.core:jackson-databind' + implementation 'net.jodah:failsafe' + testImplementation 'org.junit.jupiter:junit-jupiter-api' + testImplementation 'org.junit.vintage:junit-vintage-engine' + + implementation 'org.mapstruct:mapstruct' + implementation 'org.mapstruct:mapstruct-processor' + annotationProcessor 'org.mapstruct:mapstruct-processor' + testAnnotationProcessor 'org.mapstruct:mapstruct-processor' + + compileOnly 'org.projectlombok:lombok' + annotationProcessor 'org.projectlombok:lombok' + annotationProcessor 'org.projectlombok:lombok-mapstruct-binding' +} diff --git a/src-java/kilda-history-records/src/checkstyle/checkstyle-suppressions.xml b/src-java/kilda-history-records/src/checkstyle/checkstyle-suppressions.xml new file mode 100644 index 00000000000..722b573f214 --- /dev/null +++ b/src-java/kilda-history-records/src/checkstyle/checkstyle-suppressions.xml @@ -0,0 +1,6 @@ + + + + diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/history/model/FlowDumpData.java b/src-java/kilda-history-records/src/main/java/org/openkilda/wfm/share/history/model/FlowDumpData.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/history/model/FlowDumpData.java rename to src-java/kilda-history-records/src/main/java/org/openkilda/wfm/share/history/model/FlowDumpData.java diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/history/model/FlowEventData.java b/src-java/kilda-history-records/src/main/java/org/openkilda/wfm/share/history/model/FlowEventData.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/history/model/FlowEventData.java rename to src-java/kilda-history-records/src/main/java/org/openkilda/wfm/share/history/model/FlowEventData.java diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/history/model/FlowHistoryData.java b/src-java/kilda-history-records/src/main/java/org/openkilda/wfm/share/history/model/FlowHistoryData.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/history/model/FlowHistoryData.java rename to src-java/kilda-history-records/src/main/java/org/openkilda/wfm/share/history/model/FlowHistoryData.java diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/history/model/FlowHistoryHolder.java b/src-java/kilda-history-records/src/main/java/org/openkilda/wfm/share/history/model/FlowHistoryHolder.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/history/model/FlowHistoryHolder.java rename to src-java/kilda-history-records/src/main/java/org/openkilda/wfm/share/history/model/FlowHistoryHolder.java diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/history/model/PortEventData.java b/src-java/kilda-history-records/src/main/java/org/openkilda/wfm/share/history/model/PortEventData.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/history/model/PortEventData.java rename to src-java/kilda-history-records/src/main/java/org/openkilda/wfm/share/history/model/PortEventData.java diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/history/model/PortHistoryEvent.java b/src-java/kilda-history-records/src/main/java/org/openkilda/wfm/share/history/model/PortHistoryEvent.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/history/model/PortHistoryEvent.java rename to src-java/kilda-history-records/src/main/java/org/openkilda/wfm/share/history/model/PortHistoryEvent.java diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/history/service/HistoryService.java b/src-java/kilda-history-records/src/main/java/org/openkilda/wfm/share/history/service/HistoryService.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/history/service/HistoryService.java rename to src-java/kilda-history-records/src/main/java/org/openkilda/wfm/share/history/service/HistoryService.java diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/mappers/HistoryMapper.java b/src-java/kilda-history-records/src/main/java/org/openkilda/wfm/share/mappers/HistoryMapper.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/mappers/HistoryMapper.java rename to src-java/kilda-history-records/src/main/java/org/openkilda/wfm/share/mappers/HistoryMapper.java diff --git a/src-java/base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/share/mappers/HistoryMapperTest.java b/src-java/kilda-history-records/src/test/java/org/openkilda/wfm/share/mappers/HistoryMapperTest.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/share/mappers/HistoryMapperTest.java rename to src-java/kilda-history-records/src/test/java/org/openkilda/wfm/share/mappers/HistoryMapperTest.java diff --git a/src-java/kilda-persistence-hibernate/build.gradle b/src-java/kilda-persistence-hibernate/build.gradle index bf38025f4a3..80fa2ca8328 100644 --- a/src-java/kilda-persistence-hibernate/build.gradle +++ b/src-java/kilda-persistence-hibernate/build.gradle @@ -6,12 +6,12 @@ description = 'Kilda Persistence Hibernate Implemention' dependencies { api project(':kilda-persistence-api') api project(':kilda-model') - api project(':base-messaging') implementation project(':kilda-configuration') implementation 'com.google.guava:guava' implementation 'net.jodah:failsafe' implementation 'commons-codec:commons-codec' + implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310' implementation ('org.hibernate:hibernate-core:5.4.32.Final') { // To avoid collision between javax and jakarta implementations. diff --git a/src-java/kilda-persistence-hibernate/src/main/java/org/openkilda/persistence/hibernate/KildaObjectMapperSupplier.java b/src-java/kilda-persistence-hibernate/src/main/java/org/openkilda/persistence/hibernate/KildaObjectMapperSupplier.java index c49ea801828..c92c75a2048 100644 --- a/src-java/kilda-persistence-hibernate/src/main/java/org/openkilda/persistence/hibernate/KildaObjectMapperSupplier.java +++ b/src-java/kilda-persistence-hibernate/src/main/java/org/openkilda/persistence/hibernate/KildaObjectMapperSupplier.java @@ -15,14 +15,16 @@ package org.openkilda.persistence.hibernate; -import org.openkilda.messaging.SerializationUtils; - import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import com.vladmihalcea.hibernate.type.util.ObjectMapperSupplier; public class KildaObjectMapperSupplier implements ObjectMapperSupplier { + private static ObjectMapper MAPPER = new ObjectMapper() + .registerModule(new JavaTimeModule()); + @Override public ObjectMapper get() { - return SerializationUtils.MAPPER; + return MAPPER; } } diff --git a/src-java/kilda-resource-pools/README.md b/src-java/kilda-resource-pools/README.md new file mode 100644 index 00000000000..e709b02ef4f --- /dev/null +++ b/src-java/kilda-resource-pools/README.md @@ -0,0 +1,3 @@ +# OpenKilda resource pools module + +This module holds the implementation for system-wide resource pools in OpenKilda controller application. diff --git a/src-java/kilda-resource-pools/build.gradle b/src-java/kilda-resource-pools/build.gradle new file mode 100644 index 00000000000..a661d5b2d57 --- /dev/null +++ b/src-java/kilda-resource-pools/build.gradle @@ -0,0 +1,21 @@ +description = 'Kilda Resource Pools' +dependencies { + testImplementation project(':base-messaging') + testImplementation project(':base-messaging-mappers') + implementation project(':kilda-model') + implementation project(':kilda-persistence-api') + implementation project(':kilda-configuration') + testImplementation project(path: ':kilda-persistence-tinkerpop', configuration: 'testArtifacts') + + implementation 'org.slf4j:slf4j-api' + implementation 'com.google.guava:guava' + implementation 'net.jodah:failsafe' + implementation 'org.apache.commons:commons-collections4' + testImplementation 'org.junit.jupiter:junit-jupiter-api' + testImplementation 'org.junit.vintage:junit-vintage-engine' + testImplementation 'org.mockito:mockito-junit-jupiter' + + compileOnly 'org.projectlombok:lombok' + annotationProcessor 'org.projectlombok:lombok' + annotationProcessor 'org.projectlombok:lombok-mapstruct-binding' +} diff --git a/src-java/kilda-resource-pools/src/checkstyle/checkstyle-suppressions.xml b/src-java/kilda-resource-pools/src/checkstyle/checkstyle-suppressions.xml new file mode 100644 index 00000000000..77484768d0a --- /dev/null +++ b/src-java/kilda-resource-pools/src/checkstyle/checkstyle-suppressions.xml @@ -0,0 +1,8 @@ + + + + + + diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/CookiePool.java b/src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/flow/resources/CookiePool.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/CookiePool.java rename to src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/flow/resources/CookiePool.java diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/EncapsulationResources.java b/src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/flow/resources/EncapsulationResources.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/EncapsulationResources.java rename to src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/flow/resources/EncapsulationResources.java diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/EncapsulationResourcesProvider.java b/src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/flow/resources/EncapsulationResourcesProvider.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/EncapsulationResourcesProvider.java rename to src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/flow/resources/EncapsulationResourcesProvider.java diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/FlowMirrorPathResources.java b/src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/flow/resources/FlowMirrorPathResources.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/FlowMirrorPathResources.java rename to src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/flow/resources/FlowMirrorPathResources.java diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/FlowResources.java b/src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/flow/resources/FlowResources.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/FlowResources.java rename to src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/flow/resources/FlowResources.java diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/FlowResourcesConfig.java b/src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/flow/resources/FlowResourcesConfig.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/FlowResourcesConfig.java rename to src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/flow/resources/FlowResourcesConfig.java diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/FlowResourcesManager.java b/src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/flow/resources/FlowResourcesManager.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/FlowResourcesManager.java rename to src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/flow/resources/FlowResourcesManager.java diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/MeterIdPoolEntityAdapter.java b/src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/flow/resources/MeterIdPoolEntityAdapter.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/MeterIdPoolEntityAdapter.java rename to src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/flow/resources/MeterIdPoolEntityAdapter.java diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/MirrorGroupIdPool.java b/src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/flow/resources/MirrorGroupIdPool.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/MirrorGroupIdPool.java rename to src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/flow/resources/MirrorGroupIdPool.java diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/ResourceAllocationException.java b/src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/flow/resources/ResourceAllocationException.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/ResourceAllocationException.java rename to src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/flow/resources/ResourceAllocationException.java diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/ResourceNotAvailableException.java b/src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/flow/resources/ResourceNotAvailableException.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/ResourceNotAvailableException.java rename to src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/flow/resources/ResourceNotAvailableException.java diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/transitvlan/TransitVlanEncapsulation.java b/src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/flow/resources/transitvlan/TransitVlanEncapsulation.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/transitvlan/TransitVlanEncapsulation.java rename to src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/flow/resources/transitvlan/TransitVlanEncapsulation.java diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/transitvlan/TransitVlanPool.java b/src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/flow/resources/transitvlan/TransitVlanPool.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/transitvlan/TransitVlanPool.java rename to src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/flow/resources/transitvlan/TransitVlanPool.java diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/vxlan/VxlanEncapsulation.java b/src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/flow/resources/vxlan/VxlanEncapsulation.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/vxlan/VxlanEncapsulation.java rename to src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/flow/resources/vxlan/VxlanEncapsulation.java diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/vxlan/VxlanPool.java b/src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/flow/resources/vxlan/VxlanPool.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/flow/resources/vxlan/VxlanPool.java rename to src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/flow/resources/vxlan/VxlanPool.java diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/utils/PoolEntityAdapter.java b/src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/utils/PoolEntityAdapter.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/utils/PoolEntityAdapter.java rename to src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/utils/PoolEntityAdapter.java diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/utils/PoolManager.java b/src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/utils/PoolManager.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/utils/PoolManager.java rename to src-java/kilda-resource-pools/src/main/java/org/openkilda/wfm/share/utils/PoolManager.java diff --git a/src-java/base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/share/flow/resources/CookiePoolTest.java b/src-java/kilda-resource-pools/src/test/java/org/openkilda/wfm/share/flow/resources/CookiePoolTest.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/share/flow/resources/CookiePoolTest.java rename to src-java/kilda-resource-pools/src/test/java/org/openkilda/wfm/share/flow/resources/CookiePoolTest.java diff --git a/src-java/base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/share/flow/resources/FlowResourcesManagerTest.java b/src-java/kilda-resource-pools/src/test/java/org/openkilda/wfm/share/flow/resources/FlowResourcesManagerTest.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/share/flow/resources/FlowResourcesManagerTest.java rename to src-java/kilda-resource-pools/src/test/java/org/openkilda/wfm/share/flow/resources/FlowResourcesManagerTest.java diff --git a/src-java/base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/share/flow/resources/transitvlan/TransitVlanPoolTest.java b/src-java/kilda-resource-pools/src/test/java/org/openkilda/wfm/share/flow/resources/transitvlan/TransitVlanPoolTest.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/share/flow/resources/transitvlan/TransitVlanPoolTest.java rename to src-java/kilda-resource-pools/src/test/java/org/openkilda/wfm/share/flow/resources/transitvlan/TransitVlanPoolTest.java diff --git a/src-java/base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/share/flow/resources/vxlan/VxlanPoolTest.java b/src-java/kilda-resource-pools/src/test/java/org/openkilda/wfm/share/flow/resources/vxlan/VxlanPoolTest.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/share/flow/resources/vxlan/VxlanPoolTest.java rename to src-java/kilda-resource-pools/src/test/java/org/openkilda/wfm/share/flow/resources/vxlan/VxlanPoolTest.java diff --git a/src-java/base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/share/utils/InMemorySetPoolEntityAdapter.java b/src-java/kilda-resource-pools/src/test/java/org/openkilda/wfm/share/utils/InMemorySetPoolEntityAdapter.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/share/utils/InMemorySetPoolEntityAdapter.java rename to src-java/kilda-resource-pools/src/test/java/org/openkilda/wfm/share/utils/InMemorySetPoolEntityAdapter.java diff --git a/src-java/base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/share/utils/PoolManagerTest.java b/src-java/kilda-resource-pools/src/test/java/org/openkilda/wfm/share/utils/PoolManagerTest.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/share/utils/PoolManagerTest.java rename to src-java/kilda-resource-pools/src/test/java/org/openkilda/wfm/share/utils/PoolManagerTest.java diff --git a/src-java/base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/share/utils/PredictablePoolManager.java b/src-java/kilda-resource-pools/src/test/java/org/openkilda/wfm/share/utils/PredictablePoolManager.java similarity index 100% rename from src-java/base-topology/base-storm-topology/src/test/java/org/openkilda/wfm/share/utils/PredictablePoolManager.java rename to src-java/kilda-resource-pools/src/test/java/org/openkilda/wfm/share/utils/PredictablePoolManager.java diff --git a/src-java/kilda-utils/stubs/build.gradle b/src-java/kilda-utils/stubs/build.gradle index 445b5db8d48..fe0554c04be 100644 --- a/src-java/kilda-utils/stubs/build.gradle +++ b/src-java/kilda-utils/stubs/build.gradle @@ -1,5 +1 @@ -plugins { - id 'java-library' -} - description = 'Kilda tests stubs' diff --git a/src-java/nbworker-topology/nbworker-messaging/build.gradle b/src-java/nbworker-topology/nbworker-messaging/build.gradle index 9697b9d831c..65a4fb9d7b7 100644 --- a/src-java/nbworker-topology/nbworker-messaging/build.gradle +++ b/src-java/nbworker-topology/nbworker-messaging/build.gradle @@ -4,9 +4,8 @@ plugins { description = 'NB Worker Messaging' dependencies { - api project(':base-messaging') implementation project(':blue-green') - + api project(':base-messaging') testImplementation project(path: ':base-messaging', configuration: 'testArtifacts') implementation 'com.fasterxml.jackson.core:jackson-core' diff --git a/src-java/nbworker-topology/nbworker-storm-topology/build.gradle b/src-java/nbworker-topology/nbworker-storm-topology/build.gradle index af2963cebfc..d097ba93b7f 100644 --- a/src-java/nbworker-topology/nbworker-storm-topology/build.gradle +++ b/src-java/nbworker-topology/nbworker-storm-topology/build.gradle @@ -8,13 +8,8 @@ compileJava.ajc.options.compilerArgs += '-verbose' description = 'NB Worker Storm Topology' dependencies { - implementation project(':nbworker-messaging') - implementation project(':flowhs-messaging') - implementation project(':network-messaging') - implementation project(':ping-messaging') - implementation project(':server42-control-messaging') - implementation project(':base-storm-topology') implementation project(':blue-green') + implementation project(':base-storm-topology') aspect project(':base-storm-topology') runtimeOnly project(path: ':base-storm-topology', configuration: 'releaseArtifacts') testImplementation project(path: ':base-storm-topology', configuration: 'testArtifacts') @@ -25,6 +20,12 @@ dependencies { runtimeOnly project(':kilda-persistence-hibernate') testImplementation project(path: ':kilda-persistence-api', configuration: 'testArtifacts') testImplementation project(path: ':kilda-persistence-tinkerpop', configuration: 'testArtifacts') + implementation project(':kilda-history-records') + implementation project(':nbworker-messaging') + implementation project(':flowhs-messaging') + implementation project(':network-messaging') + implementation project(':ping-messaging') + implementation project(':server42-control-messaging') compileOnly('org.apache.storm:storm-core') testImplementation('org.apache.storm:storm-core') diff --git a/src-java/nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/bolts/LinkOperationsBolt.java b/src-java/nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/bolts/LinkOperationsBolt.java index daaaae20d58..59b2518a714 100644 --- a/src-java/nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/bolts/LinkOperationsBolt.java +++ b/src-java/nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/bolts/LinkOperationsBolt.java @@ -47,12 +47,12 @@ import org.openkilda.wfm.CommandContext; import org.openkilda.wfm.error.IllegalIslStateException; import org.openkilda.wfm.error.IslNotFoundException; -import org.openkilda.wfm.error.LinkPropsException; import org.openkilda.wfm.share.mappers.IslMapper; -import org.openkilda.wfm.share.mappers.LinkPropsMapper; import org.openkilda.wfm.share.metrics.TimedExecution; import org.openkilda.wfm.share.model.Endpoint; import org.openkilda.wfm.topology.nbworker.StreamType; +import org.openkilda.wfm.topology.nbworker.exceptions.LinkPropsException; +import org.openkilda.wfm.topology.nbworker.mappers.LinkPropsMapper; import org.openkilda.wfm.topology.nbworker.services.FlowOperationsService; import org.openkilda.wfm.topology.nbworker.services.ILinkOperationsServiceCarrier; import org.openkilda.wfm.topology.nbworker.services.LinkOperationsService; diff --git a/src-java/nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/bolts/SwitchOperationsBolt.java b/src-java/nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/bolts/SwitchOperationsBolt.java index 5c76c2b941b..fa28b174e8e 100644 --- a/src-java/nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/bolts/SwitchOperationsBolt.java +++ b/src-java/nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/bolts/SwitchOperationsBolt.java @@ -61,8 +61,6 @@ import org.openkilda.server42.control.messaging.islrtt.ActivateIslMonitoringOnSwitchInfoData; import org.openkilda.server42.control.messaging.islrtt.DeactivateIslMonitoringOnSwitchInfoData; import org.openkilda.wfm.CommandContext; -import org.openkilda.wfm.error.IllegalSwitchPropertiesException; -import org.openkilda.wfm.error.IllegalSwitchStateException; import org.openkilda.wfm.error.SwitchNotFoundException; import org.openkilda.wfm.error.SwitchPropertiesNotFoundException; import org.openkilda.wfm.share.mappers.ConnectedDeviceMapper; @@ -72,6 +70,8 @@ import org.openkilda.wfm.share.model.Endpoint; import org.openkilda.wfm.share.utils.KeyProvider; import org.openkilda.wfm.topology.nbworker.StreamType; +import org.openkilda.wfm.topology.nbworker.exceptions.IllegalSwitchPropertiesException; +import org.openkilda.wfm.topology.nbworker.exceptions.IllegalSwitchStateException; import org.openkilda.wfm.topology.nbworker.services.FlowOperationsService; import org.openkilda.wfm.topology.nbworker.services.ILinkOperationsServiceCarrier; import org.openkilda.wfm.topology.nbworker.services.SwitchOperationsService; diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/IllegalSwitchPropertiesException.java b/src-java/nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/exceptions/IllegalSwitchPropertiesException.java similarity index 93% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/IllegalSwitchPropertiesException.java rename to src-java/nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/exceptions/IllegalSwitchPropertiesException.java index 62b250edb9d..da811cc1fa2 100644 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/IllegalSwitchPropertiesException.java +++ b/src-java/nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/exceptions/IllegalSwitchPropertiesException.java @@ -13,7 +13,7 @@ * limitations under the License. */ -package org.openkilda.wfm.error; +package org.openkilda.wfm.topology.nbworker.exceptions; public class IllegalSwitchPropertiesException extends RuntimeException { diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/IllegalSwitchStateException.java b/src-java/nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/exceptions/IllegalSwitchStateException.java similarity index 94% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/IllegalSwitchStateException.java rename to src-java/nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/exceptions/IllegalSwitchStateException.java index cdf8d7d3ab3..f0c03a9df9c 100644 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/IllegalSwitchStateException.java +++ b/src-java/nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/exceptions/IllegalSwitchStateException.java @@ -13,7 +13,7 @@ * limitations under the License. */ -package org.openkilda.wfm.error; +package org.openkilda.wfm.topology.nbworker.exceptions; /** * Exception which indicates that some switch operation couldn't be completed because switch is in illegal state. diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/LinkPropsException.java b/src-java/nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/exceptions/LinkPropsException.java similarity index 94% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/LinkPropsException.java rename to src-java/nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/exceptions/LinkPropsException.java index acea9ffddd7..c792ddefa06 100644 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/LinkPropsException.java +++ b/src-java/nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/exceptions/LinkPropsException.java @@ -13,7 +13,7 @@ * limitations under the License. */ -package org.openkilda.wfm.error; +package org.openkilda.wfm.topology.nbworker.exceptions; /** * Exception when occupied error on create or update flow. diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/mappers/LinkPropsMapper.java b/src-java/nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/mappers/LinkPropsMapper.java similarity index 96% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/mappers/LinkPropsMapper.java rename to src-java/nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/mappers/LinkPropsMapper.java index 252a6912ea2..adaee84ee7f 100644 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/mappers/LinkPropsMapper.java +++ b/src-java/nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/mappers/LinkPropsMapper.java @@ -13,14 +13,14 @@ * limitations under the License. */ -package org.openkilda.wfm.share.mappers; +package org.openkilda.wfm.topology.nbworker.mappers; import static java.lang.String.format; import org.openkilda.messaging.model.LinkPropsDto; import org.openkilda.messaging.model.NetworkEndpoint; import org.openkilda.model.LinkProps; -import org.openkilda.wfm.error.LinkPropsException; +import org.openkilda.wfm.topology.nbworker.exceptions.LinkPropsException; import lombok.extern.slf4j.Slf4j; import org.mapstruct.Mapper; diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/mappers/PathMapper.java b/src-java/nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/mappers/PathMapper.java similarity index 97% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/mappers/PathMapper.java rename to src-java/nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/mappers/PathMapper.java index 04510c26d78..b76e0f41f96 100644 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/share/mappers/PathMapper.java +++ b/src-java/nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/mappers/PathMapper.java @@ -13,7 +13,7 @@ * limitations under the License. */ -package org.openkilda.wfm.share.mappers; +package org.openkilda.wfm.topology.nbworker.mappers; import org.openkilda.messaging.payload.flow.PathNodePayload; import org.openkilda.pce.Path; diff --git a/src-java/nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/services/PathsService.java b/src-java/nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/services/PathsService.java index 2c122bb1f10..a4e4e990940 100644 --- a/src-java/nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/services/PathsService.java +++ b/src-java/nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/services/PathsService.java @@ -34,7 +34,7 @@ import org.openkilda.persistence.repositories.SwitchRepository; import org.openkilda.wfm.error.SwitchNotFoundException; import org.openkilda.wfm.error.SwitchPropertiesNotFoundException; -import org.openkilda.wfm.share.mappers.PathMapper; +import org.openkilda.wfm.topology.nbworker.mappers.PathMapper; import lombok.extern.slf4j.Slf4j; diff --git a/src-java/nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/services/SwitchOperationsService.java b/src-java/nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/services/SwitchOperationsService.java index ea36570cec3..52986c1bcf9 100644 --- a/src-java/nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/services/SwitchOperationsService.java +++ b/src-java/nbworker-topology/nbworker-storm-topology/src/main/java/org/openkilda/wfm/topology/nbworker/services/SwitchOperationsService.java @@ -56,13 +56,13 @@ import org.openkilda.persistence.repositories.SwitchPropertiesRepository; import org.openkilda.persistence.repositories.SwitchRepository; import org.openkilda.persistence.tx.TransactionManager; -import org.openkilda.wfm.error.IllegalSwitchPropertiesException; -import org.openkilda.wfm.error.IllegalSwitchStateException; import org.openkilda.wfm.error.IslNotFoundException; import org.openkilda.wfm.error.SwitchNotFoundException; import org.openkilda.wfm.error.SwitchPropertiesNotFoundException; import org.openkilda.wfm.share.mappers.SwitchMapper; import org.openkilda.wfm.share.mappers.SwitchPropertiesMapper; +import org.openkilda.wfm.topology.nbworker.exceptions.IllegalSwitchPropertiesException; +import org.openkilda.wfm.topology.nbworker.exceptions.IllegalSwitchStateException; import lombok.Value; import lombok.extern.slf4j.Slf4j; diff --git a/src-java/nbworker-topology/nbworker-storm-topology/src/test/java/org/openkilda/wfm/topology/nbworker/services/SwitchOperationsServiceTest.java b/src-java/nbworker-topology/nbworker-storm-topology/src/test/java/org/openkilda/wfm/topology/nbworker/services/SwitchOperationsServiceTest.java index 8d64b1aadd2..a91afac32c4 100644 --- a/src-java/nbworker-topology/nbworker-storm-topology/src/test/java/org/openkilda/wfm/topology/nbworker/services/SwitchOperationsServiceTest.java +++ b/src-java/nbworker-topology/nbworker-storm-topology/src/test/java/org/openkilda/wfm/topology/nbworker/services/SwitchOperationsServiceTest.java @@ -52,9 +52,9 @@ import org.openkilda.persistence.repositories.RepositoryFactory; import org.openkilda.persistence.repositories.SwitchPropertiesRepository; import org.openkilda.persistence.repositories.SwitchRepository; -import org.openkilda.wfm.error.IllegalSwitchPropertiesException; import org.openkilda.wfm.error.SwitchNotFoundException; import org.openkilda.wfm.share.model.Endpoint; +import org.openkilda.wfm.topology.nbworker.exceptions.IllegalSwitchPropertiesException; import com.google.common.collect.Lists; import org.junit.BeforeClass; diff --git a/src-java/network-topology/network-storm-topology/build.gradle b/src-java/network-topology/network-storm-topology/build.gradle index d0f6eec9935..3cee9ec7249 100644 --- a/src-java/network-topology/network-storm-topology/build.gradle +++ b/src-java/network-topology/network-storm-topology/build.gradle @@ -9,25 +9,26 @@ compileJava.ajc.options.compilerArgs += '-verbose' description = 'Network Storm Topology' dependencies { implementation project(':blue-green') - implementation project(':network-messaging') - implementation project(':swmanager-messaging') implementation project(':base-storm-topology') runtimeOnly project(path: ':base-storm-topology', configuration: 'releaseArtifacts') testImplementation project(path: ':base-storm-topology', configuration: 'testArtifacts') implementation project(':kilda-reporting') + implementation project(':kilda-history-records') + runtimeOnly project(':kilda-persistence-orientdb') + runtimeOnly project(':kilda-persistence-hibernate') + aspect project(':kilda-persistence-api') + testImplementation project(path: ':kilda-persistence-tinkerpop', configuration: 'testArtifacts') + testImplementation project(':kilda-utils:stubs') + implementation project(':rule-manager-api') + implementation project(':rule-manager-implementation') + implementation project(':network-messaging') + implementation project(':swmanager-messaging') implementation project(':nbworker-messaging') implementation project(':reroute-messaging') implementation project(':flowhs-messaging') implementation project(':ping-messaging') implementation project(':floodlight-api') implementation project(':grpc-api') - implementation project(':rule-manager-api') - implementation project(':rule-manager-implementation') - runtimeOnly project(':kilda-persistence-orientdb') - runtimeOnly project(':kilda-persistence-hibernate') - aspect project(':kilda-persistence-api') - testImplementation project(path: ':kilda-persistence-tinkerpop', configuration: 'testArtifacts') - testImplementation project(':kilda-utils:stubs') compileOnly('org.apache.storm:storm-core') testImplementation('org.apache.storm:storm-core') diff --git a/src-java/northbound-service/northbound/build.gradle b/src-java/northbound-service/northbound/build.gradle index 9be0ba0854a..de064063877 100644 --- a/src-java/northbound-service/northbound/build.gradle +++ b/src-java/northbound-service/northbound/build.gradle @@ -12,18 +12,18 @@ dependencies { implementation(platform('org.springframework:spring-framework-bom:5.2.19.RELEASE')) implementation(platform('org.springframework.boot:spring-boot-dependencies:2.2.13.RELEASE')) - implementation project(':northbound-api') - implementation project(':flowhs-messaging') - implementation project(':nbworker-messaging') - implementation project(':swmanager-messaging') - implementation project(':ping-messaging') - implementation project(':floodlight-api') - implementation project(':kilda-persistence-api') implementation project(':blue-green') + implementation project(':kilda-persistence-api') runtimeOnly project(':kilda-persistence-orientdb') runtimeOnly project(':kilda-persistence-hibernate') implementation project(':kilda-configuration') testImplementation project(':kilda-utils:stubs') + implementation project(':flowhs-messaging') + implementation project(':nbworker-messaging') + implementation project(':swmanager-messaging') + implementation project(':ping-messaging') + implementation project(':floodlight-api') + implementation project(':northbound-api') implementation('org.springframework.boot:spring-boot-starter-web') implementation('org.springframework.boot:spring-boot-starter') diff --git a/src-java/opentsdb-topology/opentsdb-storm-topology/build.gradle b/src-java/opentsdb-topology/opentsdb-storm-topology/build.gradle index ac3117244e9..1e69be195e7 100644 --- a/src-java/opentsdb-topology/opentsdb-storm-topology/build.gradle +++ b/src-java/opentsdb-topology/opentsdb-storm-topology/build.gradle @@ -8,12 +8,12 @@ compileJava.ajc.options.compilerArgs += '-verbose' description = 'OpenTSDB Storm Topology' dependencies { + implementation project(':blue-green') implementation project(':base-storm-topology') runtimeOnly project(path: ':base-storm-topology', configuration: 'releaseArtifacts') testImplementation project(path: ':base-storm-topology', configuration: 'testArtifacts') implementation project(':kilda-reporting') testImplementation project(path: ':kilda-persistence-tinkerpop', configuration: 'testArtifacts') - implementation project(':blue-green') runtimeOnly 'org.yaml:snakeyaml:1.30' runtimeOnly 'commons-logging:commons-logging:1.2' diff --git a/src-java/ping-topology/ping-messaging/build.gradle b/src-java/ping-topology/ping-messaging/build.gradle index 294a2af0478..2c1223db226 100644 --- a/src-java/ping-topology/ping-messaging/build.gradle +++ b/src-java/ping-topology/ping-messaging/build.gradle @@ -4,9 +4,8 @@ plugins { description = 'Ping Topology Messaging' dependencies { - api project(':base-messaging') implementation project(':blue-green') - + api project(':base-messaging') testImplementation project(path: ':base-messaging', configuration: 'testArtifacts') implementation 'com.fasterxml.jackson.core:jackson-core' diff --git a/src-java/ping-topology/ping-storm-topology/build.gradle b/src-java/ping-topology/ping-storm-topology/build.gradle index bad181cc754..66702c0d958 100644 --- a/src-java/ping-topology/ping-storm-topology/build.gradle +++ b/src-java/ping-topology/ping-storm-topology/build.gradle @@ -8,16 +8,17 @@ compileJava.ajc.options.compilerArgs += '-verbose' description = 'Ping Storm Topology' dependencies { - implementation project(':ping-messaging') + implementation project(':blue-green') implementation project(':base-storm-topology') runtimeOnly project(path: ':base-storm-topology', configuration: 'releaseArtifacts') testImplementation project(path: ':base-storm-topology', configuration: 'testArtifacts') implementation project(':kilda-reporting') - implementation project(':floodlight-api') - implementation project(':blue-green') + aspect project(':kilda-persistence-api') runtimeOnly project(':kilda-persistence-orientdb') runtimeOnly project(':kilda-persistence-hibernate') - aspect project(':kilda-persistence-api') + implementation project(':kilda-resource-pools') + implementation project(':ping-messaging') + implementation project(':floodlight-api') compileOnly('org.apache.storm:storm-core') testImplementation('org.apache.storm:storm-core') diff --git a/src-java/ping-topology/ping-storm-topology/src/main/java/org/openkilda/wfm/topology/ping/bolt/GroupCollector.java b/src-java/ping-topology/ping-storm-topology/src/main/java/org/openkilda/wfm/topology/ping/bolt/GroupCollector.java index 2413a3e2280..6e4349619ec 100644 --- a/src-java/ping-topology/ping-storm-topology/src/main/java/org/openkilda/wfm/topology/ping/bolt/GroupCollector.java +++ b/src-java/ping-topology/ping-storm-topology/src/main/java/org/openkilda/wfm/topology/ping/bolt/GroupCollector.java @@ -15,7 +15,7 @@ package org.openkilda.wfm.topology.ping.bolt; -import org.openkilda.wfm.error.WorkflowException; +import org.openkilda.wfm.topology.ping.exceptions.WorkflowException; import org.openkilda.wfm.topology.ping.model.CollectorDescriptor; import org.openkilda.wfm.topology.ping.model.ExpirableMap; import org.openkilda.wfm.topology.ping.model.Group; diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/WorkflowException.java b/src-java/ping-topology/ping-storm-topology/src/main/java/org/openkilda/wfm/topology/ping/exceptions/WorkflowException.java similarity index 95% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/WorkflowException.java rename to src-java/ping-topology/ping-storm-topology/src/main/java/org/openkilda/wfm/topology/ping/exceptions/WorkflowException.java index 67046ee797d..ee1b2106e94 100644 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/WorkflowException.java +++ b/src-java/ping-topology/ping-storm-topology/src/main/java/org/openkilda/wfm/topology/ping/exceptions/WorkflowException.java @@ -13,7 +13,7 @@ * limitations under the License. */ -package org.openkilda.wfm.error; +package org.openkilda.wfm.topology.ping.exceptions; import org.openkilda.wfm.AbstractBolt; diff --git a/src-java/portstate-topology/portstate-storm-topology/build.gradle b/src-java/portstate-topology/portstate-storm-topology/build.gradle index 8f726ad2000..deebe8b6ecc 100644 --- a/src-java/portstate-topology/portstate-storm-topology/build.gradle +++ b/src-java/portstate-topology/portstate-storm-topology/build.gradle @@ -8,15 +8,15 @@ compileJava.ajc.options.compilerArgs += '-verbose' description = 'Port State Storm Topology' dependencies { + implementation project(':blue-green') implementation project(':base-storm-topology') runtimeOnly project(path: ':base-storm-topology', configuration: 'releaseArtifacts') implementation project(':kilda-reporting') + runtimeOnly project(':kilda-persistence-orientdb') + runtimeOnly project(':kilda-persistence-hibernate') implementation project(':network-messaging') implementation project(':nbworker-messaging') implementation project(':floodlight-api') - implementation project(':blue-green') - runtimeOnly project(':kilda-persistence-orientdb') - runtimeOnly project(':kilda-persistence-hibernate') compileOnly('org.apache.storm:storm-core') diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/utils/AbstractKafkaParserBolt.java b/src-java/portstate-topology/portstate-storm-topology/src/main/java/org/openkilda/wfm/topology/portstate/bolt/AbstractKafkaParserBolt.java similarity index 91% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/utils/AbstractKafkaParserBolt.java rename to src-java/portstate-topology/portstate-storm-topology/src/main/java/org/openkilda/wfm/topology/portstate/bolt/AbstractKafkaParserBolt.java index 6e03e27a996..5734e714b1b 100644 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/topology/utils/AbstractKafkaParserBolt.java +++ b/src-java/portstate-topology/portstate-storm-topology/src/main/java/org/openkilda/wfm/topology/portstate/bolt/AbstractKafkaParserBolt.java @@ -13,13 +13,13 @@ * limitations under the License. */ -package org.openkilda.wfm.topology.utils; +package org.openkilda.wfm.topology.portstate.bolt; import org.openkilda.messaging.Message; import org.openkilda.messaging.info.InfoData; import org.openkilda.messaging.info.InfoMessage; import org.openkilda.wfm.AbstractBolt; -import org.openkilda.wfm.error.MessageException; +import org.openkilda.wfm.topology.portstate.exceptions.MessageException; public abstract class AbstractKafkaParserBolt extends AbstractBolt { diff --git a/src-java/portstate-topology/portstate-storm-topology/src/main/java/org/openkilda/wfm/topology/portstate/bolt/TopoDiscoParseBolt.java b/src-java/portstate-topology/portstate-storm-topology/src/main/java/org/openkilda/wfm/topology/portstate/bolt/TopoDiscoParseBolt.java index bff6f892c95..5086e33dd4c 100644 --- a/src-java/portstate-topology/portstate-storm-topology/src/main/java/org/openkilda/wfm/topology/portstate/bolt/TopoDiscoParseBolt.java +++ b/src-java/portstate-topology/portstate-storm-topology/src/main/java/org/openkilda/wfm/topology/portstate/bolt/TopoDiscoParseBolt.java @@ -18,11 +18,10 @@ import org.openkilda.messaging.Message; import org.openkilda.messaging.info.InfoData; import org.openkilda.messaging.info.event.PortInfoData; -import org.openkilda.wfm.error.MessageException; import org.openkilda.wfm.share.zk.ZkStreams; import org.openkilda.wfm.share.zk.ZooKeeperBolt; import org.openkilda.wfm.topology.portstate.PortStateTopology; -import org.openkilda.wfm.topology.utils.AbstractKafkaParserBolt; +import org.openkilda.wfm.topology.portstate.exceptions.MessageException; import org.openkilda.wfm.topology.utils.MessageKafkaTranslator; import lombok.extern.slf4j.Slf4j; diff --git a/src-java/portstate-topology/portstate-storm-topology/src/main/java/org/openkilda/wfm/topology/portstate/bolt/WfmStatsParseBolt.java b/src-java/portstate-topology/portstate-storm-topology/src/main/java/org/openkilda/wfm/topology/portstate/bolt/WfmStatsParseBolt.java index aa557052d96..3db87e07bfe 100644 --- a/src-java/portstate-topology/portstate-storm-topology/src/main/java/org/openkilda/wfm/topology/portstate/bolt/WfmStatsParseBolt.java +++ b/src-java/portstate-topology/portstate-storm-topology/src/main/java/org/openkilda/wfm/topology/portstate/bolt/WfmStatsParseBolt.java @@ -22,10 +22,9 @@ import org.openkilda.messaging.info.event.PortChangeType; import org.openkilda.messaging.info.event.PortInfoData; import org.openkilda.messaging.info.stats.SwitchPortStatusData; -import org.openkilda.wfm.error.MessageException; import org.openkilda.wfm.share.zk.ZkStreams; import org.openkilda.wfm.share.zk.ZooKeeperBolt; -import org.openkilda.wfm.topology.utils.AbstractKafkaParserBolt; +import org.openkilda.wfm.topology.portstate.exceptions.MessageException; import org.openkilda.wfm.topology.utils.MessageKafkaTranslator; import lombok.extern.slf4j.Slf4j; diff --git a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/MessageException.java b/src-java/portstate-topology/portstate-storm-topology/src/main/java/org/openkilda/wfm/topology/portstate/exceptions/MessageException.java similarity index 94% rename from src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/MessageException.java rename to src-java/portstate-topology/portstate-storm-topology/src/main/java/org/openkilda/wfm/topology/portstate/exceptions/MessageException.java index d710011435d..3ef01e5b2f0 100644 --- a/src-java/base-topology/base-storm-topology/src/main/java/org/openkilda/wfm/error/MessageException.java +++ b/src-java/portstate-topology/portstate-storm-topology/src/main/java/org/openkilda/wfm/topology/portstate/exceptions/MessageException.java @@ -13,7 +13,7 @@ * limitations under the License. */ -package org.openkilda.wfm.error; +package org.openkilda.wfm.topology.portstate.exceptions; public class MessageException extends Exception { public MessageException() { diff --git a/src-java/reroute-topology/reroute-storm-topology/build.gradle b/src-java/reroute-topology/reroute-storm-topology/build.gradle index 18c5fffd44f..1a69bf4ca10 100644 --- a/src-java/reroute-topology/reroute-storm-topology/build.gradle +++ b/src-java/reroute-topology/reroute-storm-topology/build.gradle @@ -8,16 +8,16 @@ compileJava.ajc.options.compilerArgs += '-verbose' description = 'Reroute Storm Topology' dependencies { - implementation project(':reroute-messaging') - implementation project(':flowhs-messaging') - implementation project(':base-storm-topology') implementation project(':blue-green') + implementation project(':base-storm-topology') aspect project(':base-storm-topology') runtimeOnly project(path: ':base-storm-topology', configuration: 'releaseArtifacts') testImplementation project(path: ':base-storm-topology', configuration: 'testArtifacts') implementation project(':kilda-reporting') runtimeOnly project(':kilda-persistence-orientdb') runtimeOnly project(':kilda-persistence-hibernate') + implementation project(':reroute-messaging') + implementation project(':flowhs-messaging') compileOnly('org.apache.storm:storm-core') diff --git a/src-java/rule-manager/rule-manager-api/build.gradle b/src-java/rule-manager/rule-manager-api/build.gradle index 4e4c7a8d7f9..8b3e9361311 100644 --- a/src-java/rule-manager/rule-manager-api/build.gradle +++ b/src-java/rule-manager/rule-manager-api/build.gradle @@ -4,13 +4,13 @@ plugins { description = 'Kilda Rule Manager API' dependencies { + implementation project(':base-messaging') + implementation project(':kilda-model') + implementation 'com.fasterxml.jackson.core:jackson-core' implementation 'com.fasterxml.jackson.core:jackson-annotations' implementation 'com.fasterxml.jackson.core:jackson-databind' - implementation project(':base-messaging') - implementation project(':kilda-model') - implementation 'com.google.guava:guava' implementation 'org.apache.commons:commons-lang3' diff --git a/src-java/settings.gradle b/src-java/settings.gradle index 8edc17528a1..441bc4d76cd 100644 --- a/src-java/settings.gradle +++ b/src-java/settings.gradle @@ -4,6 +4,7 @@ includeBuild('projectfloodlight/floodlight') includeBuild('projectfloodlight/openflowj') include 'base-messaging' +include 'base-messaging-mappers' include 'base-storm-topology' include 'connecteddevices-storm-topology' include 'floodlightrouter-storm-topology' @@ -19,6 +20,7 @@ include 'history-storm-topology' include 'isllatency-messaging' include 'isllatency-storm-topology' include 'kilda-configuration' +include 'kilda-history-records' include 'kilda-model' include 'kilda-pce' include 'kilda-persistence-api' @@ -26,6 +28,7 @@ include 'kilda-persistence-orientdb' include 'kilda-persistence-tinkerpop' include 'kilda-persistence-hibernate' include 'kilda-reporting' +include 'kilda-resource-pools' include 'kilda-utils:stubs' include 'nbworker-messaging' include 'nbworker-storm-topology' @@ -59,6 +62,7 @@ include 'test-library' include 'blue-green' project(':base-messaging').projectDir = "$rootDir/base-topology/base-messaging" as File +project(':base-messaging-mappers').projectDir = "$rootDir/base-topology/base-messaging-mappers" as File project(':base-storm-topology').projectDir = "$rootDir/base-topology/base-storm-topology" as File project(':connecteddevices-storm-topology').projectDir = "$rootDir/connecteddevices-topology/connecteddevices-storm-topology" as File project(':floodlightrouter-storm-topology').projectDir = "$rootDir/floodlightrouter-topology/floodlightrouter-storm-topology" as File diff --git a/src-java/stats-topology/stats-storm-topology/build.gradle b/src-java/stats-topology/stats-storm-topology/build.gradle index 08ac74df2b6..0c229a9b02f 100644 --- a/src-java/stats-topology/stats-storm-topology/build.gradle +++ b/src-java/stats-topology/stats-storm-topology/build.gradle @@ -8,18 +8,18 @@ compileJava.ajc.options.compilerArgs += '-verbose' description = 'Stats Storm Topology' dependencies { - implementation project(':stats-messaging') + implementation project(':blue-green') implementation project(':base-storm-topology') runtimeOnly project(path: ':base-storm-topology', configuration: 'releaseArtifacts') testImplementation project(path: ':base-storm-topology', configuration: 'testArtifacts') implementation project(':kilda-reporting') - implementation project(':floodlight-api') - implementation project(':grpc-api') - implementation project(':blue-green') runtimeOnly project(':kilda-persistence-orientdb') runtimeOnly project(':kilda-persistence-hibernate') aspect project(':kilda-persistence-api') testImplementation project(path: ':kilda-persistence-tinkerpop', configuration: 'testArtifacts') + implementation project(':stats-messaging') + implementation project(':floodlight-api') + implementation project(':grpc-api') compileOnly('org.apache.storm:storm-core') testImplementation('org.apache.storm:storm-core') diff --git a/src-java/swmanager-topology/swmanager-messaging/build.gradle b/src-java/swmanager-topology/swmanager-messaging/build.gradle index 9afb4155976..86b13cbad78 100644 --- a/src-java/swmanager-topology/swmanager-messaging/build.gradle +++ b/src-java/swmanager-topology/swmanager-messaging/build.gradle @@ -4,9 +4,8 @@ plugins { description = 'SW Manager Messaging' dependencies { - api project(':base-messaging') implementation project(':blue-green') - + api project(':base-messaging') testImplementation project(path: ':base-messaging', configuration: 'testArtifacts') implementation 'com.fasterxml.jackson.core:jackson-core' diff --git a/src-java/swmanager-topology/swmanager-storm-topology/build.gradle b/src-java/swmanager-topology/swmanager-storm-topology/build.gradle index 44ac57c93b1..56f8bc7bffb 100644 --- a/src-java/swmanager-topology/swmanager-storm-topology/build.gradle +++ b/src-java/swmanager-topology/swmanager-storm-topology/build.gradle @@ -8,20 +8,21 @@ compileJava.ajc.options.compilerArgs += '-verbose' description = 'Switch Manager Storm Topology' dependencies { + implementation project(':blue-green') implementation project(':base-storm-topology') - implementation project(':swmanager-messaging') - implementation project(':grpc-api') aspect project(':base-storm-topology') runtimeOnly project(path: ':base-storm-topology', configuration: 'releaseArtifacts') testImplementation project(path: ':base-storm-topology', configuration: 'testArtifacts') - implementation project(':flowhs-messaging') - implementation project(':floodlight-api') implementation project(':kilda-reporting') runtimeOnly project(':kilda-persistence-orientdb') runtimeOnly project(':kilda-persistence-hibernate') - implementation project(':blue-green') + implementation project(':kilda-resource-pools') implementation project(':rule-manager-api') implementation project(':rule-manager-implementation') + implementation project(':swmanager-messaging') + implementation project(':flowhs-messaging') + implementation project(':grpc-api') + implementation project(':floodlight-api') compileOnly('org.apache.storm:storm-core') testImplementation('org.apache.storm:storm-core')