Search in sources :

Example 1 with KildaEntryDescriptor

use of org.openkilda.wfm.topology.stats.model.KildaEntryDescriptor in project open-kilda by telstra.

the class KildaEntryCacheServiceTest method assertMeterCache.

private void assertMeterCache(List<MeterStatsAndDescriptor> statsEntries, long meterId, KildaEntryDescriptor expectedDescriptor) {
    for (MeterStatsAndDescriptor entry : statsEntries) {
        if (meterId == entry.getData().getMeterId()) {
            KildaEntryDescriptor descriptor = entry.getDescriptor();
            Assert.assertEquals(expectedDescriptor, descriptor);
            return;
        }
    }
    Assert.fail("Cache miss");
}
Also used : MeterStatsAndDescriptor(org.openkilda.wfm.topology.stats.model.MeterStatsAndDescriptor) KildaEntryDescriptor(org.openkilda.wfm.topology.stats.model.KildaEntryDescriptor)

Example 2 with KildaEntryDescriptor

use of org.openkilda.wfm.topology.stats.model.KildaEntryDescriptor in project open-kilda by telstra.

the class KildaEntryCacheServiceTest method assertCookieCache.

private void assertCookieCache(List<FlowStatsAndDescriptor> statsEntries, FlowSegmentCookie cookie, KildaEntryDescriptor expectedDescriptor) {
    long needle = cookie.getValue();
    for (FlowStatsAndDescriptor entry : statsEntries) {
        if (needle == entry.getData().getCookie()) {
            KildaEntryDescriptor descriptor = entry.getDescriptor();
            Assert.assertEquals(expectedDescriptor, descriptor);
            return;
        }
    }
    Assert.fail("Cache miss");
}
Also used : FlowStatsAndDescriptor(org.openkilda.wfm.topology.stats.model.FlowStatsAndDescriptor) KildaEntryDescriptor(org.openkilda.wfm.topology.stats.model.KildaEntryDescriptor)

Aggregations

KildaEntryDescriptor (org.openkilda.wfm.topology.stats.model.KildaEntryDescriptor)2 FlowStatsAndDescriptor (org.openkilda.wfm.topology.stats.model.FlowStatsAndDescriptor)1 MeterStatsAndDescriptor (org.openkilda.wfm.topology.stats.model.MeterStatsAndDescriptor)1