use of org.openkilda.wfm.share.flow.resources.FlowResourcesConfig in project open-kilda by telstra.
the class FlowHsTopology method flowCreateMirrorPointHub.
private void flowCreateMirrorPointHub(TopologyBuilder topologyBuilder, PersistenceManager persistenceManager) {
int hubTimeout = (int) TimeUnit.SECONDS.toMillis(topologyConfig.getCreateMirrorPointHubTimeoutSeconds());
FlowMirrorPointCreateConfig config = FlowMirrorPointCreateConfig.flowMirrorPointCreateBuilder().pathAllocationRetriesLimit(topologyConfig.getPathAllocationRetriesLimit()).pathAllocationRetryDelay(topologyConfig.getPathAllocationRetryDelay()).speakerCommandRetriesLimit(topologyConfig.getCreateMirrorPointSpeakerCommandRetries()).resourceAllocationRetriesLimit(topologyConfig.getResourceAllocationRetriesLimit()).autoAck(true).timeoutMs(hubTimeout).requestSenderComponent(ComponentId.FLOW_ROUTER_BOLT.name()).workerComponent(ComponentId.FLOW_CREATE_MIRROR_POINT_WORKER.name()).lifeCycleEventComponent(ZooKeeperSpout.SPOUT_ID).build();
PathComputerConfig pathComputerConfig = configurationProvider.getConfiguration(PathComputerConfig.class);
FlowResourcesConfig flowResourcesConfig = configurationProvider.getConfiguration(FlowResourcesConfig.class);
FlowMirrorPointCreateHubBolt hubBolt = new FlowMirrorPointCreateHubBolt(config, persistenceManager, pathComputerConfig, flowResourcesConfig);
declareBolt(topologyBuilder, hubBolt, ComponentId.FLOW_CREATE_MIRROR_POINT_HUB.name()).fieldsGrouping(ComponentId.FLOW_ROUTER_BOLT.name(), ROUTER_TO_FLOW_CREATE_MIRROR_POINT_HUB.name(), FLOW_FIELD).directGrouping(ComponentId.FLOW_CREATE_MIRROR_POINT_WORKER.name(), Stream.SPEAKER_WORKER_TO_HUB_CREATE_MIRROR_POINT.name()).allGrouping(ZooKeeperSpout.SPOUT_ID).directGrouping(CoordinatorBolt.ID);
}
use of org.openkilda.wfm.share.flow.resources.FlowResourcesConfig in project open-kilda by telstra.
the class FlowHsTopology method flowDeleteMirrorPointHub.
private void flowDeleteMirrorPointHub(TopologyBuilder topologyBuilder, PersistenceManager persistenceManager) {
int hubTimeout = (int) TimeUnit.SECONDS.toMillis(topologyConfig.getDeleteMirrorPointHubTimeoutSeconds());
FlowMirrorPointDeleteConfig config = FlowMirrorPointDeleteConfig.flowMirrorPointDeleteBuilder().speakerCommandRetriesLimit(topologyConfig.getDeleteMirrorPointSpeakerCommandRetries()).autoAck(true).timeoutMs(hubTimeout).requestSenderComponent(ComponentId.FLOW_ROUTER_BOLT.name()).workerComponent(ComponentId.FLOW_DELETE_MIRROR_POINT_WORKER.name()).lifeCycleEventComponent(ZooKeeperSpout.SPOUT_ID).build();
FlowResourcesConfig flowResourcesConfig = configurationProvider.getConfiguration(FlowResourcesConfig.class);
FlowMirrorPointDeleteHubBolt hubBolt = new FlowMirrorPointDeleteHubBolt(config, persistenceManager, flowResourcesConfig);
declareBolt(topologyBuilder, hubBolt, ComponentId.FLOW_DELETE_MIRROR_POINT_HUB.name()).fieldsGrouping(ComponentId.FLOW_ROUTER_BOLT.name(), ROUTER_TO_FLOW_DELETE_MIRROR_POINT_HUB.name(), FLOW_FIELD).directGrouping(ComponentId.FLOW_DELETE_MIRROR_POINT_WORKER.name(), Stream.SPEAKER_WORKER_TO_HUB_DELETE_MIRROR_POINT.name()).allGrouping(ZooKeeperSpout.SPOUT_ID).directGrouping(CoordinatorBolt.ID);
}
use of org.openkilda.wfm.share.flow.resources.FlowResourcesConfig in project open-kilda by telstra.
the class AbstractYFlowTest method before.
@Before
public void before() {
dummyFactory = new PersistenceDummyEntityFactory(persistenceManager);
FlowResourcesConfig resourceConfig = configurationProvider.getConfiguration(FlowResourcesConfig.class);
flowResourcesManager = spy(new FlowResourcesManager(persistenceManager, resourceConfig));
RuleManagerConfig ruleManagerConfig = configurationProvider.getConfiguration(RuleManagerConfig.class);
ruleManager = spy(new RuleManagerImpl(ruleManagerConfig));
alterFeatureToggles(true, true, true, true);
dummyFactory.makeSwitch(SWITCH_SHARED);
dummyFactory.makeSwitch(SWITCH_FIRST_EP);
dummyFactory.makeSwitch(SWITCH_SECOND_EP);
dummyFactory.makeSwitch(SWITCH_TRANSIT);
dummyFactory.makeSwitch(SWITCH_NEW_TRANSIT);
dummyFactory.makeSwitch(SWITCH_ALT_TRANSIT);
dummyFactory.makeSwitch(SWITCH_NEW_FIRST_EP);
dummyFactory.makeSwitch(SWITCH_NEW_SECOND_EP);
for (IslDirectionalReference reference : new IslDirectionalReference[] { islSharedToFirst, islSharedToSecond, islSharedToTransit, islTransitToFirst, islTransitToSecond, islSharedToAltTransit, islAltTransitToFirst, islAltTransitToSecond, islTransitToNewFirst, islTransitToNewSecond, islSharedToNewAltTransit, islNewAltTransitToFirst, islNewAltTransitToSecond, islSharedToNewTransit, islNewTransitToFirst, islNewTransitToSecond }) {
dummyFactory.makeIsl(reference.getSourceEndpoint(), reference.getDestEndpoint());
dummyFactory.makeIsl(reference.getDestEndpoint(), reference.getSourceEndpoint());
}
}
use of org.openkilda.wfm.share.flow.resources.FlowResourcesConfig in project open-kilda by telstra.
the class PingTopology method flowFetcher.
private void flowFetcher(TopologyBuilder topology) {
PersistenceManager persistenceManager = new PersistenceManager(configurationProvider);
FlowResourcesConfig flowResourcesConfig = configurationProvider.getConfiguration(FlowResourcesConfig.class);
FlowFetcher bolt = new FlowFetcher(persistenceManager, flowResourcesConfig, topologyConfig.getPeriodicPingCacheExpirationInterval());
declareBolt(topology, bolt, FlowFetcher.BOLT_ID).globalGrouping(TickDeduplicator.BOLT_ID, TickDeduplicator.STREAM_PING_ID).shuffleGrouping(InputRouter.BOLT_ID, InputRouter.STREAM_ON_DEMAND_REQUEST_ID).shuffleGrouping(InputRouter.BOLT_ID, InputRouter.STREAM_ON_DEMAND_Y_FLOW_REQUEST_ID).allGrouping(InputRouter.BOLT_ID, InputRouter.STREAM_PERIODIC_PING_UPDATE_REQUEST_ID);
}
use of org.openkilda.wfm.share.flow.resources.FlowResourcesConfig in project open-kilda by telstra.
the class CommandBuilderImplTest method setUpOnce.
@BeforeClass
public static void setUpOnce() {
Properties configProps = new Properties();
configProps.setProperty("flow.meter-id.max", "40");
configProps.setProperty("flow.vlan.max", "50");
PropertiesBasedConfigurationProvider configurationProvider = new PropertiesBasedConfigurationProvider(configProps);
FlowResourcesConfig flowResourcesConfig = configurationProvider.getConfiguration(FlowResourcesConfig.class);
commandBuilder = new CommandBuilderImpl(persistenceManager().build(), flowResourcesConfig);
}
Aggregations