Search in sources :

Example 16 with FlowResourcesConfig

use of org.openkilda.wfm.share.flow.resources.FlowResourcesConfig in project open-kilda by telstra.

the class FlowHsTopology method flowSwapProtectedHub.

private void flowSwapProtectedHub(TopologyBuilder topologyBuilder, PersistenceManager persistenceManager) {
    int hubTimeout = (int) TimeUnit.SECONDS.toMillis(topologyConfig.getPathSwapHubTimeoutSeconds());
    FlowPathSwapConfig config = FlowPathSwapConfig.flowPathSwapBuilder().speakerCommandRetriesLimit(topologyConfig.getPathSwapSpeakerCommandRetries()).autoAck(true).timeoutMs(hubTimeout).requestSenderComponent(ComponentId.FLOW_ROUTER_BOLT.name()).workerComponent(ComponentId.FLOW_PATH_SWAP_SPEAKER_WORKER.name()).lifeCycleEventComponent(ZooKeeperSpout.SPOUT_ID).build();
    FlowResourcesConfig flowResourcesConfig = configurationProvider.getConfiguration(FlowResourcesConfig.class);
    RuleManagerConfig ruleManagerConfig = configurationProvider.getConfiguration(RuleManagerConfig.class);
    FlowPathSwapHubBolt hubBolt = new FlowPathSwapHubBolt(config, persistenceManager, flowResourcesConfig, ruleManagerConfig);
    declareBolt(topologyBuilder, hubBolt, ComponentId.FLOW_PATH_SWAP_HUB.name()).fieldsGrouping(ComponentId.FLOW_ROUTER_BOLT.name(), ROUTER_TO_FLOW_PATH_SWAP_HUB.name(), FLOW_FIELD).directGrouping(ComponentId.FLOW_PATH_SWAP_SPEAKER_WORKER.name(), Stream.SPEAKER_WORKER_TO_HUB_PATH_SWAP.name()).allGrouping(ZooKeeperSpout.SPOUT_ID).directGrouping(CoordinatorBolt.ID);
}
Also used : FlowResourcesConfig(org.openkilda.wfm.share.flow.resources.FlowResourcesConfig) RuleManagerConfig(org.openkilda.rulemanager.RuleManagerConfig) FlowPathSwapHubBolt(org.openkilda.wfm.topology.flowhs.bolts.FlowPathSwapHubBolt) FlowPathSwapConfig(org.openkilda.wfm.topology.flowhs.bolts.FlowPathSwapHubBolt.FlowPathSwapConfig)

Example 17 with FlowResourcesConfig

use of org.openkilda.wfm.share.flow.resources.FlowResourcesConfig in project open-kilda by telstra.

the class FlowHsTopology method yFlowDeleteHub.

private void yFlowDeleteHub(TopologyBuilder topologyBuilder, PersistenceManager persistenceManager) {
    int hubTimeout = (int) TimeUnit.SECONDS.toMillis(topologyConfig.getDeleteHubTimeoutSeconds());
    YFlowDeleteConfig config = YFlowDeleteConfig.builder().speakerCommandRetriesLimit(topologyConfig.getYFlowDeleteSpeakerCommandRetriesLimit()).autoAck(true).timeoutMs(hubTimeout).requestSenderComponent(ComponentId.FLOW_ROUTER_BOLT.name()).workerComponent(ComponentId.YFLOW_DELETE_SPEAKER_WORKER.name()).lifeCycleEventComponent(ZooKeeperSpout.SPOUT_ID).build();
    FlowResourcesConfig flowResourcesConfig = configurationProvider.getConfiguration(FlowResourcesConfig.class);
    RuleManagerConfig ruleManagerConfig = configurationProvider.getConfiguration(RuleManagerConfig.class);
    YFlowDeleteHubBolt hubBolt = new YFlowDeleteHubBolt(config, persistenceManager, flowResourcesConfig, ruleManagerConfig);
    declareBolt(topologyBuilder, hubBolt, ComponentId.YFLOW_DELETE_HUB.name()).fieldsGrouping(ComponentId.FLOW_ROUTER_BOLT.name(), Stream.ROUTER_TO_YFLOW_DELETE_HUB.name(), FLOW_FIELD).directGrouping(ComponentId.YFLOW_DELETE_SPEAKER_WORKER.name(), Stream.SPEAKER_WORKER_TO_HUB_YFLOW_DELETE.name()).allGrouping(ZooKeeperSpout.SPOUT_ID).directGrouping(CoordinatorBolt.ID);
}
Also used : FlowResourcesConfig(org.openkilda.wfm.share.flow.resources.FlowResourcesConfig) RuleManagerConfig(org.openkilda.rulemanager.RuleManagerConfig) YFlowDeleteHubBolt(org.openkilda.wfm.topology.flowhs.bolts.YFlowDeleteHubBolt) YFlowDeleteConfig(org.openkilda.wfm.topology.flowhs.bolts.YFlowDeleteHubBolt.YFlowDeleteConfig)

Example 18 with FlowResourcesConfig

use of org.openkilda.wfm.share.flow.resources.FlowResourcesConfig in project open-kilda by telstra.

the class FlowHsTopology method yFlowUpdateHub.

private void yFlowUpdateHub(TopologyBuilder topologyBuilder, PersistenceManager persistenceManager) {
    int hubTimeout = (int) TimeUnit.SECONDS.toMillis(topologyConfig.getUpdateHubTimeoutSeconds());
    FlowUpdateConfig flowUpdateConfig = FlowUpdateConfig.flowUpdateBuilder().resourceAllocationRetriesLimit(topologyConfig.getResourceAllocationRetriesLimit()).pathAllocationRetriesLimit(topologyConfig.getPathAllocationRetriesLimit()).pathAllocationRetryDelay(topologyConfig.getPathAllocationRetryDelay()).speakerCommandRetriesLimit(topologyConfig.getCreateSpeakerCommandRetries()).autoAck(true).timeoutMs(hubTimeout).requestSenderComponent(ComponentId.FLOW_ROUTER_BOLT.name()).workerComponent(ComponentId.YFLOW_UPDATE_SPEAKER_WORKER.name()).lifeCycleEventComponent(ZooKeeperSpout.SPOUT_ID).build();
    YFlowUpdateConfig yflowUpdateConfig = YFlowUpdateConfig.builder().speakerCommandRetriesLimit(topologyConfig.getCreateSpeakerCommandRetries()).autoAck(true).timeoutMs(hubTimeout).requestSenderComponent(ComponentId.FLOW_ROUTER_BOLT.name()).workerComponent(ComponentId.YFLOW_UPDATE_SPEAKER_WORKER.name()).lifeCycleEventComponent(ZooKeeperSpout.SPOUT_ID).build();
    PathComputerConfig pathComputerConfig = configurationProvider.getConfiguration(PathComputerConfig.class);
    FlowResourcesConfig flowResourcesConfig = configurationProvider.getConfiguration(FlowResourcesConfig.class);
    RuleManagerConfig ruleManagerConfig = configurationProvider.getConfiguration(RuleManagerConfig.class);
    YFlowUpdateHubBolt hubBolt = new YFlowUpdateHubBolt(yflowUpdateConfig, flowUpdateConfig, persistenceManager, pathComputerConfig, flowResourcesConfig, ruleManagerConfig);
    declareBolt(topologyBuilder, hubBolt, ComponentId.YFLOW_UPDATE_HUB.name()).fieldsGrouping(ComponentId.FLOW_ROUTER_BOLT.name(), ROUTER_TO_YFLOW_UPDATE_HUB.name(), FLOW_FIELD).directGrouping(ComponentId.YFLOW_UPDATE_SPEAKER_WORKER.name(), Stream.SPEAKER_WORKER_TO_HUB_YFLOW_UPDATE.name()).allGrouping(ZooKeeperSpout.SPOUT_ID).directGrouping(CoordinatorBolt.ID);
}
Also used : FlowResourcesConfig(org.openkilda.wfm.share.flow.resources.FlowResourcesConfig) YFlowUpdateHubBolt(org.openkilda.wfm.topology.flowhs.bolts.YFlowUpdateHubBolt) PathComputerConfig(org.openkilda.pce.PathComputerConfig) RuleManagerConfig(org.openkilda.rulemanager.RuleManagerConfig) YFlowUpdateConfig(org.openkilda.wfm.topology.flowhs.bolts.YFlowUpdateHubBolt.YFlowUpdateConfig) FlowUpdateConfig(org.openkilda.wfm.topology.flowhs.bolts.FlowUpdateHubBolt.FlowUpdateConfig) YFlowUpdateConfig(org.openkilda.wfm.topology.flowhs.bolts.YFlowUpdateHubBolt.YFlowUpdateConfig)

Aggregations

FlowResourcesConfig (org.openkilda.wfm.share.flow.resources.FlowResourcesConfig)18 PathComputerConfig (org.openkilda.pce.PathComputerConfig)7 RuleManagerConfig (org.openkilda.rulemanager.RuleManagerConfig)6 YFlowCreateHubBolt (org.openkilda.wfm.topology.flowhs.bolts.YFlowCreateHubBolt)4 YFlowDeleteHubBolt (org.openkilda.wfm.topology.flowhs.bolts.YFlowDeleteHubBolt)4 YFlowRerouteHubBolt (org.openkilda.wfm.topology.flowhs.bolts.YFlowRerouteHubBolt)4 Before (org.junit.Before)3 FlowCreateHubBolt (org.openkilda.wfm.topology.flowhs.bolts.FlowCreateHubBolt)3 FlowDeleteHubBolt (org.openkilda.wfm.topology.flowhs.bolts.FlowDeleteHubBolt)3 FlowMirrorPointCreateHubBolt (org.openkilda.wfm.topology.flowhs.bolts.FlowMirrorPointCreateHubBolt)3 FlowMirrorPointDeleteHubBolt (org.openkilda.wfm.topology.flowhs.bolts.FlowMirrorPointDeleteHubBolt)3 FlowPathSwapHubBolt (org.openkilda.wfm.topology.flowhs.bolts.FlowPathSwapHubBolt)3 FlowRerouteHubBolt (org.openkilda.wfm.topology.flowhs.bolts.FlowRerouteHubBolt)3 FlowUpdateHubBolt (org.openkilda.wfm.topology.flowhs.bolts.FlowUpdateHubBolt)3 YFlowUpdateHubBolt (org.openkilda.wfm.topology.flowhs.bolts.YFlowUpdateHubBolt)3 Properties (java.util.Properties)2 PropertiesBasedConfigurationProvider (org.openkilda.config.provider.PropertiesBasedConfigurationProvider)2 IslDirectionalReference (org.openkilda.persistence.dummy.IslDirectionalReference)2 PersistenceDummyEntityFactory (org.openkilda.persistence.dummy.PersistenceDummyEntityFactory)2 FlowResourcesManager (org.openkilda.wfm.share.flow.resources.FlowResourcesManager)2