Search in sources :

Example 6 with Vxlan

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);
}
Also used : Vxlan(org.openkilda.model.Vxlan)

Example 7 with Vxlan

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());
}
Also used : Vxlan(org.openkilda.model.Vxlan) InMemoryGraphBasedTest(org.openkilda.persistence.inmemory.InMemoryGraphBasedTest) Test(org.junit.Test)

Example 8 with Vxlan

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());
}
Also used : Vxlan(org.openkilda.model.Vxlan) InMemoryGraphBasedTest(org.openkilda.persistence.inmemory.InMemoryGraphBasedTest) Test(org.junit.Test)

Example 9 with Vxlan

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());
}
Also used : Vxlan(org.openkilda.model.Vxlan) InMemoryGraphBasedTest(org.openkilda.persistence.inmemory.InMemoryGraphBasedTest) Test(org.junit.Test)

Aggregations

Vxlan (org.openkilda.model.Vxlan)9 Test (org.junit.Test)4 PathId (org.openkilda.model.PathId)3 InMemoryGraphBasedTest (org.openkilda.persistence.inmemory.InMemoryGraphBasedTest)3 FlowTransitEncapsulation (org.openkilda.model.FlowTransitEncapsulation)1