use of org.openkilda.model.Vxlan in project open-kilda by telstra.
the class FlowValidationTestBase method buildVxlanFlow.
protected void buildVxlanFlow() {
buildFlow(FlowEncapsulationType.VXLAN, "");
Vxlan vxlan = Vxlan.builder().flowId(TEST_FLOW_ID_A).pathId(FLOW_A_FORWARD_PATH_ID).vni(FLOW_A_ENCAP_ID).build();
vxlanRepository.add(vxlan);
Vxlan vxlanProtected = Vxlan.builder().flowId(TEST_FLOW_ID_A).pathId(FLOW_A_FORWARD_PATH_ID_PROTECTED).vni(FLOW_A_ENCAP_ID_PROTECTED).build();
vxlanRepository.add(vxlanProtected);
}
use of org.openkilda.model.Vxlan in project open-kilda by telstra.
the class FermaVxlanRepositoryTest method shouldCreateVxlan.
@Test
public void shouldCreateVxlan() {
Vxlan vxlan = createVxlan();
Collection<Vxlan> allVxlans = vxlanRepository.findAll();
Vxlan foundVxlan = allVxlans.iterator().next();
assertEquals(vxlan.getVni(), foundVxlan.getVni());
assertEquals(TEST_FLOW_ID, foundVxlan.getFlowId());
}
use of org.openkilda.model.Vxlan in project open-kilda by telstra.
the class FermaVxlanRepositoryTest method shouldDeleteFoundVxlan.
@Test
public void shouldDeleteFoundVxlan() {
createVxlan();
transactionManager.doInTransaction(() -> {
Collection<Vxlan> allVxlans = vxlanRepository.findAll();
Vxlan foundVxlan = allVxlans.iterator().next();
vxlanRepository.remove(foundVxlan);
});
assertEquals(0, vxlanRepository.findAll().size());
}
use of org.openkilda.model.Vxlan in project open-kilda by telstra.
the class FermaVxlanRepositoryTest method shouldDeleteVxlan.
@Test
public void shouldDeleteVxlan() {
Vxlan vxlan = createVxlan();
transactionManager.doInTransaction(() -> vxlanRepository.remove(vxlan));
assertEquals(0, vxlanRepository.findAll().size());
}
Aggregations