Search in sources :

Example 1 with OFTableStatsEntry

use of org.projectfloodlight.openflow.protocol.OFTableStatsEntry in project open-kilda by telstra.

the class OfTableStatsMapperTest method shouldConvertSuccessfully.

@Test
public void shouldConvertSuccessfully() {
    OFFactoryVer13 ofFactoryVer13 = new OFFactoryVer13();
    OFTableStatsEntry entry = ofFactoryVer13.buildTableStatsEntry().setTableId(TableId.of(11)).setActiveCount(10).setMatchedCount(U64.of(100001L)).setLookupCount(U64.of(100002L)).build();
    TableStatsEntry result = OfTableStatsMapper.INSTANCE.toTableStatsEntry(entry);
    assertEquals(result.getTableId(), entry.getTableId().getValue());
    assertEquals(result.getActiveEntries(), entry.getActiveCount());
    assertEquals(result.getLookupCount(), entry.getLookupCount().getValue());
    assertEquals(result.getMatchedCount(), entry.getMatchedCount().getValue());
}
Also used : TableStatsEntry(org.openkilda.messaging.info.stats.TableStatsEntry) OFTableStatsEntry(org.projectfloodlight.openflow.protocol.OFTableStatsEntry) OFFactoryVer13(org.projectfloodlight.openflow.protocol.ver13.OFFactoryVer13) OFTableStatsEntry(org.projectfloodlight.openflow.protocol.OFTableStatsEntry) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 TableStatsEntry (org.openkilda.messaging.info.stats.TableStatsEntry)1 OFTableStatsEntry (org.projectfloodlight.openflow.protocol.OFTableStatsEntry)1 OFFactoryVer13 (org.projectfloodlight.openflow.protocol.ver13.OFFactoryVer13)1