use of org.openkilda.model.YSubFlow in project open-kilda by telstra.
the class FermaYFlowRepositoryTest method createYFlow.
private YFlow createYFlow(String yFlowId, String flowId1, String flowId2) {
YFlow yFlow = YFlow.builder().yFlowId(yFlowId).encapsulationType(FlowEncapsulationType.TRANSIT_VLAN).sharedEndpoint(new SharedEndpoint(SWITCH_ID_1, PORT_1)).build();
Flow flow1 = createTestFlow(flowId1, switch1, PORT_1, VLAN_1, switch2, PORT_3, VLAN_3);
Flow flow2 = createTestFlow(flowId2, switch1, PORT_1, VLAN_2, switch3, PORT_4, VLAN_3);
YSubFlow subFlow1 = YSubFlow.builder().yFlow(yFlow).flow(flow1).endpointSwitchId(SWITCH_ID_2).endpointPort(PORT_3).endpointVlan(VLAN_3).sharedEndpointVlan(VLAN_1).build();
YSubFlow subFlow2 = YSubFlow.builder().yFlow(yFlow).flow(flow2).endpointSwitchId(SWITCH_ID_3).endpointPort(PORT_4).endpointVlan(VLAN_3).sharedEndpointVlan(VLAN_2).build();
yFlow.addSubFlow(subFlow1);
yFlow.addSubFlow(subFlow2);
yFlowRepository.add(yFlow);
return yFlow;
}
Aggregations