Search in sources :

Example 1 with ClassifierEntry

use of org.opendaylight.netvirt.sfc.classifier.service.domain.ClassifierEntry in project netvirt by opendaylight.

the class ClassifierUpdateTest method update.

@Test
public void update() throws Exception {
    ClassifierEntry configOnly = ClassifierEntry.buildIngressEntry(new InterfaceKey("configOnly"));
    ClassifierEntry operOnly = ClassifierEntry.buildIngressEntry(new InterfaceKey("operOnly"));
    ClassifierEntry configAndOper = ClassifierEntry.buildIngressEntry(new InterfaceKey("configAndOper"));
    when(configurationState.getAllEntries()).thenReturn(Sets.newSet(configOnly, configAndOper));
    when(operationalState.getAllEntries()).thenReturn(Sets.newSet(configAndOper, operOnly));
    classifierUpdate.run();
    verify(rendererA).renderIngress(new InterfaceKey("configOnly"));
    verify(rendererB).renderIngress(new InterfaceKey("configOnly"));
    verify(rendererA).suppressIngress(new InterfaceKey("operOnly"));
    verify(rendererB).suppressIngress(new InterfaceKey("operOnly"));
    verifyNoMoreInteractions(rendererA);
    verifyNoMoreInteractions(rendererB);
}
Also used : ClassifierEntry(org.opendaylight.netvirt.sfc.classifier.service.domain.ClassifierEntry) InterfaceKey(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceKey) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 ClassifierEntry (org.opendaylight.netvirt.sfc.classifier.service.domain.ClassifierEntry)1 InterfaceKey (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceKey)1