Search in sources :

Example 6 with RuleManagerConfig

use of org.openkilda.rulemanager.RuleManagerConfig in project open-kilda by telstra.

the class Server42IslRttInputRuleGeneratorTest method setup.

@Before
public void setup() {
    RuleManagerConfig config = mock(RuleManagerConfig.class);
    when(config.getServer42IslRttMagicMacAddress()).thenReturn(MAC_ADDRESS.toString());
    when(config.getServer42IslRttUdpPortOffset()).thenReturn(OFFSET);
    generator = Server42IslRttInputRuleGenerator.builder().server42Port(Utils.SERVER_42_PORT).islPort(ISL_PORT).config(config).build();
}
Also used : RuleManagerConfig(org.openkilda.rulemanager.RuleManagerConfig) Before(org.junit.Before)

Example 7 with RuleManagerConfig

use of org.openkilda.rulemanager.RuleManagerConfig in project open-kilda by telstra.

the class Server42IslRttOutputRuleGeneratorTest method setup.

@Before
public void setup() {
    RuleManagerConfig config = mock(RuleManagerConfig.class);
    when(config.getServer42IslRttMagicMacAddress()).thenReturn(MAC_ADDRESS.toString());
    generator = Server42IslRttOutputRuleGenerator.builder().server42Port(Utils.SERVER_42_PORT).server42Vlan(Utils.SERVER_42_VLAN).server42MacAddress(Utils.SERVER_42_MAC_ADDRESS).config(config).build();
}
Also used : RuleManagerConfig(org.openkilda.rulemanager.RuleManagerConfig) Before(org.junit.Before)

Example 8 with RuleManagerConfig

use of org.openkilda.rulemanager.RuleManagerConfig in project open-kilda by telstra.

the class FlowHsTopology method yFlowRerouteHub.

private void yFlowRerouteHub(TopologyBuilder topologyBuilder, PersistenceManager persistenceManager) {
    int hubTimeout = (int) TimeUnit.SECONDS.toMillis(topologyConfig.getRerouteHubTimeoutSeconds());
    FlowRerouteConfig flowRerouteConfig = FlowRerouteConfig.flowRerouteBuilder().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_REROUTE_SPEAKER_WORKER.name()).lifeCycleEventComponent(ZooKeeperSpout.SPOUT_ID).build();
    YFlowRerouteConfig yFlowRerouteConfig = YFlowRerouteConfig.builder().speakerCommandRetriesLimit(topologyConfig.getCreateSpeakerCommandRetries()).autoAck(true).timeoutMs(hubTimeout).requestSenderComponent(ComponentId.FLOW_ROUTER_BOLT.name()).workerComponent(ComponentId.YFLOW_REROUTE_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);
    YFlowRerouteHubBolt hubBolt = new YFlowRerouteHubBolt(yFlowRerouteConfig, flowRerouteConfig, persistenceManager, pathComputerConfig, flowResourcesConfig, ruleManagerConfig);
    declareBolt(topologyBuilder, hubBolt, ComponentId.YFLOW_REROUTE_HUB.name()).fieldsGrouping(ComponentId.FLOW_ROUTER_BOLT.name(), ROUTER_TO_YFLOW_REROUTE_HUB.name(), FLOW_FIELD).directGrouping(ComponentId.YFLOW_REROUTE_SPEAKER_WORKER.name(), SPEAKER_WORKER_TO_HUB_YFLOW_REROUTE.name()).allGrouping(ZooKeeperSpout.SPOUT_ID).directGrouping(CoordinatorBolt.ID);
}
Also used : FlowResourcesConfig(org.openkilda.wfm.share.flow.resources.FlowResourcesConfig) PathComputerConfig(org.openkilda.pce.PathComputerConfig) RuleManagerConfig(org.openkilda.rulemanager.RuleManagerConfig) YFlowRerouteConfig(org.openkilda.wfm.topology.flowhs.bolts.YFlowRerouteHubBolt.YFlowRerouteConfig) FlowRerouteConfig(org.openkilda.wfm.topology.flowhs.bolts.FlowRerouteHubBolt.FlowRerouteConfig) YFlowRerouteHubBolt(org.openkilda.wfm.topology.flowhs.bolts.YFlowRerouteHubBolt) YFlowRerouteConfig(org.openkilda.wfm.topology.flowhs.bolts.YFlowRerouteHubBolt.YFlowRerouteConfig)

Example 9 with RuleManagerConfig

use of org.openkilda.rulemanager.RuleManagerConfig 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 10 with RuleManagerConfig

use of org.openkilda.rulemanager.RuleManagerConfig 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)

Aggregations

RuleManagerConfig (org.openkilda.rulemanager.RuleManagerConfig)12 FlowResourcesConfig (org.openkilda.wfm.share.flow.resources.FlowResourcesConfig)6 Before (org.junit.Before)5 PathComputerConfig (org.openkilda.pce.PathComputerConfig)3 RuleManagerImpl (org.openkilda.rulemanager.RuleManagerImpl)2 SpeakerRequest (org.openkilda.floodlight.api.request.SpeakerRequest)1 IslDirectionalReference (org.openkilda.persistence.dummy.IslDirectionalReference)1 PersistenceDummyEntityFactory (org.openkilda.persistence.dummy.PersistenceDummyEntityFactory)1 FlowResourcesManager (org.openkilda.wfm.share.flow.resources.FlowResourcesManager)1 FlowCreateConfig (org.openkilda.wfm.topology.flowhs.bolts.FlowCreateHubBolt.FlowCreateConfig)1 FlowPathSwapHubBolt (org.openkilda.wfm.topology.flowhs.bolts.FlowPathSwapHubBolt)1 FlowPathSwapConfig (org.openkilda.wfm.topology.flowhs.bolts.FlowPathSwapHubBolt.FlowPathSwapConfig)1 FlowRerouteConfig (org.openkilda.wfm.topology.flowhs.bolts.FlowRerouteHubBolt.FlowRerouteConfig)1 FlowUpdateConfig (org.openkilda.wfm.topology.flowhs.bolts.FlowUpdateHubBolt.FlowUpdateConfig)1 YFlowCreateHubBolt (org.openkilda.wfm.topology.flowhs.bolts.YFlowCreateHubBolt)1 YFlowCreateConfig (org.openkilda.wfm.topology.flowhs.bolts.YFlowCreateHubBolt.YFlowCreateConfig)1 YFlowDeleteHubBolt (org.openkilda.wfm.topology.flowhs.bolts.YFlowDeleteHubBolt)1 YFlowDeleteConfig (org.openkilda.wfm.topology.flowhs.bolts.YFlowDeleteHubBolt.YFlowDeleteConfig)1 YFlowRerouteHubBolt (org.openkilda.wfm.topology.flowhs.bolts.YFlowRerouteHubBolt)1 YFlowRerouteConfig (org.openkilda.wfm.topology.flowhs.bolts.YFlowRerouteHubBolt.YFlowRerouteConfig)1