target stringlengths 20 113k | src_fm stringlengths 11 86.3k | src_fm_fc stringlengths 21 86.4k | src_fm_fc_co stringlengths 30 86.4k | src_fm_fc_ms stringlengths 42 86.8k | src_fm_fc_ms_ff stringlengths 43 86.8k |
|---|---|---|---|---|---|
@Test public void testIsoTimeSecZ() { Map<String, String> map = new HashMap<>(); map.put(DwcTerm.eventDate.qualifiedName(), "2009-02-20T08:40:01Z"); ExtendedRecord er = ExtendedRecord.newBuilder().setId("1").setCoreTerms(map).build(); TemporalRecord tr = TemporalRecord.newBuilder().setId("1").build(); TemporalInterpret... | public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String normalizedEventDate = Optional.ofNullable(preproc... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... |
@Test public void testIsoTimeMillisecZero() { Map<String, String> map = new HashMap<>(); map.put(DwcTerm.eventDate.qualifiedName(), "2002-03-10T00:00:00.0"); ExtendedRecord er = ExtendedRecord.newBuilder().setId("1").setCoreTerms(map).build(); TemporalRecord tr = TemporalRecord.newBuilder().setId("1").build(); Temporal... | public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String normalizedEventDate = Optional.ofNullable(preproc... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... |
@Test public void testIsoTimeZone() { Map<String, String> map = new HashMap<>(); map.put(DwcTerm.eventDate.qualifiedName(), "2018-09-19T08:50+1000"); ExtendedRecord er = ExtendedRecord.newBuilder().setId("1").setCoreTerms(map).build(); TemporalRecord tr = TemporalRecord.newBuilder().setId("1").build(); TemporalInterpre... | public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String normalizedEventDate = Optional.ofNullable(preproc... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... |
@Test public void testIsoTimeZoneMillisec() { Map<String, String> map = new HashMap<>(); map.put(DwcTerm.eventDate.qualifiedName(), "2013-11-06T19:59:14.961+1000"); ExtendedRecord er = ExtendedRecord.newBuilder().setId("1").setCoreTerms(map).build(); TemporalRecord tr = TemporalRecord.newBuilder().setId("1").build(); T... | public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String normalizedEventDate = Optional.ofNullable(preproc... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... |
@Test public void testIsoTimeMillisec() { Map<String, String> map = new HashMap<>(); map.put(DwcTerm.eventDate.qualifiedName(), "2013-11-06T19:59:14.961"); ExtendedRecord er = ExtendedRecord.newBuilder().setId("1").setCoreTerms(map).build(); TemporalRecord tr = TemporalRecord.newBuilder().setId("1").build(); TemporalIn... | public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String normalizedEventDate = Optional.ofNullable(preproc... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... |
@Test(expected = IllegalArgumentException.class) public void countIndexDocumentsEmptyIndexTest() { EsIndex.countDocuments(EsConfig.from(DUMMY_HOST), ""); thrown.expectMessage("index is required"); } | public static long countDocuments(EsConfig config, String index) { Preconditions.checkArgument(!Strings.isNullOrEmpty(index), "index is required"); log.info("Counting documents from index {}", index); try (EsClient esClient = EsClient.from(config)) { return EsService.countIndexDocuments(esClient, index); } } | EsIndex { public static long countDocuments(EsConfig config, String index) { Preconditions.checkArgument(!Strings.isNullOrEmpty(index), "index is required"); log.info("Counting documents from index {}", index); try (EsClient esClient = EsClient.from(config)) { return EsService.countIndexDocuments(esClient, index); } } ... | EsIndex { public static long countDocuments(EsConfig config, String index) { Preconditions.checkArgument(!Strings.isNullOrEmpty(index), "index is required"); log.info("Counting documents from index {}", index); try (EsClient esClient = EsClient.from(config)) { return EsService.countIndexDocuments(esClient, index); } } ... | EsIndex { public static long countDocuments(EsConfig config, String index) { Preconditions.checkArgument(!Strings.isNullOrEmpty(index), "index is required"); log.info("Counting documents from index {}", index); try (EsClient esClient = EsClient.from(config)) { return EsService.countIndexDocuments(esClient, index); } } ... | EsIndex { public static long countDocuments(EsConfig config, String index) { Preconditions.checkArgument(!Strings.isNullOrEmpty(index), "index is required"); log.info("Counting documents from index {}", index); try (EsClient esClient = EsClient.from(config)) { return EsService.countIndexDocuments(esClient, index); } } ... |
@Test public void testIsoTimeZoneMinute() { Map<String, String> map = new HashMap<>(); map.put(DwcTerm.eventDate.qualifiedName(), "2001-03-14T00:00:00-11:00"); ExtendedRecord er = ExtendedRecord.newBuilder().setId("1").setCoreTerms(map).build(); TemporalRecord tr = TemporalRecord.newBuilder().setId("1").build(); Tempor... | public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String normalizedEventDate = Optional.ofNullable(preproc... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... |
@Test public void testIsoTimeMinuteZone() { Map<String, String> map = new HashMap<>(); map.put(DwcTerm.eventDate.qualifiedName(), "2001-03-14T00:00:00+11"); ExtendedRecord er = ExtendedRecord.newBuilder().setId("1").setCoreTerms(map).build(); TemporalRecord tr = TemporalRecord.newBuilder().setId("1").build(); TemporalI... | public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String normalizedEventDate = Optional.ofNullable(preproc... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... |
@Test public void testIsoTextMonth() { Map<String, String> map = new HashMap<>(); map.put(DwcTerm.eventDate.qualifiedName(), "1978-December-01"); ExtendedRecord er = ExtendedRecord.newBuilder().setId("1").setCoreTerms(map).build(); TemporalRecord tr = TemporalRecord.newBuilder().setId("1").build(); TemporalInterpreter ... | public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String normalizedEventDate = Optional.ofNullable(preproc... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... |
@Test public void testIsoRangeYmd() { Map<String, String> map = new HashMap<>(); map.put(DwcTerm.eventDate.qualifiedName(), "2004-11-01/2005-02-01"); ExtendedRecord er = ExtendedRecord.newBuilder().setId("1").setCoreTerms(map).build(); TemporalRecord tr = TemporalRecord.newBuilder().setId("1").build(); TemporalInterpre... | public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String normalizedEventDate = Optional.ofNullable(preproc... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... |
@Test public void testDmy() { Map<String, String> map = new HashMap<>(); map.put(DwcTerm.eventDate.qualifiedName(), "05-02-1978"); ExtendedRecord er = ExtendedRecord.newBuilder().setId("1").setCoreTerms(map).build(); TemporalRecord tr = TemporalRecord.newBuilder().setId("1").build(); TemporalInterpreter interpreter = T... | public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String normalizedEventDate = Optional.ofNullable(preproc... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... |
@Test public void testIsoRangeMonthDay() { Map<String, String> map = new HashMap<>(); map.put(DwcTerm.eventDate.qualifiedName(), "1998-9-30/10-7"); ExtendedRecord er = ExtendedRecord.newBuilder().setId("1").setCoreTerms(map).build(); TemporalRecord tr = TemporalRecord.newBuilder().setId("1").build(); TemporalInterprete... | public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String normalizedEventDate = Optional.ofNullable(preproc... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... |
@Test public void testIsoRangeShortDateWithoutZero() { Map<String, String> map = new HashMap<>(); map.put(DwcTerm.eventDate.qualifiedName(), "1998-9-7/30"); ExtendedRecord er = ExtendedRecord.newBuilder().setId("1").setCoreTerms(map).build(); TemporalRecord tr = TemporalRecord.newBuilder().setId("1").build(); TemporalI... | public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String normalizedEventDate = Optional.ofNullable(preproc... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... |
@Test public void testIsoRangeShortDate() { Map<String, String> map = new HashMap<>(); map.put(DwcTerm.eventDate.qualifiedName(), "1998-09-07/30"); ExtendedRecord er = ExtendedRecord.newBuilder().setId("1").setCoreTerms(map).build(); TemporalRecord tr = TemporalRecord.newBuilder().setId("1").build(); TemporalInterprete... | public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String normalizedEventDate = Optional.ofNullable(preproc... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... |
@Test public void testShortYear() { Map<String, String> map = new HashMap<>(); map.put(DwcTerm.eventDate.qualifiedName(), "05/02/78"); ExtendedRecord er = ExtendedRecord.newBuilder().setId("1").setCoreTerms(map).build(); TemporalRecord tr = TemporalRecord.newBuilder().setId("1").build(); TemporalInterpreter interpreter... | public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String normalizedEventDate = Optional.ofNullable(preproc... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... |
@Test public void testExtraZeroFn() { Map<String, String> map = new HashMap<>(); map.put(DwcTerm.eventDate.qualifiedName(), "2011-05-00"); ExtendedRecord er = ExtendedRecord.newBuilder().setId("1").setCoreTerms(map).build(); TemporalRecord tr = TemporalRecord.newBuilder().setId("1").build(); SerializableFunction<String... | public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String normalizedEventDate = Optional.ofNullable(preproc... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... | TemporalInterpreter implements Serializable { public void interpretTemporal(ExtendedRecord er, TemporalRecord tr) { String year = extractValue(er, DwcTerm.year); String month = extractValue(er, DwcTerm.month); String day = extractValue(er, DwcTerm.day); String eventDate = extractValue(er, DwcTerm.eventDate); String nor... |
@Test(expected = NullPointerException.class) public void createClientFromNullConfigTest() { EsClient.from(null); } | public static EsClient from(EsConfig config) { return new EsClient(config); } | EsClient implements AutoCloseable { public static EsClient from(EsConfig config) { return new EsClient(config); } } | EsClient implements AutoCloseable { public static EsClient from(EsConfig config) { return new EsClient(config); } private EsClient(EsConfig config); } | EsClient implements AutoCloseable { public static EsClient from(EsConfig config) { return new EsClient(config); } private EsClient(EsConfig config); static EsClient from(EsConfig config); Response performGetRequest(String endpoint); Response performPutRequest(String endpoint, Map<String, String> params, HttpEntity bod... | EsClient implements AutoCloseable { public static EsClient from(EsConfig config) { return new EsClient(config); } private EsClient(EsConfig config); static EsClient from(EsConfig config); Response performGetRequest(String endpoint); Response performPutRequest(String endpoint, Map<String, String> params, HttpEntity bod... |
@Test public void shouldUpdateLinkUnderMaintenanceFlag() throws SwitchNotFoundException { Switch sw = Switch.builder().switchId(TEST_SWITCH_ID).status(SwitchStatus.ACTIVE).build(); switchRepository.add(sw); switchOperationsService.updateSwitchUnderMaintenanceFlag(TEST_SWITCH_ID, true); sw = switchRepository.findById(TE... | public Switch updateSwitchUnderMaintenanceFlag(SwitchId switchId, boolean underMaintenance) throws SwitchNotFoundException { return transactionManager.doInTransaction(() -> { Optional<Switch> foundSwitch = switchRepository.findById(switchId); if (!(foundSwitch.isPresent())) { return Optional.<Switch>empty(); } Switch s... | SwitchOperationsService implements ILinkOperationsServiceCarrier { public Switch updateSwitchUnderMaintenanceFlag(SwitchId switchId, boolean underMaintenance) throws SwitchNotFoundException { return transactionManager.doInTransaction(() -> { Optional<Switch> foundSwitch = switchRepository.findById(switchId); if (!(foun... | SwitchOperationsService implements ILinkOperationsServiceCarrier { public Switch updateSwitchUnderMaintenanceFlag(SwitchId switchId, boolean underMaintenance) throws SwitchNotFoundException { return transactionManager.doInTransaction(() -> { Optional<Switch> foundSwitch = switchRepository.findById(switchId); if (!(foun... | SwitchOperationsService implements ILinkOperationsServiceCarrier { public Switch updateSwitchUnderMaintenanceFlag(SwitchId switchId, boolean underMaintenance) throws SwitchNotFoundException { return transactionManager.doInTransaction(() -> { Optional<Switch> foundSwitch = switchRepository.findById(switchId); if (!(foun... | SwitchOperationsService implements ILinkOperationsServiceCarrier { public Switch updateSwitchUnderMaintenanceFlag(SwitchId switchId, boolean underMaintenance) throws SwitchNotFoundException { return transactionManager.doInTransaction(() -> { Optional<Switch> foundSwitch = switchRepository.findById(switchId); if (!(foun... |
@Test public void installIntermediateIngressRule() throws Exception { Capture<OFFlowMod> capture = prepareForInstallTest(); switchManager.installIntermediateIngressRule(dpid, 1); OFFlowMod result = capture.getValue(); assertEquals(scheme.installIntermediateIngressRule(dpid, 1), result); } | @Override public long installIntermediateIngressRule(DatapathId dpid, int port) throws SwitchOperationException { IOFSwitch sw = lookupSwitch(dpid); OFFlowMod flowMod = buildIntermediateIngressRule(dpid, port); String flowName = "--Customer Port intermediate rule--" + dpid.toString(); pushFlow(sw, flowName, flowMod); r... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIntermediateIngressRule(DatapathId dpid, int port) throws SwitchOperationException { IOFSwitch sw = lookupSwitch(dpid); OFFlowMod flowMod = buildIntermediateIngressRule(dpid, port); String f... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIntermediateIngressRule(DatapathId dpid, int port) throws SwitchOperationException { IOFSwitch sw = lookupSwitch(dpid); OFFlowMod flowMod = buildIntermediateIngressRule(dpid, port); String f... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIntermediateIngressRule(DatapathId dpid, int port) throws SwitchOperationException { IOFSwitch sw = lookupSwitch(dpid); OFFlowMod flowMod = buildIntermediateIngressRule(dpid, port); String f... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIntermediateIngressRule(DatapathId dpid, int port) throws SwitchOperationException { IOFSwitch sw = lookupSwitch(dpid); OFFlowMod flowMod = buildIntermediateIngressRule(dpid, port); String f... |
@Test public void installPreIngressTablePassThroughDefaultRule() throws Exception { Capture<OFFlowMod> capture = prepareForInstallTest(); switchManager.installPreIngressTablePassThroughDefaultRule(dpid); OFFlowMod result = capture.getValue(); assertEquals(scheme.installPreIngressTablePassThroughDefaultRule(dpid), resul... | @Override public Long installPreIngressTablePassThroughDefaultRule(DatapathId dpid) throws SwitchOperationException { return installDefaultFlow(dpid, switchFlowFactory.getTablePassThroughDefaultFlowGenerator( MULTITABLE_PRE_INGRESS_PASS_THROUGH_COOKIE, INGRESS_TABLE_ID, PRE_INGRESS_TABLE_ID), "--Pass Through Pre Ingres... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public Long installPreIngressTablePassThroughDefaultRule(DatapathId dpid) throws SwitchOperationException { return installDefaultFlow(dpid, switchFlowFactory.getTablePassThroughDefaultFlowGenerator( MULTITABLE... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public Long installPreIngressTablePassThroughDefaultRule(DatapathId dpid) throws SwitchOperationException { return installDefaultFlow(dpid, switchFlowFactory.getTablePassThroughDefaultFlowGenerator( MULTITABLE... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public Long installPreIngressTablePassThroughDefaultRule(DatapathId dpid) throws SwitchOperationException { return installDefaultFlow(dpid, switchFlowFactory.getTablePassThroughDefaultFlowGenerator( MULTITABLE... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public Long installPreIngressTablePassThroughDefaultRule(DatapathId dpid) throws SwitchOperationException { return installDefaultFlow(dpid, switchFlowFactory.getTablePassThroughDefaultFlowGenerator( MULTITABLE... |
@Test public void installEgressTablePassThroughDefaultRule() throws Exception { Capture<OFFlowMod> capture = prepareForInstallTest(); switchManager.installEgressTablePassThroughDefaultRule(dpid); OFFlowMod result = capture.getValue(); assertEquals(scheme.installEgressTablePassThroughDefaultRule(dpid), result); } | @Override public Long installEgressTablePassThroughDefaultRule(DatapathId dpid) throws SwitchOperationException { return installDefaultFlow(dpid, switchFlowFactory.getTablePassThroughDefaultFlowGenerator( MULTITABLE_EGRESS_PASS_THROUGH_COOKIE, TRANSIT_TABLE_ID, EGRESS_TABLE_ID), "--Pass Through Egress Default Rule--");... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public Long installEgressTablePassThroughDefaultRule(DatapathId dpid) throws SwitchOperationException { return installDefaultFlow(dpid, switchFlowFactory.getTablePassThroughDefaultFlowGenerator( MULTITABLE_EGR... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public Long installEgressTablePassThroughDefaultRule(DatapathId dpid) throws SwitchOperationException { return installDefaultFlow(dpid, switchFlowFactory.getTablePassThroughDefaultFlowGenerator( MULTITABLE_EGR... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public Long installEgressTablePassThroughDefaultRule(DatapathId dpid) throws SwitchOperationException { return installDefaultFlow(dpid, switchFlowFactory.getTablePassThroughDefaultFlowGenerator( MULTITABLE_EGR... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public Long installEgressTablePassThroughDefaultRule(DatapathId dpid) throws SwitchOperationException { return installDefaultFlow(dpid, switchFlowFactory.getTablePassThroughDefaultFlowGenerator( MULTITABLE_EGR... |
@Test public void installRoundTripLatencyFlow() throws Exception { Capture<OFFlowMod> capture = prepareForInstallTest(); switchManager.installRoundTripLatencyFlow(dpid); OFFlowMod result = capture.getValue(); assertEquals(scheme.installRoundTripLatencyRule(dpid), result); } | @Override public Long installRoundTripLatencyFlow(DatapathId dpid) throws SwitchOperationException { return installDefaultFlow(dpid, switchFlowFactory.getRoundTripLatencyFlowGenerator(), "--RoundTripLatencyRule--"); } | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public Long installRoundTripLatencyFlow(DatapathId dpid) throws SwitchOperationException { return installDefaultFlow(dpid, switchFlowFactory.getRoundTripLatencyFlowGenerator(), "--RoundTripLatencyRule--"); } } | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public Long installRoundTripLatencyFlow(DatapathId dpid) throws SwitchOperationException { return installDefaultFlow(dpid, switchFlowFactory.getRoundTripLatencyFlowGenerator(), "--RoundTripLatencyRule--"); } ... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public Long installRoundTripLatencyFlow(DatapathId dpid) throws SwitchOperationException { return installDefaultFlow(dpid, switchFlowFactory.getRoundTripLatencyFlowGenerator(), "--RoundTripLatencyRule--"); } ... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public Long installRoundTripLatencyFlow(DatapathId dpid) throws SwitchOperationException { return installDefaultFlow(dpid, switchFlowFactory.getRoundTripLatencyFlowGenerator(), "--RoundTripLatencyRule--"); } ... |
@Test public void installBfdCatchFlow() throws Exception { Capture<OFFlowMod> capture = prepareForInstallTest(); switchManager.installBfdCatchFlow(defaultDpid); assertEquals(scheme.installBfdCatchRule(defaultDpid), capture.getValue()); } | @Override public Long installBfdCatchFlow(DatapathId dpid) throws SwitchOperationException { return installDefaultFlow(dpid, switchFlowFactory.getBfdCatchFlowGenerator(), "--CatchBfdRule--"); } | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public Long installBfdCatchFlow(DatapathId dpid) throws SwitchOperationException { return installDefaultFlow(dpid, switchFlowFactory.getBfdCatchFlowGenerator(), "--CatchBfdRule--"); } } | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public Long installBfdCatchFlow(DatapathId dpid) throws SwitchOperationException { return installDefaultFlow(dpid, switchFlowFactory.getBfdCatchFlowGenerator(), "--CatchBfdRule--"); } } | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public Long installBfdCatchFlow(DatapathId dpid) throws SwitchOperationException { return installDefaultFlow(dpid, switchFlowFactory.getBfdCatchFlowGenerator(), "--CatchBfdRule--"); } @Override Collection<Cla... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public Long installBfdCatchFlow(DatapathId dpid) throws SwitchOperationException { return installDefaultFlow(dpid, switchFlowFactory.getBfdCatchFlowGenerator(), "--CatchBfdRule--"); } @Override Collection<Cla... |
@Test public void installUnicastVerificationRuleVxlan() throws Exception { mockGetMetersRequest(Lists.newArrayList(broadcastMeterId), true, 10L); mockBarrierRequest(); expect(iofSwitch.write(anyObject(OFMeterMod.class))).andReturn(true).times(1); Capture<OFFlowMod> capture = prepareForInstallTest(); switchManager.insta... | @Override public Long installUnicastVerificationRuleVxlan(final DatapathId dpid) throws SwitchOperationException { return installDefaultFlow(dpid, switchFlowFactory.getUnicastVerificationVxlanFlowGenerator(), "--VerificationFlowVxlan--"); } | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public Long installUnicastVerificationRuleVxlan(final DatapathId dpid) throws SwitchOperationException { return installDefaultFlow(dpid, switchFlowFactory.getUnicastVerificationVxlanFlowGenerator(), "--Verific... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public Long installUnicastVerificationRuleVxlan(final DatapathId dpid) throws SwitchOperationException { return installDefaultFlow(dpid, switchFlowFactory.getUnicastVerificationVxlanFlowGenerator(), "--Verific... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public Long installUnicastVerificationRuleVxlan(final DatapathId dpid) throws SwitchOperationException { return installDefaultFlow(dpid, switchFlowFactory.getUnicastVerificationVxlanFlowGenerator(), "--Verific... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public Long installUnicastVerificationRuleVxlan(final DatapathId dpid) throws SwitchOperationException { return installDefaultFlow(dpid, switchFlowFactory.getUnicastVerificationVxlanFlowGenerator(), "--Verific... |
@Test public void installIngressFlowReplaceActionUsingTransitVlan() throws Exception { Capture<OFFlowMod> capture = prepareForInstallTest(); FlowEncapsulationType encapsulationType = FlowEncapsulationType.TRANSIT_VLAN; switchManager.installIngressFlow(dpid, EGRESS_SWITCH_DP_ID, cookieHex, cookie, inputPort, outputPort,... | @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId, FlowEncapsulationType encapsulationType, boolean multiTable) throws SwitchOperationException { List<... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... |
@Test public void installIngressFlowReplaceActionUsingVxlan() throws Exception { Capture<OFFlowMod> capture = prepareForInstallTest(); FlowEncapsulationType encapsulationType = FlowEncapsulationType.VXLAN; switchManager.installIngressFlow(dpid, EGRESS_SWITCH_DP_ID, cookieHex, cookie, inputPort, outputPort, inputVlanId,... | @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId, FlowEncapsulationType encapsulationType, boolean multiTable) throws SwitchOperationException { List<... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... |
@Test public void installIngressFlowPopActionUsingTransitVlan() throws Exception { Capture<OFFlowMod> capture = prepareForInstallTest(); FlowEncapsulationType encapsulationType = FlowEncapsulationType.TRANSIT_VLAN; switchManager.installIngressFlow(dpid, EGRESS_SWITCH_DP_ID, cookieHex, cookie, inputPort, outputPort, inp... | @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId, FlowEncapsulationType encapsulationType, boolean multiTable) throws SwitchOperationException { List<... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... |
@Test public void installIngressFlowPopActionUsingVxlan() throws Exception { Capture<OFFlowMod> capture = prepareForInstallTest(); FlowEncapsulationType encapsulationType = FlowEncapsulationType.VXLAN; switchManager.installIngressFlow(dpid, EGRESS_SWITCH_DP_ID, cookieHex, cookie, inputPort, outputPort, inputVlanId, tra... | @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId, FlowEncapsulationType encapsulationType, boolean multiTable) throws SwitchOperationException { List<... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... |
@Test public void shouldUpdateMaxLatencyPriorityAndPinnedFlowFields() throws FlowNotFoundException { String testFlowId = "flow_id"; Long maxLatency = 555L; Integer priority = 777; PathComputationStrategy pathComputationStrategy = PathComputationStrategy.LATENCY; String description = "new_description"; Flow flow = new T... | public Flow updateFlow(FlowOperationsCarrier carrier, FlowPatch flowPatch) throws FlowNotFoundException { UpdateFlowResult updateFlowResult = transactionManager.doInTransaction(() -> { Optional<Flow> foundFlow = flowRepository.findById(flowPatch.getFlowId()); if (!foundFlow.isPresent()) { return Optional.<UpdateFlowRes... | FlowOperationsService { public Flow updateFlow(FlowOperationsCarrier carrier, FlowPatch flowPatch) throws FlowNotFoundException { UpdateFlowResult updateFlowResult = transactionManager.doInTransaction(() -> { Optional<Flow> foundFlow = flowRepository.findById(flowPatch.getFlowId()); if (!foundFlow.isPresent()) { return... | FlowOperationsService { public Flow updateFlow(FlowOperationsCarrier carrier, FlowPatch flowPatch) throws FlowNotFoundException { UpdateFlowResult updateFlowResult = transactionManager.doInTransaction(() -> { Optional<Flow> foundFlow = flowRepository.findById(flowPatch.getFlowId()); if (!foundFlow.isPresent()) { return... | FlowOperationsService { public Flow updateFlow(FlowOperationsCarrier carrier, FlowPatch flowPatch) throws FlowNotFoundException { UpdateFlowResult updateFlowResult = transactionManager.doInTransaction(() -> { Optional<Flow> foundFlow = flowRepository.findById(flowPatch.getFlowId()); if (!foundFlow.isPresent()) { return... | FlowOperationsService { public Flow updateFlow(FlowOperationsCarrier carrier, FlowPatch flowPatch) throws FlowNotFoundException { UpdateFlowResult updateFlowResult = transactionManager.doInTransaction(() -> { Optional<Flow> foundFlow = flowRepository.findById(flowPatch.getFlowId()); if (!foundFlow.isPresent()) { return... |
@Test public void installIngressFlowPushActionvUsingTransitVlan() throws Exception { Capture<OFFlowMod> capture = prepareForInstallTest(); FlowEncapsulationType encapsulationType = FlowEncapsulationType.TRANSIT_VLAN; switchManager.installIngressFlow(dpid, EGRESS_SWITCH_DP_ID, cookieHex, cookie, inputPort, outputPort, 0... | @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId, FlowEncapsulationType encapsulationType, boolean multiTable) throws SwitchOperationException { List<... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... |
@Test public void installIngressFlowPushActionUsingVxlan() throws Exception { Capture<OFFlowMod> capture = prepareForInstallTest(); FlowEncapsulationType encapsulationType = FlowEncapsulationType.VXLAN; switchManager.installIngressFlow(dpid, EGRESS_SWITCH_DP_ID, cookieHex, cookie, inputPort, outputPort, 0, transitVlanI... | @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId, FlowEncapsulationType encapsulationType, boolean multiTable) throws SwitchOperationException { List<... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... |
@Test public void installIngressFlowNoneActionUsingTransitVlan() throws Exception { Capture<OFFlowMod> capture = prepareForInstallTest(); FlowEncapsulationType encapsulationType = FlowEncapsulationType.TRANSIT_VLAN; switchManager.installIngressFlow(dpid, EGRESS_SWITCH_DP_ID, cookieHex, cookie, inputPort, outputPort, 0,... | @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId, FlowEncapsulationType encapsulationType, boolean multiTable) throws SwitchOperationException { List<... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... |
@Test public void installIngressFlowNoneActionUsingVxlan() throws Exception { Capture<OFFlowMod> capture = prepareForInstallTest(); FlowEncapsulationType encapsulationType = FlowEncapsulationType.VXLAN; switchManager.installIngressFlow(dpid, EGRESS_SWITCH_DP_ID, cookieHex, cookie, inputPort, outputPort, 0, transitVlanI... | @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId, FlowEncapsulationType encapsulationType, boolean multiTable) throws SwitchOperationException { List<... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... |
@Test public void installIngressFlowWithoutResetCountsFlag() throws Exception { Capture<OFFlowMod> capture = prepareForInstallTest(true); switchManager.installIngressFlow(dpid, EGRESS_SWITCH_DP_ID, cookieHex, cookie, inputPort, outputPort, 0, transitVlanId, OutputVlanType.NONE, meterId, FlowEncapsulationType.TRANSIT_VL... | @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId, FlowEncapsulationType encapsulationType, boolean multiTable) throws SwitchOperationException { List<... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installIngressFlow(DatapathId dpid, DatapathId dstDpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int transitTunnelId, OutputVlanType outputVlanType, long meterId,... |
@Test public void installEgressFlowNoneActionUsingTransitVlan() throws Exception { Capture<OFFlowMod> capture = prepareForInstallTest(); FlowEncapsulationType encapsulationType = FlowEncapsulationType.TRANSIT_VLAN; switchManager.installEgressFlow(dpid, cookieHex, cookie, inputPort, outputPort, transitVlanId, 0, OutputV... | @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulationType, boolean multiTable) throws SwitchOperationException { List<OFAction> actionList = new ArrayLi... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulati... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulati... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulati... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulati... |
@Test public void installEgressFlowNoneActionUsingVxlan() throws Exception { Capture<OFFlowMod> capture = prepareForInstallTest(); FlowEncapsulationType encapsulationType = FlowEncapsulationType.TRANSIT_VLAN; switchManager.installEgressFlow(dpid, cookieHex, cookie, inputPort, outputPort, transitVlanId, 0, OutputVlanTyp... | @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulationType, boolean multiTable) throws SwitchOperationException { List<OFAction> actionList = new ArrayLi... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulati... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulati... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulati... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulati... |
@Test public void installEgressFlowPushActionUsingTransitVlan() throws Exception { Capture<OFFlowMod> capture = prepareForInstallTest(); FlowEncapsulationType encapsulationType = FlowEncapsulationType.TRANSIT_VLAN; switchManager.installEgressFlow(dpid, cookieHex, cookie, inputPort, outputPort, transitVlanId, outputVlan... | @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulationType, boolean multiTable) throws SwitchOperationException { List<OFAction> actionList = new ArrayLi... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulati... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulati... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulati... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulati... |
@Test public void installEgressFlowPushActionUsingVxlan() throws Exception { Capture<OFFlowMod> capture = prepareForInstallTest(); FlowEncapsulationType encapsulationType = FlowEncapsulationType.VXLAN; switchManager.installEgressFlow(dpid, cookieHex, cookie, inputPort, outputPort, transitVlanId, outputVlanId, OutputVla... | @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulationType, boolean multiTable) throws SwitchOperationException { List<OFAction> actionList = new ArrayLi... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulati... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulati... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulati... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulati... |
@Test public void installEgressFlowPopActionUsingTransitVlan() throws Exception { Capture<OFFlowMod> capture = prepareForInstallTest(); FlowEncapsulationType encapsulationType = FlowEncapsulationType.TRANSIT_VLAN; switchManager.installEgressFlow(dpid, cookieHex, cookie, inputPort, outputPort, transitVlanId, 0, OutputVl... | @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulationType, boolean multiTable) throws SwitchOperationException { List<OFAction> actionList = new ArrayLi... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulati... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulati... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulati... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulati... |
@Test public void shouldPrepareFlowUpdateResultWithChangedStrategy() { String flowId = "test_flow_id"; FlowPatch flowDto = FlowPatch.builder() .flowId(flowId) .maxLatency(100L) .pathComputationStrategy(PathComputationStrategy.COST) .build(); Flow flow = Flow.builder() .flowId(flowId) .srcSwitch(Switch.builder().switchI... | @VisibleForTesting UpdateFlowResult.UpdateFlowResultBuilder prepareFlowUpdateResult(FlowPatch flowPatch, Flow flow) { boolean updateRequired = updateRequiredByPathComputationStrategy(flowPatch, flow); updateRequired |= updateRequiredBySource(flowPatch, flow); updateRequired |= updateRequiredByDestination(flowPatch, flo... | FlowOperationsService { @VisibleForTesting UpdateFlowResult.UpdateFlowResultBuilder prepareFlowUpdateResult(FlowPatch flowPatch, Flow flow) { boolean updateRequired = updateRequiredByPathComputationStrategy(flowPatch, flow); updateRequired |= updateRequiredBySource(flowPatch, flow); updateRequired |= updateRequiredByDe... | FlowOperationsService { @VisibleForTesting UpdateFlowResult.UpdateFlowResultBuilder prepareFlowUpdateResult(FlowPatch flowPatch, Flow flow) { boolean updateRequired = updateRequiredByPathComputationStrategy(flowPatch, flow); updateRequired |= updateRequiredBySource(flowPatch, flow); updateRequired |= updateRequiredByDe... | FlowOperationsService { @VisibleForTesting UpdateFlowResult.UpdateFlowResultBuilder prepareFlowUpdateResult(FlowPatch flowPatch, Flow flow) { boolean updateRequired = updateRequiredByPathComputationStrategy(flowPatch, flow); updateRequired |= updateRequiredBySource(flowPatch, flow); updateRequired |= updateRequiredByDe... | FlowOperationsService { @VisibleForTesting UpdateFlowResult.UpdateFlowResultBuilder prepareFlowUpdateResult(FlowPatch flowPatch, Flow flow) { boolean updateRequired = updateRequiredByPathComputationStrategy(flowPatch, flow); updateRequired |= updateRequiredBySource(flowPatch, flow); updateRequired |= updateRequiredByDe... |
@Test public void installEgressFlowPopActionUsingVxlan() throws Exception { Capture<OFFlowMod> capture = prepareForInstallTest(); FlowEncapsulationType encapsulationType = FlowEncapsulationType.VXLAN; switchManager.installEgressFlow(dpid, cookieHex, cookie, inputPort, outputPort, transitVlanId, 0, OutputVlanType.POP, e... | @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulationType, boolean multiTable) throws SwitchOperationException { List<OFAction> actionList = new ArrayLi... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulati... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulati... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulati... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulati... |
@Test public void installEgressFlowReplaceActionUsingTransitVlan() throws Exception { Capture<OFFlowMod> capture = prepareForInstallTest(); FlowEncapsulationType encapsulationType = FlowEncapsulationType.TRANSIT_VLAN; switchManager.installEgressFlow(dpid, cookieHex, cookie, inputPort, outputPort, transitVlanId, outputV... | @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulationType, boolean multiTable) throws SwitchOperationException { List<OFAction> actionList = new ArrayLi... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulati... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulati... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulati... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulati... |
@Test public void installEgressFlowReplaceActionUsingVxlan() throws Exception { Capture<OFFlowMod> capture = prepareForInstallTest(); FlowEncapsulationType encapsulationType = FlowEncapsulationType.VXLAN; switchManager.installEgressFlow(dpid, cookieHex, cookie, inputPort, outputPort, transitVlanId, outputVlanId, Output... | @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulationType, boolean multiTable) throws SwitchOperationException { List<OFAction> actionList = new ArrayLi... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulati... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulati... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulati... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installEgressFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, int outputVlanId, OutputVlanType outputVlanType, FlowEncapsulationType encapsulati... |
@Test public void installTransitFlowUsingTransitVlan() throws Exception { Capture<OFFlowMod> capture = prepareForInstallTest(); FlowEncapsulationType encapsulationType = FlowEncapsulationType.TRANSIT_VLAN; switchManager.installTransitFlow(dpid, cookieHex, cookie, inputPort, outputPort, transitVlanId, encapsulationType,... | @Override public long installTransitFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, FlowEncapsulationType encapsulationType, boolean multiTable) throws SwitchOperationException { List<OFAction> actionList = new ArrayList<>(); IOFSwitch sw = lookupSwitch(dpid); OFFac... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installTransitFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, FlowEncapsulationType encapsulationType, boolean multiTable) throws SwitchOperati... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installTransitFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, FlowEncapsulationType encapsulationType, boolean multiTable) throws SwitchOperati... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installTransitFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, FlowEncapsulationType encapsulationType, boolean multiTable) throws SwitchOperati... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installTransitFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, FlowEncapsulationType encapsulationType, boolean multiTable) throws SwitchOperati... |
@Test public void installTransitFlowUsingVxlan() throws Exception { Capture<OFFlowMod> capture = prepareForInstallTest(); FlowEncapsulationType encapsulationType = FlowEncapsulationType.VXLAN; switchManager.installTransitFlow(dpid, cookieHex, cookie, inputPort, outputPort, transitVlanId, encapsulationType, false); asse... | @Override public long installTransitFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, FlowEncapsulationType encapsulationType, boolean multiTable) throws SwitchOperationException { List<OFAction> actionList = new ArrayList<>(); IOFSwitch sw = lookupSwitch(dpid); OFFac... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installTransitFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, FlowEncapsulationType encapsulationType, boolean multiTable) throws SwitchOperati... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installTransitFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, FlowEncapsulationType encapsulationType, boolean multiTable) throws SwitchOperati... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installTransitFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, FlowEncapsulationType encapsulationType, boolean multiTable) throws SwitchOperati... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installTransitFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int transitTunnelId, FlowEncapsulationType encapsulationType, boolean multiTable) throws SwitchOperati... |
@Test public void installOneSwitchFlowReplaceAction() throws Exception { Capture<OFFlowMod> capture = prepareForInstallTest(); switchManager.installOneSwitchFlow(dpid, cookieHex, cookie, inputPort, outputPort, inputVlanId, outputVlanId, OutputVlanType.REPLACE, meterId, false); assertEquals( scheme.oneSwitchReplaceFlowM... | @Override public long installOneSwitchFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int outputVlanId, OutputVlanType outputVlanType, long meterId, boolean multiTable) throws SwitchOperationException { List<OFAction> actionList = new ArrayList<>(); IOFSwitch sw = looku... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installOneSwitchFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int outputVlanId, OutputVlanType outputVlanType, long meterId, boolean multiTable) ... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installOneSwitchFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int outputVlanId, OutputVlanType outputVlanType, long meterId, boolean multiTable) ... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installOneSwitchFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int outputVlanId, OutputVlanType outputVlanType, long meterId, boolean multiTable) ... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installOneSwitchFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int outputVlanId, OutputVlanType outputVlanType, long meterId, boolean multiTable) ... |
@Test public void installOneSwitchFlowPushAction() throws Exception { Capture<OFFlowMod> capture = prepareForInstallTest(); switchManager.installOneSwitchFlow(dpid, cookieHex, cookie, inputPort, outputPort, 0, outputVlanId, OutputVlanType.PUSH, meterId, false); assertEquals( scheme.oneSwitchPushFlowMod(inputPort, outpu... | @Override public long installOneSwitchFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int outputVlanId, OutputVlanType outputVlanType, long meterId, boolean multiTable) throws SwitchOperationException { List<OFAction> actionList = new ArrayList<>(); IOFSwitch sw = looku... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installOneSwitchFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int outputVlanId, OutputVlanType outputVlanType, long meterId, boolean multiTable) ... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installOneSwitchFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int outputVlanId, OutputVlanType outputVlanType, long meterId, boolean multiTable) ... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installOneSwitchFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int outputVlanId, OutputVlanType outputVlanType, long meterId, boolean multiTable) ... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installOneSwitchFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int outputVlanId, OutputVlanType outputVlanType, long meterId, boolean multiTable) ... |
@Test public void installOneSwitchFlowPopAction() throws Exception { Capture<OFFlowMod> capture = prepareForInstallTest(); switchManager.installOneSwitchFlow(dpid, cookieHex, cookie, inputPort, outputPort, inputVlanId, 0, OutputVlanType.POP, meterId, false); assertEquals( scheme.oneSwitchPopFlowMod(inputPort, outputPor... | @Override public long installOneSwitchFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int outputVlanId, OutputVlanType outputVlanType, long meterId, boolean multiTable) throws SwitchOperationException { List<OFAction> actionList = new ArrayList<>(); IOFSwitch sw = looku... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installOneSwitchFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int outputVlanId, OutputVlanType outputVlanType, long meterId, boolean multiTable) ... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installOneSwitchFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int outputVlanId, OutputVlanType outputVlanType, long meterId, boolean multiTable) ... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installOneSwitchFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int outputVlanId, OutputVlanType outputVlanType, long meterId, boolean multiTable) ... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installOneSwitchFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int outputVlanId, OutputVlanType outputVlanType, long meterId, boolean multiTable) ... |
@Test public void installOneSwitchFlowNoneAction() throws Exception { Capture<OFFlowMod> capture = prepareForInstallTest(); switchManager.installOneSwitchFlow(dpid, cookieHex, cookie, inputPort, outputPort, 0, 0, OutputVlanType.NONE, meterId, false); assertEquals( scheme.oneSwitchNoneFlowMod(inputPort, outputPort, mete... | @Override public long installOneSwitchFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int outputVlanId, OutputVlanType outputVlanType, long meterId, boolean multiTable) throws SwitchOperationException { List<OFAction> actionList = new ArrayList<>(); IOFSwitch sw = looku... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installOneSwitchFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int outputVlanId, OutputVlanType outputVlanType, long meterId, boolean multiTable) ... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installOneSwitchFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int outputVlanId, OutputVlanType outputVlanType, long meterId, boolean multiTable) ... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installOneSwitchFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int outputVlanId, OutputVlanType outputVlanType, long meterId, boolean multiTable) ... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installOneSwitchFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int outputVlanId, OutputVlanType outputVlanType, long meterId, boolean multiTable) ... |
@Test public void installOneSwitchFlowNoneActionWithoutResetCountsFlag() throws Exception { Capture<OFFlowMod> capture = prepareForInstallTest(true); switchManager.installOneSwitchFlow(dpid, cookieHex, cookie, inputPort, outputPort, 0, 0, OutputVlanType.NONE, meterId, false); final OFFlowMod actual = capture.getValue()... | @Override public long installOneSwitchFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int outputVlanId, OutputVlanType outputVlanType, long meterId, boolean multiTable) throws SwitchOperationException { List<OFAction> actionList = new ArrayList<>(); IOFSwitch sw = looku... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installOneSwitchFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int outputVlanId, OutputVlanType outputVlanType, long meterId, boolean multiTable) ... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installOneSwitchFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int outputVlanId, OutputVlanType outputVlanType, long meterId, boolean multiTable) ... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installOneSwitchFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int outputVlanId, OutputVlanType outputVlanType, long meterId, boolean multiTable) ... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public long installOneSwitchFlow(DatapathId dpid, String flowId, Long cookie, int inputPort, int outputPort, int inputVlanId, int outputVlanId, OutputVlanType outputVlanType, long meterId, boolean multiTable) ... |
@Test public void shouldPrepareFlowUpdateResultWithChangedMaxLatencyFirstCase() { String flowId = "test_flow_id"; FlowPatch flowDto = FlowPatch.builder() .flowId(flowId) .maxLatency(100L) .build(); Flow flow = Flow.builder() .flowId(flowId) .srcSwitch(Switch.builder().switchId(new SwitchId(1)).build()) .destSwitch(Swit... | @VisibleForTesting UpdateFlowResult.UpdateFlowResultBuilder prepareFlowUpdateResult(FlowPatch flowPatch, Flow flow) { boolean updateRequired = updateRequiredByPathComputationStrategy(flowPatch, flow); updateRequired |= updateRequiredBySource(flowPatch, flow); updateRequired |= updateRequiredByDestination(flowPatch, flo... | FlowOperationsService { @VisibleForTesting UpdateFlowResult.UpdateFlowResultBuilder prepareFlowUpdateResult(FlowPatch flowPatch, Flow flow) { boolean updateRequired = updateRequiredByPathComputationStrategy(flowPatch, flow); updateRequired |= updateRequiredBySource(flowPatch, flow); updateRequired |= updateRequiredByDe... | FlowOperationsService { @VisibleForTesting UpdateFlowResult.UpdateFlowResultBuilder prepareFlowUpdateResult(FlowPatch flowPatch, Flow flow) { boolean updateRequired = updateRequiredByPathComputationStrategy(flowPatch, flow); updateRequired |= updateRequiredBySource(flowPatch, flow); updateRequired |= updateRequiredByDe... | FlowOperationsService { @VisibleForTesting UpdateFlowResult.UpdateFlowResultBuilder prepareFlowUpdateResult(FlowPatch flowPatch, Flow flow) { boolean updateRequired = updateRequiredByPathComputationStrategy(flowPatch, flow); updateRequired |= updateRequiredBySource(flowPatch, flow); updateRequired |= updateRequiredByDe... | FlowOperationsService { @VisibleForTesting UpdateFlowResult.UpdateFlowResultBuilder prepareFlowUpdateResult(FlowPatch flowPatch, Flow flow) { boolean updateRequired = updateRequiredByPathComputationStrategy(flowPatch, flow); updateRequired |= updateRequiredBySource(flowPatch, flow); updateRequired |= updateRequiredByDe... |
@Test public void dumpFlowTable() { } | @Override public List<OFFlowStatsEntry> dumpFlowTable(final DatapathId dpid) throws SwitchNotFoundException { List<OFFlowStatsEntry> entries = new ArrayList<>(); IOFSwitch sw = lookupSwitch(dpid); OFFactory ofFactory = sw.getOFFactory(); OFFlowStatsRequest flowRequest = ofFactory.buildFlowStatsRequest() .setOutGroup(OF... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<OFFlowStatsEntry> dumpFlowTable(final DatapathId dpid) throws SwitchNotFoundException { List<OFFlowStatsEntry> entries = new ArrayList<>(); IOFSwitch sw = lookupSwitch(dpid); OFFactory ofFactory = ... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<OFFlowStatsEntry> dumpFlowTable(final DatapathId dpid) throws SwitchNotFoundException { List<OFFlowStatsEntry> entries = new ArrayList<>(); IOFSwitch sw = lookupSwitch(dpid); OFFactory ofFactory = ... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<OFFlowStatsEntry> dumpFlowTable(final DatapathId dpid) throws SwitchNotFoundException { List<OFFlowStatsEntry> entries = new ArrayList<>(); IOFSwitch sw = lookupSwitch(dpid); OFFactory ofFactory = ... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<OFFlowStatsEntry> dumpFlowTable(final DatapathId dpid) throws SwitchNotFoundException { List<OFFlowStatsEntry> entries = new ArrayList<>(); IOFSwitch sw = lookupSwitch(dpid); OFFactory ofFactory = ... |
@Test public void dumpMeters() throws InterruptedException, ExecutionException, TimeoutException, SwitchOperationException { OFMeterConfig firstMeter = ofFactory.buildMeterConfig().setMeterId(1).build(); OFMeterConfig secondMeter = ofFactory.buildMeterConfig().setMeterId(2).build(); ListenableFuture<List<OFMeterConfigS... | @Override public List<OFMeterConfig> dumpMeters(final DatapathId dpid) throws SwitchOperationException { List<OFMeterConfig> result = new ArrayList<>(); IOFSwitch sw = lookupSwitch(dpid); if (sw == null) { throw new IllegalArgumentException(format("Switch %s was not found", dpid)); } verifySwitchSupportsMeters(sw); OFF... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<OFMeterConfig> dumpMeters(final DatapathId dpid) throws SwitchOperationException { List<OFMeterConfig> result = new ArrayList<>(); IOFSwitch sw = lookupSwitch(dpid); if (sw == null) { throw new Ill... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<OFMeterConfig> dumpMeters(final DatapathId dpid) throws SwitchOperationException { List<OFMeterConfig> result = new ArrayList<>(); IOFSwitch sw = lookupSwitch(dpid); if (sw == null) { throw new Ill... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<OFMeterConfig> dumpMeters(final DatapathId dpid) throws SwitchOperationException { List<OFMeterConfig> result = new ArrayList<>(); IOFSwitch sw = lookupSwitch(dpid); if (sw == null) { throw new Ill... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<OFMeterConfig> dumpMeters(final DatapathId dpid) throws SwitchOperationException { List<OFMeterConfig> result = new ArrayList<>(); IOFSwitch sw = lookupSwitch(dpid); if (sw == null) { throw new Ill... |
@Test public void dumpMetersTimeoutException() throws SwitchOperationException, InterruptedException, ExecutionException, TimeoutException { ListenableFuture<List<OFMeterConfigStatsReply>> ofStatsFuture = createMock(ListenableFuture.class); expect(ofStatsFuture.get(anyLong(), anyObject())).andThrow(new TimeoutException... | @Override public List<OFMeterConfig> dumpMeters(final DatapathId dpid) throws SwitchOperationException { List<OFMeterConfig> result = new ArrayList<>(); IOFSwitch sw = lookupSwitch(dpid); if (sw == null) { throw new IllegalArgumentException(format("Switch %s was not found", dpid)); } verifySwitchSupportsMeters(sw); OFF... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<OFMeterConfig> dumpMeters(final DatapathId dpid) throws SwitchOperationException { List<OFMeterConfig> result = new ArrayList<>(); IOFSwitch sw = lookupSwitch(dpid); if (sw == null) { throw new Ill... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<OFMeterConfig> dumpMeters(final DatapathId dpid) throws SwitchOperationException { List<OFMeterConfig> result = new ArrayList<>(); IOFSwitch sw = lookupSwitch(dpid); if (sw == null) { throw new Ill... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<OFMeterConfig> dumpMeters(final DatapathId dpid) throws SwitchOperationException { List<OFMeterConfig> result = new ArrayList<>(); IOFSwitch sw = lookupSwitch(dpid); if (sw == null) { throw new Ill... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<OFMeterConfig> dumpMeters(final DatapathId dpid) throws SwitchOperationException { List<OFMeterConfig> result = new ArrayList<>(); IOFSwitch sw = lookupSwitch(dpid); if (sw == null) { throw new Ill... |
@Test public void deleteMeter() throws Exception { mockBarrierRequest(); final Capture<OFMeterMod> capture = prepareForMeterTest(); switchManager.deleteMeter(dpid, meterId); final OFMeterMod meterMod = capture.getValue(); assertEquals(meterMod.getCommand(), OFMeterModCommand.DELETE); assertEquals(meterMod.getMeterId(),... | @Override public void deleteMeter(final DatapathId dpid, final long meterId) throws SwitchOperationException { if (meterId > 0L) { IOFSwitch sw = lookupSwitch(dpid); verifySwitchSupportsMeters(sw); buildAndDeleteMeter(sw, dpid, meterId); sendBarrierRequest(sw); } else { throw new InvalidMeterIdException(dpid, "Meter id... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public void deleteMeter(final DatapathId dpid, final long meterId) throws SwitchOperationException { if (meterId > 0L) { IOFSwitch sw = lookupSwitch(dpid); verifySwitchSupportsMeters(sw); buildAndDeleteMeter(s... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public void deleteMeter(final DatapathId dpid, final long meterId) throws SwitchOperationException { if (meterId > 0L) { IOFSwitch sw = lookupSwitch(dpid); verifySwitchSupportsMeters(sw); buildAndDeleteMeter(s... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public void deleteMeter(final DatapathId dpid, final long meterId) throws SwitchOperationException { if (meterId > 0L) { IOFSwitch sw = lookupSwitch(dpid); verifySwitchSupportsMeters(sw); buildAndDeleteMeter(s... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public void deleteMeter(final DatapathId dpid, final long meterId) throws SwitchOperationException { if (meterId > 0L) { IOFSwitch sw = lookupSwitch(dpid); verifySwitchSupportsMeters(sw); buildAndDeleteMeter(s... |
@Test(expected = InvalidMeterIdException.class) public void deleteMeterWithInvalidId() throws SwitchOperationException { switchManager.deleteMeter(dpid, -1); } | @Override public void deleteMeter(final DatapathId dpid, final long meterId) throws SwitchOperationException { if (meterId > 0L) { IOFSwitch sw = lookupSwitch(dpid); verifySwitchSupportsMeters(sw); buildAndDeleteMeter(sw, dpid, meterId); sendBarrierRequest(sw); } else { throw new InvalidMeterIdException(dpid, "Meter id... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public void deleteMeter(final DatapathId dpid, final long meterId) throws SwitchOperationException { if (meterId > 0L) { IOFSwitch sw = lookupSwitch(dpid); verifySwitchSupportsMeters(sw); buildAndDeleteMeter(s... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public void deleteMeter(final DatapathId dpid, final long meterId) throws SwitchOperationException { if (meterId > 0L) { IOFSwitch sw = lookupSwitch(dpid); verifySwitchSupportsMeters(sw); buildAndDeleteMeter(s... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public void deleteMeter(final DatapathId dpid, final long meterId) throws SwitchOperationException { if (meterId > 0L) { IOFSwitch sw = lookupSwitch(dpid); verifySwitchSupportsMeters(sw); buildAndDeleteMeter(s... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public void deleteMeter(final DatapathId dpid, final long meterId) throws SwitchOperationException { if (meterId > 0L) { IOFSwitch sw = lookupSwitch(dpid); verifySwitchSupportsMeters(sw); buildAndDeleteMeter(s... |
@Test public void shouldDeleteAllNonDefaultRules() throws Exception { expect(ofSwitchService.getActiveSwitch(dpid)).andStubReturn(iofSwitch); expect(iofSwitch.getOFFactory()).andStubReturn(ofFactory); mockFlowStatsRequest(cookie, DROP_RULE_COOKIE, VERIFICATION_BROADCAST_RULE_COOKIE, VERIFICATION_UNICAST_RULE_COOKIE); C... | @Override public List<Long> deleteAllNonDefaultRules(final DatapathId dpid) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpFlowTable(dpid); IOFSwitch sw = lookupSwitch(dpid); OFFactory ofFactory = sw.getOFFactory(); Set<Long> removedRules = new HashSet<>(); for (OFFlowStatsEntry flowStat... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteAllNonDefaultRules(final DatapathId dpid) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpFlowTable(dpid); IOFSwitch sw = lookupSwitch(dpid); OFFactory of... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteAllNonDefaultRules(final DatapathId dpid) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpFlowTable(dpid); IOFSwitch sw = lookupSwitch(dpid); OFFactory of... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteAllNonDefaultRules(final DatapathId dpid) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpFlowTable(dpid); IOFSwitch sw = lookupSwitch(dpid); OFFactory of... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteAllNonDefaultRules(final DatapathId dpid) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpFlowTable(dpid); IOFSwitch sw = lookupSwitch(dpid); OFFactory of... |
@Test public void shouldDeleteDefaultRulesWithoutMeters() throws Exception { expect(ofSwitchService.getActiveSwitch(dpid)).andStubReturn(iofSwitch); expect(iofSwitch.getOFFactory()).andStubReturn(new OFFactoryVer12Mock()); expect(iofSwitch.getSwitchDescription()).andStubReturn(switchDescription); expect(iofSwitch.getId... | @Override public List<Long> deleteDefaultRules(DatapathId dpid, List<Integer> islPorts, List<Integer> flowPorts, Set<Integer> flowLldpPorts, Set<Integer> flowArpPorts, Set<Integer> server42FlowRttPorts, boolean multiTable, boolean switchLldp, boolean switchArp, boolean server42FlowRtt) throws SwitchOperationException {... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteDefaultRules(DatapathId dpid, List<Integer> islPorts, List<Integer> flowPorts, Set<Integer> flowLldpPorts, Set<Integer> flowArpPorts, Set<Integer> server42FlowRttPorts, boolean multiTab... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteDefaultRules(DatapathId dpid, List<Integer> islPorts, List<Integer> flowPorts, Set<Integer> flowLldpPorts, Set<Integer> flowArpPorts, Set<Integer> server42FlowRttPorts, boolean multiTab... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteDefaultRules(DatapathId dpid, List<Integer> islPorts, List<Integer> flowPorts, Set<Integer> flowLldpPorts, Set<Integer> flowArpPorts, Set<Integer> server42FlowRttPorts, boolean multiTab... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteDefaultRules(DatapathId dpid, List<Integer> islPorts, List<Integer> flowPorts, Set<Integer> flowLldpPorts, Set<Integer> flowArpPorts, Set<Integer> server42FlowRttPorts, boolean multiTab... |
@Test public void shouldDeleteDefaultRulesWithMeters() throws Exception { expect(ofSwitchService.getActiveSwitch(dpid)).andStubReturn(iofSwitch); expect(iofSwitch.getOFFactory()).andStubReturn(ofFactory); expect(iofSwitch.getSwitchDescription()).andStubReturn(switchDescription); expect(iofSwitch.getId()).andStubReturn(... | @Override public List<Long> deleteDefaultRules(DatapathId dpid, List<Integer> islPorts, List<Integer> flowPorts, Set<Integer> flowLldpPorts, Set<Integer> flowArpPorts, Set<Integer> server42FlowRttPorts, boolean multiTable, boolean switchLldp, boolean switchArp, boolean server42FlowRtt) throws SwitchOperationException {... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteDefaultRules(DatapathId dpid, List<Integer> islPorts, List<Integer> flowPorts, Set<Integer> flowLldpPorts, Set<Integer> flowArpPorts, Set<Integer> server42FlowRttPorts, boolean multiTab... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteDefaultRules(DatapathId dpid, List<Integer> islPorts, List<Integer> flowPorts, Set<Integer> flowLldpPorts, Set<Integer> flowArpPorts, Set<Integer> server42FlowRttPorts, boolean multiTab... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteDefaultRules(DatapathId dpid, List<Integer> islPorts, List<Integer> flowPorts, Set<Integer> flowLldpPorts, Set<Integer> flowArpPorts, Set<Integer> server42FlowRttPorts, boolean multiTab... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteDefaultRules(DatapathId dpid, List<Integer> islPorts, List<Integer> flowPorts, Set<Integer> flowLldpPorts, Set<Integer> flowArpPorts, Set<Integer> server42FlowRttPorts, boolean multiTab... |
@Test public void shouldDeleteRuleByCookie() throws Exception { expect(ofSwitchService.getActiveSwitch(dpid)).andStubReturn(iofSwitch); expect(iofSwitch.getOFFactory()).andStubReturn(ofFactory); mockFlowStatsRequest(cookie, DROP_RULE_COOKIE, VERIFICATION_BROADCAST_RULE_COOKIE, VERIFICATION_UNICAST_RULE_COOKIE); Capture... | @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpFlowTable(dpid); IOFSwitch sw = lookupSwitch(dpid); OFFactory ofFactory = sw.getOFFactory(); for (Dele... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpF... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpF... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpF... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpF... |
@Test public void shouldDeleteRuleByInPort() throws Exception { final int testInPort = 11; expect(ofSwitchService.getActiveSwitch(dpid)).andStubReturn(iofSwitch); expect(iofSwitch.getOFFactory()).andStubReturn(ofFactory); mockFlowStatsRequest(cookie, DROP_RULE_COOKIE, VERIFICATION_BROADCAST_RULE_COOKIE, VERIFICATION_UN... | @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpFlowTable(dpid); IOFSwitch sw = lookupSwitch(dpid); OFFactory ofFactory = sw.getOFFactory(); for (Dele... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpF... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpF... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpF... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpF... |
@Test public void shouldPrepareFlowUpdateResultWithChangedMaxLatencySecondCase() { String flowId = "test_flow_id"; FlowPatch flowDto = FlowPatch.builder() .flowId(flowId) .maxLatency(100L) .pathComputationStrategy(PathComputationStrategy.MAX_LATENCY) .build(); Flow flow = Flow.builder() .flowId(flowId) .srcSwitch(Switc... | @VisibleForTesting UpdateFlowResult.UpdateFlowResultBuilder prepareFlowUpdateResult(FlowPatch flowPatch, Flow flow) { boolean updateRequired = updateRequiredByPathComputationStrategy(flowPatch, flow); updateRequired |= updateRequiredBySource(flowPatch, flow); updateRequired |= updateRequiredByDestination(flowPatch, flo... | FlowOperationsService { @VisibleForTesting UpdateFlowResult.UpdateFlowResultBuilder prepareFlowUpdateResult(FlowPatch flowPatch, Flow flow) { boolean updateRequired = updateRequiredByPathComputationStrategy(flowPatch, flow); updateRequired |= updateRequiredBySource(flowPatch, flow); updateRequired |= updateRequiredByDe... | FlowOperationsService { @VisibleForTesting UpdateFlowResult.UpdateFlowResultBuilder prepareFlowUpdateResult(FlowPatch flowPatch, Flow flow) { boolean updateRequired = updateRequiredByPathComputationStrategy(flowPatch, flow); updateRequired |= updateRequiredBySource(flowPatch, flow); updateRequired |= updateRequiredByDe... | FlowOperationsService { @VisibleForTesting UpdateFlowResult.UpdateFlowResultBuilder prepareFlowUpdateResult(FlowPatch flowPatch, Flow flow) { boolean updateRequired = updateRequiredByPathComputationStrategy(flowPatch, flow); updateRequired |= updateRequiredBySource(flowPatch, flow); updateRequired |= updateRequiredByDe... | FlowOperationsService { @VisibleForTesting UpdateFlowResult.UpdateFlowResultBuilder prepareFlowUpdateResult(FlowPatch flowPatch, Flow flow) { boolean updateRequired = updateRequiredByPathComputationStrategy(flowPatch, flow); updateRequired |= updateRequiredBySource(flowPatch, flow); updateRequired |= updateRequiredByDe... |
@Test public void shouldDeleteRuleByInVlan() throws Exception { final short testInVlan = 101; FlowEncapsulationType flowEncapsulationType = FlowEncapsulationType.TRANSIT_VLAN; expect(ofSwitchService.getActiveSwitch(dpid)).andStubReturn(iofSwitch); expect(iofSwitch.getOFFactory()).andStubReturn(ofFactory); mockFlowStats... | @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpFlowTable(dpid); IOFSwitch sw = lookupSwitch(dpid); OFFactory ofFactory = sw.getOFFactory(); for (Dele... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpF... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpF... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpF... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpF... |
@Test public void shouldDeleteRuleByInPortAndVlan() throws Exception { final int testInPort = 11; final short testInVlan = 101; expect(ofSwitchService.getActiveSwitch(dpid)).andStubReturn(iofSwitch); expect(iofSwitch.getOFFactory()).andStubReturn(ofFactory); mockFlowStatsRequest(cookie, DROP_RULE_COOKIE, VERIFICATION_B... | @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpFlowTable(dpid); IOFSwitch sw = lookupSwitch(dpid); OFFactory ofFactory = sw.getOFFactory(); for (Dele... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpF... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpF... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpF... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpF... |
@Test public void shouldDeleteRuleByInPortAndVxlanTunnel() throws Exception { final int testInPort = 11; final short testInVlan = 101; expect(ofSwitchService.getActiveSwitch(dpid)).andStubReturn(iofSwitch); expect(iofSwitch.getOFFactory()).andStubReturn(ofFactory); mockFlowStatsRequest(cookie, DROP_RULE_COOKIE, VERIFIC... | @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpFlowTable(dpid); IOFSwitch sw = lookupSwitch(dpid); OFFactory ofFactory = sw.getOFFactory(); for (Dele... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpF... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpF... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpF... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpF... |
@Test public void shouldDeleteRuleByPriority() throws Exception { final int testPriority = 999; expect(ofSwitchService.getActiveSwitch(dpid)).andStubReturn(iofSwitch); expect(iofSwitch.getOFFactory()).andStubReturn(ofFactory); mockFlowStatsRequest(cookie, DROP_RULE_COOKIE, VERIFICATION_BROADCAST_RULE_COOKIE, VERIFICATI... | @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpFlowTable(dpid); IOFSwitch sw = lookupSwitch(dpid); OFFactory ofFactory = sw.getOFFactory(); for (Dele... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpF... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpF... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpF... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpF... |
@Test public void shouldDeleteRuleByInPortVlanAndPriority() throws Exception { final int testInPort = 11; final short testInVlan = 101; final int testPriority = 999; expect(ofSwitchService.getActiveSwitch(dpid)).andStubReturn(iofSwitch); expect(iofSwitch.getOFFactory()).andStubReturn(ofFactory); mockFlowStatsRequest(co... | @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpFlowTable(dpid); IOFSwitch sw = lookupSwitch(dpid); OFFactory ofFactory = sw.getOFFactory(); for (Dele... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpF... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpF... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpF... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpF... |
@Test public void shouldDeleteRuleByOutPort() throws Exception { final int testOutPort = 21; expect(ofSwitchService.getActiveSwitch(dpid)).andStubReturn(iofSwitch); expect(iofSwitch.getOFFactory()).andStubReturn(ofFactory); mockFlowStatsRequest(cookie, DROP_RULE_COOKIE, VERIFICATION_BROADCAST_RULE_COOKIE, VERIFICATION_... | @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpFlowTable(dpid); IOFSwitch sw = lookupSwitch(dpid); OFFactory ofFactory = sw.getOFFactory(); for (Dele... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpF... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpF... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpF... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> deleteRulesByCriteria(DatapathId dpid, boolean multiTable, RuleType ruleType, DeleteRulesCriteria... criteria) throws SwitchOperationException { List<OFFlowStatsEntry> flowStatsBefore = dumpF... |
@Test public void shouldInstallMeterWithKbpsFlag() throws Exception { expect(ofSwitchService.getActiveSwitch(dpid)).andStubReturn(iofSwitch); expect(iofSwitch.getOFFactory()).andStubReturn(ofFactory); expect(iofSwitch.getSwitchDescription()).andStubReturn(switchDescription); expect(iofSwitch.getId()).andStubReturn(dpid... | @VisibleForTesting void processMeter(IOFSwitch sw, OFMeterMod meterMod) { long meterId = meterMod.getMeterId(); OFMeterConfig meterConfig; try { meterConfig = getMeter(sw.getId(), meterId); } catch (SwitchOperationException e) { logger.warn("Meter {} won't be installed on the switch {}: {}", meterId, sw.getId(), e.getM... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @VisibleForTesting void processMeter(IOFSwitch sw, OFMeterMod meterMod) { long meterId = meterMod.getMeterId(); OFMeterConfig meterConfig; try { meterConfig = getMeter(sw.getId(), meterId); } catch (SwitchOperationExcep... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @VisibleForTesting void processMeter(IOFSwitch sw, OFMeterMod meterMod) { long meterId = meterMod.getMeterId(); OFMeterConfig meterConfig; try { meterConfig = getMeter(sw.getId(), meterId); } catch (SwitchOperationExcep... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @VisibleForTesting void processMeter(IOFSwitch sw, OFMeterMod meterMod) { long meterId = meterMod.getMeterId(); OFMeterConfig meterConfig; try { meterConfig = getMeter(sw.getId(), meterId); } catch (SwitchOperationExcep... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @VisibleForTesting void processMeter(IOFSwitch sw, OFMeterMod meterMod) { long meterId = meterMod.getMeterId(); OFMeterConfig meterConfig; try { meterConfig = getMeter(sw.getId(), meterId); } catch (SwitchOperationExcep... |
@Test public void shouldReinstallMeterIfFlagIsIncorrect() throws Exception { long expectedRate = config.getUnicastRateLimit(); expect(ofSwitchService.getActiveSwitch(dpid)).andStubReturn(iofSwitch); expect(iofSwitch.getOFFactory()).andStubReturn(ofFactory); expect(iofSwitch.getSwitchDescription()).andStubReturn(switchD... | @VisibleForTesting void processMeter(IOFSwitch sw, OFMeterMod meterMod) { long meterId = meterMod.getMeterId(); OFMeterConfig meterConfig; try { meterConfig = getMeter(sw.getId(), meterId); } catch (SwitchOperationException e) { logger.warn("Meter {} won't be installed on the switch {}: {}", meterId, sw.getId(), e.getM... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @VisibleForTesting void processMeter(IOFSwitch sw, OFMeterMod meterMod) { long meterId = meterMod.getMeterId(); OFMeterConfig meterConfig; try { meterConfig = getMeter(sw.getId(), meterId); } catch (SwitchOperationExcep... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @VisibleForTesting void processMeter(IOFSwitch sw, OFMeterMod meterMod) { long meterId = meterMod.getMeterId(); OFMeterConfig meterConfig; try { meterConfig = getMeter(sw.getId(), meterId); } catch (SwitchOperationExcep... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @VisibleForTesting void processMeter(IOFSwitch sw, OFMeterMod meterMod) { long meterId = meterMod.getMeterId(); OFMeterConfig meterConfig; try { meterConfig = getMeter(sw.getId(), meterId); } catch (SwitchOperationExcep... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @VisibleForTesting void processMeter(IOFSwitch sw, OFMeterMod meterMod) { long meterId = meterMod.getMeterId(); OFMeterConfig meterConfig; try { meterConfig = getMeter(sw.getId(), meterId); } catch (SwitchOperationExcep... |
@Test public void shouldRenstallMetersIfRateIsUpdated() throws Exception { long unicastMeter = createMeterIdForDefaultRule(VERIFICATION_UNICAST_RULE_COOKIE).getValue(); long originRate = config.getBroadcastRateLimit(); long updatedRate = config.getBroadcastRateLimit() + 10; expect(ofSwitchService.getActiveSwitch(dpid))... | @VisibleForTesting void processMeter(IOFSwitch sw, OFMeterMod meterMod) { long meterId = meterMod.getMeterId(); OFMeterConfig meterConfig; try { meterConfig = getMeter(sw.getId(), meterId); } catch (SwitchOperationException e) { logger.warn("Meter {} won't be installed on the switch {}: {}", meterId, sw.getId(), e.getM... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @VisibleForTesting void processMeter(IOFSwitch sw, OFMeterMod meterMod) { long meterId = meterMod.getMeterId(); OFMeterConfig meterConfig; try { meterConfig = getMeter(sw.getId(), meterId); } catch (SwitchOperationExcep... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @VisibleForTesting void processMeter(IOFSwitch sw, OFMeterMod meterMod) { long meterId = meterMod.getMeterId(); OFMeterConfig meterConfig; try { meterConfig = getMeter(sw.getId(), meterId); } catch (SwitchOperationExcep... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @VisibleForTesting void processMeter(IOFSwitch sw, OFMeterMod meterMod) { long meterId = meterMod.getMeterId(); OFMeterConfig meterConfig; try { meterConfig = getMeter(sw.getId(), meterId); } catch (SwitchOperationExcep... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @VisibleForTesting void processMeter(IOFSwitch sw, OFMeterMod meterMod) { long meterId = meterMod.getMeterId(); OFMeterConfig meterConfig; try { meterConfig = getMeter(sw.getId(), meterId); } catch (SwitchOperationExcep... |
@Test public void shouldNotInstallMetersIfAlreadyExists() throws Exception { long expectedRate = config.getBroadcastRateLimit(); expect(ofSwitchService.getActiveSwitch(dpid)).andStubReturn(iofSwitch); expect(iofSwitch.getOFFactory()).andStubReturn(ofFactory); expect(iofSwitch.getSwitchDescription()).andStubReturn(switc... | @Override public List<Long> installDefaultRules(final DatapathId dpid) throws SwitchOperationException { List<Long> rules = new ArrayList<>(); rules.add(installDropFlow(dpid)); rules.add(installVerificationRule(dpid, true)); rules.add(installVerificationRule(dpid, false)); rules.add(installDropLoopRule(dpid)); rules.ad... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> installDefaultRules(final DatapathId dpid) throws SwitchOperationException { List<Long> rules = new ArrayList<>(); rules.add(installDropFlow(dpid)); rules.add(installVerificationRule(dpid, tr... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> installDefaultRules(final DatapathId dpid) throws SwitchOperationException { List<Long> rules = new ArrayList<>(); rules.add(installDropFlow(dpid)); rules.add(installVerificationRule(dpid, tr... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> installDefaultRules(final DatapathId dpid) throws SwitchOperationException { List<Long> rules = new ArrayList<>(); rules.add(installDropFlow(dpid)); rules.add(installVerificationRule(dpid, tr... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @Override public List<Long> installDefaultRules(final DatapathId dpid) throws SwitchOperationException { List<Long> rules = new ArrayList<>(); rules.add(installDropFlow(dpid)); rules.add(installVerificationRule(dpid, tr... |
@Test public void shouldPrepareFlowUpdateResultShouldNotUpdateFirstCase() { String flowId = "test_flow_id"; FlowPatch flowDto = FlowPatch.builder() .flowId(flowId) .maxLatency(100L) .pathComputationStrategy(PathComputationStrategy.MAX_LATENCY) .build(); Flow flow = Flow.builder() .flowId(flowId) .srcSwitch(Switch.build... | @VisibleForTesting UpdateFlowResult.UpdateFlowResultBuilder prepareFlowUpdateResult(FlowPatch flowPatch, Flow flow) { boolean updateRequired = updateRequiredByPathComputationStrategy(flowPatch, flow); updateRequired |= updateRequiredBySource(flowPatch, flow); updateRequired |= updateRequiredByDestination(flowPatch, flo... | FlowOperationsService { @VisibleForTesting UpdateFlowResult.UpdateFlowResultBuilder prepareFlowUpdateResult(FlowPatch flowPatch, Flow flow) { boolean updateRequired = updateRequiredByPathComputationStrategy(flowPatch, flow); updateRequired |= updateRequiredBySource(flowPatch, flow); updateRequired |= updateRequiredByDe... | FlowOperationsService { @VisibleForTesting UpdateFlowResult.UpdateFlowResultBuilder prepareFlowUpdateResult(FlowPatch flowPatch, Flow flow) { boolean updateRequired = updateRequiredByPathComputationStrategy(flowPatch, flow); updateRequired |= updateRequiredBySource(flowPatch, flow); updateRequired |= updateRequiredByDe... | FlowOperationsService { @VisibleForTesting UpdateFlowResult.UpdateFlowResultBuilder prepareFlowUpdateResult(FlowPatch flowPatch, Flow flow) { boolean updateRequired = updateRequiredByPathComputationStrategy(flowPatch, flow); updateRequired |= updateRequiredBySource(flowPatch, flow); updateRequired |= updateRequiredByDe... | FlowOperationsService { @VisibleForTesting UpdateFlowResult.UpdateFlowResultBuilder prepareFlowUpdateResult(FlowPatch flowPatch, Flow flow) { boolean updateRequired = updateRequiredByPathComputationStrategy(flowPatch, flow); updateRequired |= updateRequiredBySource(flowPatch, flow); updateRequired |= updateRequiredByDe... |
@Test public void validateRoundTripLatencyGroup() { OFGroupAdd groupAdd = getOfGroupAddInstruction(); assertTrue(runValidateRoundTripLatencyGroup(groupAdd.getBuckets())); } | @VisibleForTesting boolean validateRoundTripLatencyGroup(DatapathId dpId, OFGroupDescStatsEntry groupDesc) { return groupDesc.getBuckets().size() == 2 && validateRoundTripSendToControllerBucket(dpId, groupDesc.getBuckets().get(0)) && validateRoundTripSendBackBucket(groupDesc.getBuckets().get(1)); } | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @VisibleForTesting boolean validateRoundTripLatencyGroup(DatapathId dpId, OFGroupDescStatsEntry groupDesc) { return groupDesc.getBuckets().size() == 2 && validateRoundTripSendToControllerBucket(dpId, groupDesc.getBucket... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @VisibleForTesting boolean validateRoundTripLatencyGroup(DatapathId dpId, OFGroupDescStatsEntry groupDesc) { return groupDesc.getBuckets().size() == 2 && validateRoundTripSendToControllerBucket(dpId, groupDesc.getBucket... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @VisibleForTesting boolean validateRoundTripLatencyGroup(DatapathId dpId, OFGroupDescStatsEntry groupDesc) { return groupDesc.getBuckets().size() == 2 && validateRoundTripSendToControllerBucket(dpId, groupDesc.getBucket... | SwitchManager implements IFloodlightModule, IFloodlightService, ISwitchManager, IOFMessageListener { @VisibleForTesting boolean validateRoundTripLatencyGroup(DatapathId dpId, OFGroupDescStatsEntry groupDesc) { return groupDesc.getBuckets().size() == 2 && validateRoundTripSendToControllerBucket(dpId, groupDesc.getBucket... |
@Test public void sendStatsTest() throws Exception { Builder bucketBuilder = FlowLatencyPacketBucket.newBuilder(); FlowLatencyPacket packet1 = FlowLatencyPacket.newBuilder() .setFlowId("some-flow-id-1") .setDirection(false) .setT0(100) .setT1(150) .setPacketId(1).build(); FlowLatencyPacket packet2 = FlowLatencyPacket.n... | void sendStats(FlowLatencyPacketBucket flowLatencyPacketBucket) throws InvalidProtocolBufferException { long currentTimeMillis = System.currentTimeMillis(); for (FlowLatencyPacket packet : flowLatencyPacketBucket.getPacketList()) { FlowRttStatsData data = new FlowRttStatsData( packet.getFlowId(), FlowDirection.fromBool... | StatsCollector extends Thread { void sendStats(FlowLatencyPacketBucket flowLatencyPacketBucket) throws InvalidProtocolBufferException { long currentTimeMillis = System.currentTimeMillis(); for (FlowLatencyPacket packet : flowLatencyPacketBucket.getPacketList()) { FlowRttStatsData data = new FlowRttStatsData( packet.get... | StatsCollector extends Thread { void sendStats(FlowLatencyPacketBucket flowLatencyPacketBucket) throws InvalidProtocolBufferException { long currentTimeMillis = System.currentTimeMillis(); for (FlowLatencyPacket packet : flowLatencyPacketBucket.getPacketList()) { FlowRttStatsData data = new FlowRttStatsData( packet.get... | StatsCollector extends Thread { void sendStats(FlowLatencyPacketBucket flowLatencyPacketBucket) throws InvalidProtocolBufferException { long currentTimeMillis = System.currentTimeMillis(); for (FlowLatencyPacket packet : flowLatencyPacketBucket.getPacketList()) { FlowRttStatsData data = new FlowRttStatsData( packet.get... | StatsCollector extends Thread { void sendStats(FlowLatencyPacketBucket flowLatencyPacketBucket) throws InvalidProtocolBufferException { long currentTimeMillis = System.currentTimeMillis(); for (FlowLatencyPacket packet : flowLatencyPacketBucket.getPacketList()) { FlowRttStatsData data = new FlowRttStatsData( packet.get... |
@Test public void addFlow() throws Exception { AddFlow addFlow = AddFlow.builder() .flowId("some-flow-id") .encapsulationType(EncapsulationType.VLAN) .tunnelId(1001L) .direction(FlowDirection.REVERSE) .port(42) .build(); String switchId = "00:00:1b:45:18:d6:71:5a"; gate.listen(addFlow, switchId); CommandPacket commandP... | @KafkaHandler void listen(@Payload AddFlow data, @Header(KafkaHeaders.RECEIVED_MESSAGE_KEY) String switchIdKey) { SwitchId switchId = new SwitchId(switchIdKey); Builder builder = CommandPacket.newBuilder(); Flow flow = Flow.newBuilder() .setFlowId(data.getFlowId()) .setEncapsulationType(EncapsulationType.forNumber(data... | Gate { @KafkaHandler void listen(@Payload AddFlow data, @Header(KafkaHeaders.RECEIVED_MESSAGE_KEY) String switchIdKey) { SwitchId switchId = new SwitchId(switchIdKey); Builder builder = CommandPacket.newBuilder(); Flow flow = Flow.newBuilder() .setFlowId(data.getFlowId()) .setEncapsulationType(EncapsulationType.forNumb... | Gate { @KafkaHandler void listen(@Payload AddFlow data, @Header(KafkaHeaders.RECEIVED_MESSAGE_KEY) String switchIdKey) { SwitchId switchId = new SwitchId(switchIdKey); Builder builder = CommandPacket.newBuilder(); Flow flow = Flow.newBuilder() .setFlowId(data.getFlowId()) .setEncapsulationType(EncapsulationType.forNumb... | Gate { @KafkaHandler void listen(@Payload AddFlow data, @Header(KafkaHeaders.RECEIVED_MESSAGE_KEY) String switchIdKey) { SwitchId switchId = new SwitchId(switchIdKey); Builder builder = CommandPacket.newBuilder(); Flow flow = Flow.newBuilder() .setFlowId(data.getFlowId()) .setEncapsulationType(EncapsulationType.forNumb... | Gate { @KafkaHandler void listen(@Payload AddFlow data, @Header(KafkaHeaders.RECEIVED_MESSAGE_KEY) String switchIdKey) { SwitchId switchId = new SwitchId(switchIdKey); Builder builder = CommandPacket.newBuilder(); Flow flow = Flow.newBuilder() .setFlowId(data.getFlowId()) .setEncapsulationType(EncapsulationType.forNumb... |
@Test public void removeFlow() throws Exception { RemoveFlow removeFlow = RemoveFlow.builder() .flowId("some-flow-id") .build(); gate.listen(removeFlow); CommandPacket commandPacket = getCommandPacket(); assertThat(commandPacket.getType()).isEqualTo(Type.REMOVE_FLOW); assertThat(commandPacket.getCommandList()).hasSize(... | @KafkaHandler void listen(@Payload AddFlow data, @Header(KafkaHeaders.RECEIVED_MESSAGE_KEY) String switchIdKey) { SwitchId switchId = new SwitchId(switchIdKey); Builder builder = CommandPacket.newBuilder(); Flow flow = Flow.newBuilder() .setFlowId(data.getFlowId()) .setEncapsulationType(EncapsulationType.forNumber(data... | Gate { @KafkaHandler void listen(@Payload AddFlow data, @Header(KafkaHeaders.RECEIVED_MESSAGE_KEY) String switchIdKey) { SwitchId switchId = new SwitchId(switchIdKey); Builder builder = CommandPacket.newBuilder(); Flow flow = Flow.newBuilder() .setFlowId(data.getFlowId()) .setEncapsulationType(EncapsulationType.forNumb... | Gate { @KafkaHandler void listen(@Payload AddFlow data, @Header(KafkaHeaders.RECEIVED_MESSAGE_KEY) String switchIdKey) { SwitchId switchId = new SwitchId(switchIdKey); Builder builder = CommandPacket.newBuilder(); Flow flow = Flow.newBuilder() .setFlowId(data.getFlowId()) .setEncapsulationType(EncapsulationType.forNumb... | Gate { @KafkaHandler void listen(@Payload AddFlow data, @Header(KafkaHeaders.RECEIVED_MESSAGE_KEY) String switchIdKey) { SwitchId switchId = new SwitchId(switchIdKey); Builder builder = CommandPacket.newBuilder(); Flow flow = Flow.newBuilder() .setFlowId(data.getFlowId()) .setEncapsulationType(EncapsulationType.forNumb... | Gate { @KafkaHandler void listen(@Payload AddFlow data, @Header(KafkaHeaders.RECEIVED_MESSAGE_KEY) String switchIdKey) { SwitchId switchId = new SwitchId(switchIdKey); Builder builder = CommandPacket.newBuilder(); Flow flow = Flow.newBuilder() .setFlowId(data.getFlowId()) .setEncapsulationType(EncapsulationType.forNumb... |
@Test public void clearFlowsTest() throws Exception { Headers headers = Headers.builder().correlationId("some-correlation-id").build(); ClearFlows clearFlows = ClearFlows.builder().headers(headers).build(); gate.listen(clearFlows); CommandPacket commandPacket = getCommandPacket(); assertThat(commandPacket.getType()).is... | @KafkaHandler void listen(@Payload AddFlow data, @Header(KafkaHeaders.RECEIVED_MESSAGE_KEY) String switchIdKey) { SwitchId switchId = new SwitchId(switchIdKey); Builder builder = CommandPacket.newBuilder(); Flow flow = Flow.newBuilder() .setFlowId(data.getFlowId()) .setEncapsulationType(EncapsulationType.forNumber(data... | Gate { @KafkaHandler void listen(@Payload AddFlow data, @Header(KafkaHeaders.RECEIVED_MESSAGE_KEY) String switchIdKey) { SwitchId switchId = new SwitchId(switchIdKey); Builder builder = CommandPacket.newBuilder(); Flow flow = Flow.newBuilder() .setFlowId(data.getFlowId()) .setEncapsulationType(EncapsulationType.forNumb... | Gate { @KafkaHandler void listen(@Payload AddFlow data, @Header(KafkaHeaders.RECEIVED_MESSAGE_KEY) String switchIdKey) { SwitchId switchId = new SwitchId(switchIdKey); Builder builder = CommandPacket.newBuilder(); Flow flow = Flow.newBuilder() .setFlowId(data.getFlowId()) .setEncapsulationType(EncapsulationType.forNumb... | Gate { @KafkaHandler void listen(@Payload AddFlow data, @Header(KafkaHeaders.RECEIVED_MESSAGE_KEY) String switchIdKey) { SwitchId switchId = new SwitchId(switchIdKey); Builder builder = CommandPacket.newBuilder(); Flow flow = Flow.newBuilder() .setFlowId(data.getFlowId()) .setEncapsulationType(EncapsulationType.forNumb... | Gate { @KafkaHandler void listen(@Payload AddFlow data, @Header(KafkaHeaders.RECEIVED_MESSAGE_KEY) String switchIdKey) { SwitchId switchId = new SwitchId(switchIdKey); Builder builder = CommandPacket.newBuilder(); Flow flow = Flow.newBuilder() .setFlowId(data.getFlowId()) .setEncapsulationType(EncapsulationType.forNumb... |
@Test public void listFlowsTest() throws Exception { Builder commandPacketResponseBuilded = CommandPacketResponse.newBuilder(); Flow flow1 = Flow.newBuilder().setFlowId("some-flow-id-01").build(); Flow flow2 = Flow.newBuilder().setFlowId("some-flow-id-02").build(); commandPacketResponseBuilded.addResponse(Any.pack(flow... | @KafkaHandler void listen(@Payload AddFlow data, @Header(KafkaHeaders.RECEIVED_MESSAGE_KEY) String switchIdKey) { SwitchId switchId = new SwitchId(switchIdKey); Builder builder = CommandPacket.newBuilder(); Flow flow = Flow.newBuilder() .setFlowId(data.getFlowId()) .setEncapsulationType(EncapsulationType.forNumber(data... | Gate { @KafkaHandler void listen(@Payload AddFlow data, @Header(KafkaHeaders.RECEIVED_MESSAGE_KEY) String switchIdKey) { SwitchId switchId = new SwitchId(switchIdKey); Builder builder = CommandPacket.newBuilder(); Flow flow = Flow.newBuilder() .setFlowId(data.getFlowId()) .setEncapsulationType(EncapsulationType.forNumb... | Gate { @KafkaHandler void listen(@Payload AddFlow data, @Header(KafkaHeaders.RECEIVED_MESSAGE_KEY) String switchIdKey) { SwitchId switchId = new SwitchId(switchIdKey); Builder builder = CommandPacket.newBuilder(); Flow flow = Flow.newBuilder() .setFlowId(data.getFlowId()) .setEncapsulationType(EncapsulationType.forNumb... | Gate { @KafkaHandler void listen(@Payload AddFlow data, @Header(KafkaHeaders.RECEIVED_MESSAGE_KEY) String switchIdKey) { SwitchId switchId = new SwitchId(switchIdKey); Builder builder = CommandPacket.newBuilder(); Flow flow = Flow.newBuilder() .setFlowId(data.getFlowId()) .setEncapsulationType(EncapsulationType.forNumb... | Gate { @KafkaHandler void listen(@Payload AddFlow data, @Header(KafkaHeaders.RECEIVED_MESSAGE_KEY) String switchIdKey) { SwitchId switchId = new SwitchId(switchIdKey); Builder builder = CommandPacket.newBuilder(); Flow flow = Flow.newBuilder() .setFlowId(data.getFlowId()) .setEncapsulationType(EncapsulationType.forNumb... |
@Test public void pushSettingsTest() throws Exception { PushSettings data = PushSettings.builder() .packetGenerationIntervalInMs(500) .build(); gate.listen(data); CommandPacket commandPacket = getCommandPacket(); assertThat(commandPacket.getType()).isEqualTo(Type.PUSH_SETTINGS); assertThat(commandPacket.getCommandList(... | @KafkaHandler void listen(@Payload AddFlow data, @Header(KafkaHeaders.RECEIVED_MESSAGE_KEY) String switchIdKey) { SwitchId switchId = new SwitchId(switchIdKey); Builder builder = CommandPacket.newBuilder(); Flow flow = Flow.newBuilder() .setFlowId(data.getFlowId()) .setEncapsulationType(EncapsulationType.forNumber(data... | Gate { @KafkaHandler void listen(@Payload AddFlow data, @Header(KafkaHeaders.RECEIVED_MESSAGE_KEY) String switchIdKey) { SwitchId switchId = new SwitchId(switchIdKey); Builder builder = CommandPacket.newBuilder(); Flow flow = Flow.newBuilder() .setFlowId(data.getFlowId()) .setEncapsulationType(EncapsulationType.forNumb... | Gate { @KafkaHandler void listen(@Payload AddFlow data, @Header(KafkaHeaders.RECEIVED_MESSAGE_KEY) String switchIdKey) { SwitchId switchId = new SwitchId(switchIdKey); Builder builder = CommandPacket.newBuilder(); Flow flow = Flow.newBuilder() .setFlowId(data.getFlowId()) .setEncapsulationType(EncapsulationType.forNumb... | Gate { @KafkaHandler void listen(@Payload AddFlow data, @Header(KafkaHeaders.RECEIVED_MESSAGE_KEY) String switchIdKey) { SwitchId switchId = new SwitchId(switchIdKey); Builder builder = CommandPacket.newBuilder(); Flow flow = Flow.newBuilder() .setFlowId(data.getFlowId()) .setEncapsulationType(EncapsulationType.forNumb... | Gate { @KafkaHandler void listen(@Payload AddFlow data, @Header(KafkaHeaders.RECEIVED_MESSAGE_KEY) String switchIdKey) { SwitchId switchId = new SwitchId(switchIdKey); Builder builder = CommandPacket.newBuilder(); Flow flow = Flow.newBuilder() .setFlowId(data.getFlowId()) .setEncapsulationType(EncapsulationType.forNumb... |
@Test public void addSwitch() throws Exception { speakerBolt.addSwitch(switchMessage); assertEquals(1, speakerBolt.switches.size()); ISwitchImpl sw = speakerBolt.switches.get(dpid); assertTrue(sw.isActive()); List<IPortImpl> ports = sw.getPorts(); assertEquals(numOfPorts, ports.size()); for (IPortImpl port : ports) { i... | protected List<Values> addSwitch(AddSwitchCommand data) throws Exception { List<Values> values = new ArrayList<>(); SwitchId dpid = data.getDpid(); if (switches.get(dpid) == null) { ISwitchImpl sw = new ISwitchImpl(dpid, data.getNumOfPorts(), PortStateType.DOWN); switches.put(new SwitchId(sw.getDpid().toString()), sw);... | SpeakerBolt extends BaseRichBolt { protected List<Values> addSwitch(AddSwitchCommand data) throws Exception { List<Values> values = new ArrayList<>(); SwitchId dpid = data.getDpid(); if (switches.get(dpid) == null) { ISwitchImpl sw = new ISwitchImpl(dpid, data.getNumOfPorts(), PortStateType.DOWN); switches.put(new Swit... | SpeakerBolt extends BaseRichBolt { protected List<Values> addSwitch(AddSwitchCommand data) throws Exception { List<Values> values = new ArrayList<>(); SwitchId dpid = data.getDpid(); if (switches.get(dpid) == null) { ISwitchImpl sw = new ISwitchImpl(dpid, data.getNumOfPorts(), PortStateType.DOWN); switches.put(new Swit... | SpeakerBolt extends BaseRichBolt { protected List<Values> addSwitch(AddSwitchCommand data) throws Exception { List<Values> values = new ArrayList<>(); SwitchId dpid = data.getDpid(); if (switches.get(dpid) == null) { ISwitchImpl sw = new ISwitchImpl(dpid, data.getNumOfPorts(), PortStateType.DOWN); switches.put(new Swit... | SpeakerBolt extends BaseRichBolt { protected List<Values> addSwitch(AddSwitchCommand data) throws Exception { List<Values> values = new ArrayList<>(); SwitchId dpid = data.getDpid(); if (switches.get(dpid) == null) { ISwitchImpl sw = new ISwitchImpl(dpid, data.getNumOfPorts(), PortStateType.DOWN); switches.put(new Swit... |
@Test public void testAddSwitchValues() throws Exception { List<Values> values = speakerBolt.addSwitch(switchMessage); assertEquals(3, values.size()); int count = 0; for (Values value : values) { InfoMessage infoMessage = mapper.readValue((String) value.get(1), InfoMessage.class); if (count < 2) { assertThat(infoMessag... | protected List<Values> addSwitch(AddSwitchCommand data) throws Exception { List<Values> values = new ArrayList<>(); SwitchId dpid = data.getDpid(); if (switches.get(dpid) == null) { ISwitchImpl sw = new ISwitchImpl(dpid, data.getNumOfPorts(), PortStateType.DOWN); switches.put(new SwitchId(sw.getDpid().toString()), sw);... | SpeakerBolt extends BaseRichBolt { protected List<Values> addSwitch(AddSwitchCommand data) throws Exception { List<Values> values = new ArrayList<>(); SwitchId dpid = data.getDpid(); if (switches.get(dpid) == null) { ISwitchImpl sw = new ISwitchImpl(dpid, data.getNumOfPorts(), PortStateType.DOWN); switches.put(new Swit... | SpeakerBolt extends BaseRichBolt { protected List<Values> addSwitch(AddSwitchCommand data) throws Exception { List<Values> values = new ArrayList<>(); SwitchId dpid = data.getDpid(); if (switches.get(dpid) == null) { ISwitchImpl sw = new ISwitchImpl(dpid, data.getNumOfPorts(), PortStateType.DOWN); switches.put(new Swit... | SpeakerBolt extends BaseRichBolt { protected List<Values> addSwitch(AddSwitchCommand data) throws Exception { List<Values> values = new ArrayList<>(); SwitchId dpid = data.getDpid(); if (switches.get(dpid) == null) { ISwitchImpl sw = new ISwitchImpl(dpid, data.getNumOfPorts(), PortStateType.DOWN); switches.put(new Swit... | SpeakerBolt extends BaseRichBolt { protected List<Values> addSwitch(AddSwitchCommand data) throws Exception { List<Values> values = new ArrayList<>(); SwitchId dpid = data.getDpid(); if (switches.get(dpid) == null) { ISwitchImpl sw = new ISwitchImpl(dpid, data.getNumOfPorts(), PortStateType.DOWN); switches.put(new Swit... |
@Test public void modState() throws Exception { sw.modState(SwitchChangeType.ACTIVATED); assertTrue(sw.isActive()); sw.modState(SwitchChangeType.DEACTIVATED); assertFalse(sw.isActive()); } | @Override public void modState(SwitchChangeType state) throws SimulatorException { this.state = state; switch (state) { case ADDED: break; case ACTIVATED: activate(); break; case DEACTIVATED: case REMOVED: deactivate(); break; case CHANGED: throw new SimulatorException("Received modState of CHANGED, no idea why"); defa... | ISwitchImpl implements ISwitch { @Override public void modState(SwitchChangeType state) throws SimulatorException { this.state = state; switch (state) { case ADDED: break; case ACTIVATED: activate(); break; case DEACTIVATED: case REMOVED: deactivate(); break; case CHANGED: throw new SimulatorException("Received modStat... | ISwitchImpl implements ISwitch { @Override public void modState(SwitchChangeType state) throws SimulatorException { this.state = state; switch (state) { case ADDED: break; case ACTIVATED: activate(); break; case DEACTIVATED: case REMOVED: deactivate(); break; case CHANGED: throw new SimulatorException("Received modStat... | ISwitchImpl implements ISwitch { @Override public void modState(SwitchChangeType state) throws SimulatorException { this.state = state; switch (state) { case ADDED: break; case ACTIVATED: activate(); break; case DEACTIVATED: case REMOVED: deactivate(); break; case CHANGED: throw new SimulatorException("Received modStat... | ISwitchImpl implements ISwitch { @Override public void modState(SwitchChangeType state) throws SimulatorException { this.state = state; switch (state) { case ADDED: break; case ACTIVATED: activate(); break; case DEACTIVATED: case REMOVED: deactivate(); break; case CHANGED: throw new SimulatorException("Received modStat... |
@Test public void shouldPrepareFlowUpdateResultShouldNotUpdateSecondCase() { String flowId = "test_flow_id"; FlowPatch flowDto = FlowPatch.builder() .flowId(flowId) .build(); Flow flow = Flow.builder() .flowId(flowId) .srcSwitch(Switch.builder().switchId(new SwitchId(1)).build()) .destSwitch(Switch.builder().switchId(n... | @VisibleForTesting UpdateFlowResult.UpdateFlowResultBuilder prepareFlowUpdateResult(FlowPatch flowPatch, Flow flow) { boolean updateRequired = updateRequiredByPathComputationStrategy(flowPatch, flow); updateRequired |= updateRequiredBySource(flowPatch, flow); updateRequired |= updateRequiredByDestination(flowPatch, flo... | FlowOperationsService { @VisibleForTesting UpdateFlowResult.UpdateFlowResultBuilder prepareFlowUpdateResult(FlowPatch flowPatch, Flow flow) { boolean updateRequired = updateRequiredByPathComputationStrategy(flowPatch, flow); updateRequired |= updateRequiredBySource(flowPatch, flow); updateRequired |= updateRequiredByDe... | FlowOperationsService { @VisibleForTesting UpdateFlowResult.UpdateFlowResultBuilder prepareFlowUpdateResult(FlowPatch flowPatch, Flow flow) { boolean updateRequired = updateRequiredByPathComputationStrategy(flowPatch, flow); updateRequired |= updateRequiredBySource(flowPatch, flow); updateRequired |= updateRequiredByDe... | FlowOperationsService { @VisibleForTesting UpdateFlowResult.UpdateFlowResultBuilder prepareFlowUpdateResult(FlowPatch flowPatch, Flow flow) { boolean updateRequired = updateRequiredByPathComputationStrategy(flowPatch, flow); updateRequired |= updateRequiredBySource(flowPatch, flow); updateRequired |= updateRequiredByDe... | FlowOperationsService { @VisibleForTesting UpdateFlowResult.UpdateFlowResultBuilder prepareFlowUpdateResult(FlowPatch flowPatch, Flow flow) { boolean updateRequired = updateRequiredByPathComputationStrategy(flowPatch, flow); updateRequired |= updateRequiredBySource(flowPatch, flow); updateRequired |= updateRequiredByDe... |
@Test public void testSetDpid() { SwitchId newDpid = new SwitchId("01:02:03:04:05:06"); sw.setDpid(newDpid); assertEquals(newDpid.toString(), sw.getDpidAsString()); assertEquals(DatapathId.of(newDpid.toString()), sw.getDpid()); DatapathId dpid = sw.getDpid(); sw.setDpid(dpid); assertEquals(dpid, sw.getDpid()); } | @Override public void setDpid(DatapathId dpid) { this.dpid = dpid; } | ISwitchImpl implements ISwitch { @Override public void setDpid(DatapathId dpid) { this.dpid = dpid; } } | ISwitchImpl implements ISwitch { @Override public void setDpid(DatapathId dpid) { this.dpid = dpid; } ISwitchImpl(); ISwitchImpl(SwitchId dpid); ISwitchImpl(SwitchId dpid, int numOfPorts, PortStateType portState); } | ISwitchImpl implements ISwitch { @Override public void setDpid(DatapathId dpid) { this.dpid = dpid; } ISwitchImpl(); ISwitchImpl(SwitchId dpid); ISwitchImpl(SwitchId dpid, int numOfPorts, PortStateType portState); @Override void modState(SwitchChangeType state); @Override void activate(); @Override void deactivate();... | ISwitchImpl implements ISwitch { @Override public void setDpid(DatapathId dpid) { this.dpid = dpid; } ISwitchImpl(); ISwitchImpl(SwitchId dpid); ISwitchImpl(SwitchId dpid, int numOfPorts, PortStateType portState); @Override void modState(SwitchChangeType state); @Override void activate(); @Override void deactivate();... |
@Test public void addPort() throws Exception { int portNum = sw.getPorts().size(); IPortImpl port = new IPortImpl(sw, PortStateType.UP, portNum); thrown.expect(SimulatorException.class); thrown.expectMessage("Switch already has reached maxPorts"); sw.addPort(port); } | @Override public int addPort(IPortImpl port) throws SimulatorException { if (ports.size() < maxPorts) { ports.add(port); } else { throw new SimulatorException(String.format("Switch already has reached maxPorts of %d" + "", maxPorts)); } return port.getNumber(); } | ISwitchImpl implements ISwitch { @Override public int addPort(IPortImpl port) throws SimulatorException { if (ports.size() < maxPorts) { ports.add(port); } else { throw new SimulatorException(String.format("Switch already has reached maxPorts of %d" + "", maxPorts)); } return port.getNumber(); } } | ISwitchImpl implements ISwitch { @Override public int addPort(IPortImpl port) throws SimulatorException { if (ports.size() < maxPorts) { ports.add(port); } else { throw new SimulatorException(String.format("Switch already has reached maxPorts of %d" + "", maxPorts)); } return port.getNumber(); } ISwitchImpl(); ISwitch... | ISwitchImpl implements ISwitch { @Override public int addPort(IPortImpl port) throws SimulatorException { if (ports.size() < maxPorts) { ports.add(port); } else { throw new SimulatorException(String.format("Switch already has reached maxPorts of %d" + "", maxPorts)); } return port.getNumber(); } ISwitchImpl(); ISwitch... | ISwitchImpl implements ISwitch { @Override public int addPort(IPortImpl port) throws SimulatorException { if (ports.size() < maxPorts) { ports.add(port); } else { throw new SimulatorException(String.format("Switch already has reached maxPorts of %d" + "", maxPorts)); } return port.getNumber(); } ISwitchImpl(); ISwitch... |
@Test public void getPort() throws Exception { int numOfPorts = sw.getPorts().size(); assertEquals(1, sw.getPort(1).getNumber()); thrown.expect(SimulatorException.class); thrown.expectMessage(String.format("Port %d is not defined on %s", numOfPorts, sw.getDpidAsString())); sw.getPort(numOfPorts); } | @Override public IPortImpl getPort(int portNum) throws SimulatorException { try { return ports.get(portNum); } catch (IndexOutOfBoundsException e) { throw new SimulatorException(String.format("Port %d is not defined on %s", portNum, getDpidAsString())); } } | ISwitchImpl implements ISwitch { @Override public IPortImpl getPort(int portNum) throws SimulatorException { try { return ports.get(portNum); } catch (IndexOutOfBoundsException e) { throw new SimulatorException(String.format("Port %d is not defined on %s", portNum, getDpidAsString())); } } } | ISwitchImpl implements ISwitch { @Override public IPortImpl getPort(int portNum) throws SimulatorException { try { return ports.get(portNum); } catch (IndexOutOfBoundsException e) { throw new SimulatorException(String.format("Port %d is not defined on %s", portNum, getDpidAsString())); } } ISwitchImpl(); ISwitchImpl(S... | ISwitchImpl implements ISwitch { @Override public IPortImpl getPort(int portNum) throws SimulatorException { try { return ports.get(portNum); } catch (IndexOutOfBoundsException e) { throw new SimulatorException(String.format("Port %d is not defined on %s", portNum, getDpidAsString())); } } ISwitchImpl(); ISwitchImpl(S... | ISwitchImpl implements ISwitch { @Override public IPortImpl getPort(int portNum) throws SimulatorException { try { return ports.get(portNum); } catch (IndexOutOfBoundsException e) { throw new SimulatorException(String.format("Port %d is not defined on %s", portNum, getDpidAsString())); } } ISwitchImpl(); ISwitchImpl(S... |
@Test public void getFlow() { } | @Override public IFlow getFlow(long cookie) throws SimulatorException { try { return flows.get(cookie); } catch (IndexOutOfBoundsException e) { throw new SimulatorException(String.format("Flow %d could not be found.", cookie)); } } | ISwitchImpl implements ISwitch { @Override public IFlow getFlow(long cookie) throws SimulatorException { try { return flows.get(cookie); } catch (IndexOutOfBoundsException e) { throw new SimulatorException(String.format("Flow %d could not be found.", cookie)); } } } | ISwitchImpl implements ISwitch { @Override public IFlow getFlow(long cookie) throws SimulatorException { try { return flows.get(cookie); } catch (IndexOutOfBoundsException e) { throw new SimulatorException(String.format("Flow %d could not be found.", cookie)); } } ISwitchImpl(); ISwitchImpl(SwitchId dpid); ISwitchImp... | ISwitchImpl implements ISwitch { @Override public IFlow getFlow(long cookie) throws SimulatorException { try { return flows.get(cookie); } catch (IndexOutOfBoundsException e) { throw new SimulatorException(String.format("Flow %d could not be found.", cookie)); } } ISwitchImpl(); ISwitchImpl(SwitchId dpid); ISwitchImp... | ISwitchImpl implements ISwitch { @Override public IFlow getFlow(long cookie) throws SimulatorException { try { return flows.get(cookie); } catch (IndexOutOfBoundsException e) { throw new SimulatorException(String.format("Flow %d could not be found.", cookie)); } } ISwitchImpl(); ISwitchImpl(SwitchId dpid); ISwitchImp... |
@Test public void addFlow() { } | @Override public void addFlow(IFlow flow) throws SimulatorException { if (flows.containsKey(flow.getCookie())) { throw new SimulatorException(String.format("Flow %s already exists.", flow.toString())); } flows.put(flow.getCookie(), flow); } | ISwitchImpl implements ISwitch { @Override public void addFlow(IFlow flow) throws SimulatorException { if (flows.containsKey(flow.getCookie())) { throw new SimulatorException(String.format("Flow %s already exists.", flow.toString())); } flows.put(flow.getCookie(), flow); } } | ISwitchImpl implements ISwitch { @Override public void addFlow(IFlow flow) throws SimulatorException { if (flows.containsKey(flow.getCookie())) { throw new SimulatorException(String.format("Flow %s already exists.", flow.toString())); } flows.put(flow.getCookie(), flow); } ISwitchImpl(); ISwitchImpl(SwitchId dpid); I... | ISwitchImpl implements ISwitch { @Override public void addFlow(IFlow flow) throws SimulatorException { if (flows.containsKey(flow.getCookie())) { throw new SimulatorException(String.format("Flow %s already exists.", flow.toString())); } flows.put(flow.getCookie(), flow); } ISwitchImpl(); ISwitchImpl(SwitchId dpid); I... | ISwitchImpl implements ISwitch { @Override public void addFlow(IFlow flow) throws SimulatorException { if (flows.containsKey(flow.getCookie())) { throw new SimulatorException(String.format("Flow %s already exists.", flow.toString())); } flows.put(flow.getCookie(), flow); } ISwitchImpl(); ISwitchImpl(SwitchId dpid); I... |
@Test public void modFlow() { } | @Override public void modFlow(IFlow flow) throws SimulatorException { delFlow(flow.getCookie()); addFlow(flow); } | ISwitchImpl implements ISwitch { @Override public void modFlow(IFlow flow) throws SimulatorException { delFlow(flow.getCookie()); addFlow(flow); } } | ISwitchImpl implements ISwitch { @Override public void modFlow(IFlow flow) throws SimulatorException { delFlow(flow.getCookie()); addFlow(flow); } ISwitchImpl(); ISwitchImpl(SwitchId dpid); ISwitchImpl(SwitchId dpid, int numOfPorts, PortStateType portState); } | ISwitchImpl implements ISwitch { @Override public void modFlow(IFlow flow) throws SimulatorException { delFlow(flow.getCookie()); addFlow(flow); } ISwitchImpl(); ISwitchImpl(SwitchId dpid); ISwitchImpl(SwitchId dpid, int numOfPorts, PortStateType portState); @Override void modState(SwitchChangeType state); @Override ... | ISwitchImpl implements ISwitch { @Override public void modFlow(IFlow flow) throws SimulatorException { delFlow(flow.getCookie()); addFlow(flow); } ISwitchImpl(); ISwitchImpl(SwitchId dpid); ISwitchImpl(SwitchId dpid, int numOfPorts, PortStateType portState); @Override void modState(SwitchChangeType state); @Override ... |
@Test public void delFlow() { } | @Override public void delFlow(long cookie) { flows.remove(cookie); } | ISwitchImpl implements ISwitch { @Override public void delFlow(long cookie) { flows.remove(cookie); } } | ISwitchImpl implements ISwitch { @Override public void delFlow(long cookie) { flows.remove(cookie); } ISwitchImpl(); ISwitchImpl(SwitchId dpid); ISwitchImpl(SwitchId dpid, int numOfPorts, PortStateType portState); } | ISwitchImpl implements ISwitch { @Override public void delFlow(long cookie) { flows.remove(cookie); } ISwitchImpl(); ISwitchImpl(SwitchId dpid); ISwitchImpl(SwitchId dpid, int numOfPorts, PortStateType portState); @Override void modState(SwitchChangeType state); @Override void activate(); @Override void deactivate();... | ISwitchImpl implements ISwitch { @Override public void delFlow(long cookie) { flows.remove(cookie); } ISwitchImpl(); ISwitchImpl(SwitchId dpid); ISwitchImpl(SwitchId dpid, int numOfPorts, PortStateType portState); @Override void modState(SwitchChangeType state); @Override void activate(); @Override void deactivate();... |
@Test public void getPortStats() { } | @Override public List<PortStatsEntry> getPortStats() { return null; } | ISwitchImpl implements ISwitch { @Override public List<PortStatsEntry> getPortStats() { return null; } } | ISwitchImpl implements ISwitch { @Override public List<PortStatsEntry> getPortStats() { return null; } ISwitchImpl(); ISwitchImpl(SwitchId dpid); ISwitchImpl(SwitchId dpid, int numOfPorts, PortStateType portState); } | ISwitchImpl implements ISwitch { @Override public List<PortStatsEntry> getPortStats() { return null; } ISwitchImpl(); ISwitchImpl(SwitchId dpid); ISwitchImpl(SwitchId dpid, int numOfPorts, PortStateType portState); @Override void modState(SwitchChangeType state); @Override void activate(); @Override void deactivate()... | ISwitchImpl implements ISwitch { @Override public List<PortStatsEntry> getPortStats() { return null; } ISwitchImpl(); ISwitchImpl(SwitchId dpid); ISwitchImpl(SwitchId dpid, int numOfPorts, PortStateType portState); @Override void modState(SwitchChangeType state); @Override void activate(); @Override void deactivate()... |
@Test public void isActiveIsl() throws Exception { port.enable(); port.setPeerSwitch("00:00:00:00:00:01"); port.setPeerPortNum(10); assertTrue(port.isActiveIsl()); port.disable(); assertFalse(port.isActiveIsl()); port.enable(); port.block(); assertFalse(port.isActiveIsl()); port.unblock(); assertTrue(port.isActiveIsl()... | @Override public boolean isActiveIsl() { return (peerSwitch != null && peerPortNum >= 0 && isActive && isForwarding); } | IPortImpl implements IPort { @Override public boolean isActiveIsl() { return (peerSwitch != null && peerPortNum >= 0 && isActive && isForwarding); } } | IPortImpl implements IPort { @Override public boolean isActiveIsl() { return (peerSwitch != null && peerPortNum >= 0 && isActive && isForwarding); } IPortImpl(ISwitchImpl sw, PortStateType state, int portNumber); } | IPortImpl implements IPort { @Override public boolean isActiveIsl() { return (peerSwitch != null && peerPortNum >= 0 && isActive && isForwarding); } IPortImpl(ISwitchImpl sw, PortStateType state, int portNumber); InfoMessage makePorChangetMessage(); @Override void enable(); @Override void disable(); @Override void bloc... | IPortImpl implements IPort { @Override public boolean isActiveIsl() { return (peerSwitch != null && peerPortNum >= 0 && isActive && isForwarding); } IPortImpl(ISwitchImpl sw, PortStateType state, int portNumber); InfoMessage makePorChangetMessage(); @Override void enable(); @Override void disable(); @Override void bloc... |
@Test public void getStats() throws Exception { } | @Override public PortStatsEntry getStats() { if (isForwarding && isActive) { this.rxPackets += rand.nextInt(MAX_LARGE); this.txPackets += rand.nextInt(MAX_LARGE); this.rxBytes += rand.nextInt(MAX_LARGE); this.txBytes += rand.nextInt(MAX_LARGE); this.rxDropped += rand.nextInt(MAX_SMALL); this.txDropped += rand.nextInt(M... | IPortImpl implements IPort { @Override public PortStatsEntry getStats() { if (isForwarding && isActive) { this.rxPackets += rand.nextInt(MAX_LARGE); this.txPackets += rand.nextInt(MAX_LARGE); this.rxBytes += rand.nextInt(MAX_LARGE); this.txBytes += rand.nextInt(MAX_LARGE); this.rxDropped += rand.nextInt(MAX_SMALL); thi... | IPortImpl implements IPort { @Override public PortStatsEntry getStats() { if (isForwarding && isActive) { this.rxPackets += rand.nextInt(MAX_LARGE); this.txPackets += rand.nextInt(MAX_LARGE); this.rxBytes += rand.nextInt(MAX_LARGE); this.txBytes += rand.nextInt(MAX_LARGE); this.rxDropped += rand.nextInt(MAX_SMALL); thi... | IPortImpl implements IPort { @Override public PortStatsEntry getStats() { if (isForwarding && isActive) { this.rxPackets += rand.nextInt(MAX_LARGE); this.txPackets += rand.nextInt(MAX_LARGE); this.rxBytes += rand.nextInt(MAX_LARGE); this.txBytes += rand.nextInt(MAX_LARGE); this.rxDropped += rand.nextInt(MAX_SMALL); thi... | IPortImpl implements IPort { @Override public PortStatsEntry getStats() { if (isForwarding && isActive) { this.rxPackets += rand.nextInt(MAX_LARGE); this.txPackets += rand.nextInt(MAX_LARGE); this.rxBytes += rand.nextInt(MAX_LARGE); this.txBytes += rand.nextInt(MAX_LARGE); this.rxDropped += rand.nextInt(MAX_SMALL); thi... |
@Test public void shouldPrepareFlowUpdateResultWithNeedUpdateFlag() { String flowId = "test_flow_id"; Flow flow = Flow.builder() .flowId(flowId) .srcSwitch(Switch.builder().switchId(new SwitchId(1)).build()) .srcPort(2) .srcVlan(3) .destSwitch(Switch.builder().switchId(new SwitchId(2)).build()) .destPort(4) .destVlan(5... | @VisibleForTesting UpdateFlowResult.UpdateFlowResultBuilder prepareFlowUpdateResult(FlowPatch flowPatch, Flow flow) { boolean updateRequired = updateRequiredByPathComputationStrategy(flowPatch, flow); updateRequired |= updateRequiredBySource(flowPatch, flow); updateRequired |= updateRequiredByDestination(flowPatch, flo... | FlowOperationsService { @VisibleForTesting UpdateFlowResult.UpdateFlowResultBuilder prepareFlowUpdateResult(FlowPatch flowPatch, Flow flow) { boolean updateRequired = updateRequiredByPathComputationStrategy(flowPatch, flow); updateRequired |= updateRequiredBySource(flowPatch, flow); updateRequired |= updateRequiredByDe... | FlowOperationsService { @VisibleForTesting UpdateFlowResult.UpdateFlowResultBuilder prepareFlowUpdateResult(FlowPatch flowPatch, Flow flow) { boolean updateRequired = updateRequiredByPathComputationStrategy(flowPatch, flow); updateRequired |= updateRequiredBySource(flowPatch, flow); updateRequired |= updateRequiredByDe... | FlowOperationsService { @VisibleForTesting UpdateFlowResult.UpdateFlowResultBuilder prepareFlowUpdateResult(FlowPatch flowPatch, Flow flow) { boolean updateRequired = updateRequiredByPathComputationStrategy(flowPatch, flow); updateRequired |= updateRequiredBySource(flowPatch, flow); updateRequired |= updateRequiredByDe... | FlowOperationsService { @VisibleForTesting UpdateFlowResult.UpdateFlowResultBuilder prepareFlowUpdateResult(FlowPatch flowPatch, Flow flow) { boolean updateRequired = updateRequiredByPathComputationStrategy(flowPatch, flow); updateRequired |= updateRequiredBySource(flowPatch, flow); updateRequired |= updateRequiredByDe... |
@Test public void shouldSuccessfulSendDatapoint() { Datapoint datapoint = new Datapoint("metric", timestamp, Collections.emptyMap(), 123); MockedSources sources = new MockedSources(); Testing.withTrackedCluster(clusterParam, (cluster) -> { OpenTsdbTopology topology = new OpenTsdbTopology(makeLaunchEnvironment()); sourc... | @Override public StormTopology createTopology() { logger.info("Creating OpenTsdbTopology - {}", topologyName); TopologyBuilder tb = new TopologyBuilder(); attachInput(tb); OpenTsdbConfig openTsdbConfig = topologyConfig.getOpenTsdbConfig(); tb.setBolt(OTSDB_PARSE_BOLT_ID, new DatapointParseBolt(), openTsdbConfig.getData... | OpenTsdbTopology extends AbstractTopology<OpenTsdbTopologyConfig> { @Override public StormTopology createTopology() { logger.info("Creating OpenTsdbTopology - {}", topologyName); TopologyBuilder tb = new TopologyBuilder(); attachInput(tb); OpenTsdbConfig openTsdbConfig = topologyConfig.getOpenTsdbConfig(); tb.setBolt(O... | OpenTsdbTopology extends AbstractTopology<OpenTsdbTopologyConfig> { @Override public StormTopology createTopology() { logger.info("Creating OpenTsdbTopology - {}", topologyName); TopologyBuilder tb = new TopologyBuilder(); attachInput(tb); OpenTsdbConfig openTsdbConfig = topologyConfig.getOpenTsdbConfig(); tb.setBolt(O... | OpenTsdbTopology extends AbstractTopology<OpenTsdbTopologyConfig> { @Override public StormTopology createTopology() { logger.info("Creating OpenTsdbTopology - {}", topologyName); TopologyBuilder tb = new TopologyBuilder(); attachInput(tb); OpenTsdbConfig openTsdbConfig = topologyConfig.getOpenTsdbConfig(); tb.setBolt(O... | OpenTsdbTopology extends AbstractTopology<OpenTsdbTopologyConfig> { @Override public StormTopology createTopology() { logger.info("Creating OpenTsdbTopology - {}", topologyName); TopologyBuilder tb = new TopologyBuilder(); attachInput(tb); OpenTsdbConfig openTsdbConfig = topologyConfig.getOpenTsdbConfig(); tb.setBolt(O... |
@Test public void shouldSendDatapointRequestsOnlyOnce() throws Exception { Datapoint datapoint = new Datapoint("metric", timestamp, Collections.emptyMap(), 123); MockedSources sources = new MockedSources(); Testing.withTrackedCluster(clusterParam, (cluster) -> { OpenTsdbTopology topology = new OpenTsdbTopology(makeLaun... | @Override public StormTopology createTopology() { logger.info("Creating OpenTsdbTopology - {}", topologyName); TopologyBuilder tb = new TopologyBuilder(); attachInput(tb); OpenTsdbConfig openTsdbConfig = topologyConfig.getOpenTsdbConfig(); tb.setBolt(OTSDB_PARSE_BOLT_ID, new DatapointParseBolt(), openTsdbConfig.getData... | OpenTsdbTopology extends AbstractTopology<OpenTsdbTopologyConfig> { @Override public StormTopology createTopology() { logger.info("Creating OpenTsdbTopology - {}", topologyName); TopologyBuilder tb = new TopologyBuilder(); attachInput(tb); OpenTsdbConfig openTsdbConfig = topologyConfig.getOpenTsdbConfig(); tb.setBolt(O... | OpenTsdbTopology extends AbstractTopology<OpenTsdbTopologyConfig> { @Override public StormTopology createTopology() { logger.info("Creating OpenTsdbTopology - {}", topologyName); TopologyBuilder tb = new TopologyBuilder(); attachInput(tb); OpenTsdbConfig openTsdbConfig = topologyConfig.getOpenTsdbConfig(); tb.setBolt(O... | OpenTsdbTopology extends AbstractTopology<OpenTsdbTopologyConfig> { @Override public StormTopology createTopology() { logger.info("Creating OpenTsdbTopology - {}", topologyName); TopologyBuilder tb = new TopologyBuilder(); attachInput(tb); OpenTsdbConfig openTsdbConfig = topologyConfig.getOpenTsdbConfig(); tb.setBolt(O... | OpenTsdbTopology extends AbstractTopology<OpenTsdbTopologyConfig> { @Override public StormTopology createTopology() { logger.info("Creating OpenTsdbTopology - {}", topologyName); TopologyBuilder tb = new TopologyBuilder(); attachInput(tb); OpenTsdbConfig openTsdbConfig = topologyConfig.getOpenTsdbConfig(); tb.setBolt(O... |
@Test public void shouldSendDatapointRequestsTwice() throws Exception { Datapoint datapoint1 = new Datapoint("metric", timestamp, Collections.emptyMap(), 123); Datapoint datapoint2 = new Datapoint("metric", timestamp, Collections.emptyMap(), 456); MockedSources sources = new MockedSources(); Testing.withTrackedCluster(... | @Override public StormTopology createTopology() { logger.info("Creating OpenTsdbTopology - {}", topologyName); TopologyBuilder tb = new TopologyBuilder(); attachInput(tb); OpenTsdbConfig openTsdbConfig = topologyConfig.getOpenTsdbConfig(); tb.setBolt(OTSDB_PARSE_BOLT_ID, new DatapointParseBolt(), openTsdbConfig.getData... | OpenTsdbTopology extends AbstractTopology<OpenTsdbTopologyConfig> { @Override public StormTopology createTopology() { logger.info("Creating OpenTsdbTopology - {}", topologyName); TopologyBuilder tb = new TopologyBuilder(); attachInput(tb); OpenTsdbConfig openTsdbConfig = topologyConfig.getOpenTsdbConfig(); tb.setBolt(O... | OpenTsdbTopology extends AbstractTopology<OpenTsdbTopologyConfig> { @Override public StormTopology createTopology() { logger.info("Creating OpenTsdbTopology - {}", topologyName); TopologyBuilder tb = new TopologyBuilder(); attachInput(tb); OpenTsdbConfig openTsdbConfig = topologyConfig.getOpenTsdbConfig(); tb.setBolt(O... | OpenTsdbTopology extends AbstractTopology<OpenTsdbTopologyConfig> { @Override public StormTopology createTopology() { logger.info("Creating OpenTsdbTopology - {}", topologyName); TopologyBuilder tb = new TopologyBuilder(); attachInput(tb); OpenTsdbConfig openTsdbConfig = topologyConfig.getOpenTsdbConfig(); tb.setBolt(O... | OpenTsdbTopology extends AbstractTopology<OpenTsdbTopologyConfig> { @Override public StormTopology createTopology() { logger.info("Creating OpenTsdbTopology - {}", topologyName); TopologyBuilder tb = new TopologyBuilder(); attachInput(tb); OpenTsdbConfig openTsdbConfig = topologyConfig.getOpenTsdbConfig(); tb.setBolt(O... |
@Test public void testCommandBuilder() { List<BaseFlow> response = commandBuilder .buildCommandsToSyncMissingRules(SWITCH_ID_B, Stream.of(1L, 2L, 3L, 4L) .map(effectiveId -> new FlowSegmentCookie(FlowPathDirection.FORWARD, effectiveId)) .map(Cookie::getValue) .collect(Collectors.toList())); assertEquals(4, response.siz... | @Override public List<BaseFlow> buildCommandsToSyncMissingRules(SwitchId switchId, List<Long> switchRules) { List<BaseFlow> commands = new ArrayList<>(buildInstallDefaultRuleCommands(switchId, switchRules)); commands.addAll(buildInstallFlowSharedRuleCommands(switchId, switchRules)); flowPathRepository.findBySegmentDest... | CommandBuilderImpl implements CommandBuilder { @Override public List<BaseFlow> buildCommandsToSyncMissingRules(SwitchId switchId, List<Long> switchRules) { List<BaseFlow> commands = new ArrayList<>(buildInstallDefaultRuleCommands(switchId, switchRules)); commands.addAll(buildInstallFlowSharedRuleCommands(switchId, swit... | CommandBuilderImpl implements CommandBuilder { @Override public List<BaseFlow> buildCommandsToSyncMissingRules(SwitchId switchId, List<Long> switchRules) { List<BaseFlow> commands = new ArrayList<>(buildInstallDefaultRuleCommands(switchId, switchRules)); commands.addAll(buildInstallFlowSharedRuleCommands(switchId, swit... | CommandBuilderImpl implements CommandBuilder { @Override public List<BaseFlow> buildCommandsToSyncMissingRules(SwitchId switchId, List<Long> switchRules) { List<BaseFlow> commands = new ArrayList<>(buildInstallDefaultRuleCommands(switchId, switchRules)); commands.addAll(buildInstallFlowSharedRuleCommands(switchId, swit... | CommandBuilderImpl implements CommandBuilder { @Override public List<BaseFlow> buildCommandsToSyncMissingRules(SwitchId switchId, List<Long> switchRules) { List<BaseFlow> commands = new ArrayList<>(buildInstallDefaultRuleCommands(switchId, switchRules)); commands.addAll(buildInstallFlowSharedRuleCommands(switchId, swit... |
@Test public void shouldBuildRemoveFlowWithoutMeterFromFlowEntryWithTransitVlanEncapsulation() { Long cookie = new FlowSegmentCookie(FlowPathDirection.FORWARD, 1).getValue(); String inPort = "1"; String inVlan = "10"; String outPort = "2"; FlowEntry flowEntry = buildFlowEntry(cookie, inPort, inVlan, outPort, null, fals... | @VisibleForTesting RemoveFlow buildRemoveFlowWithoutMeterFromFlowEntry(SwitchId switchId, FlowEntry entry) { Optional<FlowMatchField> entryMatch = Optional.ofNullable(entry.getMatch()); Optional<FlowInstructions> instructions = Optional.ofNullable(entry.getInstructions()); Optional<FlowApplyActions> applyActions = inst... | CommandBuilderImpl implements CommandBuilder { @VisibleForTesting RemoveFlow buildRemoveFlowWithoutMeterFromFlowEntry(SwitchId switchId, FlowEntry entry) { Optional<FlowMatchField> entryMatch = Optional.ofNullable(entry.getMatch()); Optional<FlowInstructions> instructions = Optional.ofNullable(entry.getInstructions());... | CommandBuilderImpl implements CommandBuilder { @VisibleForTesting RemoveFlow buildRemoveFlowWithoutMeterFromFlowEntry(SwitchId switchId, FlowEntry entry) { Optional<FlowMatchField> entryMatch = Optional.ofNullable(entry.getMatch()); Optional<FlowInstructions> instructions = Optional.ofNullable(entry.getInstructions());... | CommandBuilderImpl implements CommandBuilder { @VisibleForTesting RemoveFlow buildRemoveFlowWithoutMeterFromFlowEntry(SwitchId switchId, FlowEntry entry) { Optional<FlowMatchField> entryMatch = Optional.ofNullable(entry.getMatch()); Optional<FlowInstructions> instructions = Optional.ofNullable(entry.getInstructions());... | CommandBuilderImpl implements CommandBuilder { @VisibleForTesting RemoveFlow buildRemoveFlowWithoutMeterFromFlowEntry(SwitchId switchId, FlowEntry entry) { Optional<FlowMatchField> entryMatch = Optional.ofNullable(entry.getMatch()); Optional<FlowInstructions> instructions = Optional.ofNullable(entry.getInstructions());... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.