16 package org.openkilda.floodlight.switchmanager;
18 import static java.util.Collections.emptySet;
19 import static java.util.Collections.singletonList;
20 import static org.easymock.EasyMock.anyLong;
21 import static org.easymock.EasyMock.anyObject;
22 import static org.easymock.EasyMock.capture;
23 import static org.easymock.EasyMock.createMock;
24 import static org.easymock.EasyMock.expect;
25 import static org.easymock.EasyMock.expectLastCall;
26 import static org.easymock.EasyMock.mock;
27 import static org.easymock.EasyMock.replay;
28 import static org.hamcrest.CoreMatchers.equalTo;
29 import static org.hamcrest.CoreMatchers.hasItem;
30 import static org.hamcrest.MatcherAssert.assertThat;
31 import static org.hamcrest.Matchers.containsInAnyOrder;
32 import static org.hamcrest.beans.HasPropertyWithValue.hasProperty;
33 import static org.hamcrest.core.Every.everyItem;
34 import static org.junit.Assert.assertEquals;
35 import static org.junit.Assert.assertNull;
49 import com.google.common.util.concurrent.Futures;
50 import com.google.common.util.concurrent.ListenableFuture;
51 import net.floodlightcontroller.core.IOFSwitch;
52 import net.floodlightcontroller.core.SwitchDescription;
53 import net.floodlightcontroller.core.internal.IOFSwitchService;
54 import net.floodlightcontroller.core.module.FloodlightModuleContext;
55 import net.floodlightcontroller.core.module.FloodlightModuleException;
56 import net.floodlightcontroller.restserver.IRestApiService;
57 import org.easymock.Capture;
58 import org.easymock.CaptureType;
59 import org.easymock.EasyMock;
60 import org.junit.Before;
61 import org.junit.Test;
66 import org.projectfloodlight.openflow.protocol.OFBarrierReply;
67 import org.projectfloodlight.openflow.protocol.OFBarrierRequest;
68 import org.projectfloodlight.openflow.protocol.OFFlowMod;
69 import org.projectfloodlight.openflow.protocol.OFFlowModCommand;
70 import org.projectfloodlight.openflow.protocol.OFFlowStatsEntry;
71 import org.projectfloodlight.openflow.protocol.OFFlowStatsReply;
72 import org.projectfloodlight.openflow.protocol.OFFlowStatsRequest;
73 import org.projectfloodlight.openflow.protocol.OFMeterMod;
74 import org.projectfloodlight.openflow.protocol.OFMeterModCommand;
75 import org.projectfloodlight.openflow.protocol.match.MatchField;
76 import org.projectfloodlight.openflow.types.DatapathId;
77 import org.projectfloodlight.openflow.types.U64;
79 import java.util.Arrays;
80 import java.util.List;
81 import java.util.concurrent.ExecutionException;
82 import java.util.concurrent.TimeoutException;
83 import java.util.stream.Collectors;
87 private static final FloodlightModuleContext context =
new FloodlightModuleContext();
88 private static final long cookie = 123L;
89 private static final String cookieHex =
"7B";
91 private IOFSwitchService ofSwitchService;
92 private IRestApiService restApiService;
93 private IOFSwitch iofSwitch;
94 private SwitchDescription switchDescription;
95 private DatapathId dpid;
98 public void setUp() throws FloodlightModuleException {
99 ofSwitchService = createMock(IOFSwitchService.class);
100 restApiService = createMock(IRestApiService.class);
101 iofSwitch = createMock(IOFSwitch.class);
102 switchDescription = createMock(SwitchDescription.class);
103 dpid = createMock(DatapathId.class);
105 context.addService(IRestApiService.class, restApiService);
106 context.addService(IOFSwitchService.class, ofSwitchService);
109 switchManager.
init(context);
119 Capture<OFFlowMod> capture = prepareForInstallTest();
131 Capture<OFFlowMod> capture = prepareForInstallTest();
137 scheme.
ingressPopFlowMod(inputPort, outputPort, inputVlanId, transitVlanId, meterId, cookie),
143 Capture<OFFlowMod> capture = prepareForInstallTest();
155 Capture<OFFlowMod> capture = prepareForInstallTest();
167 Capture<OFFlowMod> capture = prepareForInstallTest();
179 Capture<OFFlowMod> capture = prepareForInstallTest();
185 scheme.
egressPushFlowMod(inputPort, outputPort, transitVlanId, outputVlanId, cookie),
191 Capture<OFFlowMod> capture = prepareForInstallTest();
203 Capture<OFFlowMod> capture = prepareForInstallTest();
215 Capture<OFFlowMod> capture = prepareForInstallTest();
217 switchManager.
installTransitFlow(dpid, cookieHex, cookie, inputPort, outputPort, transitVlanId);
220 scheme.
transitFlowMod(inputPort, outputPort, transitVlanId, cookie),
226 Capture<OFFlowMod> capture = prepareForInstallTest();
238 Capture<OFFlowMod> capture = prepareForInstallTest();
250 Capture<OFFlowMod> capture = prepareForInstallTest();
262 Capture<OFFlowMod> capture = prepareForInstallTest();
284 expect(ofSwitchService.getSwitch(dpid)).andStubReturn(iofSwitch);
285 expect(iofSwitch.getOFFactory()).andStubReturn(ofFactory);
286 expect(iofSwitch.getSwitchDescription()).andStubReturn(switchDescription);
287 expect(switchDescription.getManufacturerDescription()).andStubReturn(
"");
289 expect(iofSwitch.write(scheme.
installMeter(bandwidth, burstSize, meterId))).andReturn(
true);
290 expect(iofSwitch.writeRequest(anyObject(OFBarrierRequest.class)))
291 .andReturn(Futures.immediateFuture(createMock(OFBarrierReply.class)));
293 replay(ofSwitchService);
295 replay(switchDescription);
297 switchManager.
installMeter(dpid, bandwidth, burstSize, meterId);
302 final Capture<OFMeterMod> capture = prepareForMeterTest();
304 final OFMeterMod meterMod = capture.getValue();
305 assertEquals(meterMod.getCommand(), OFMeterModCommand.DELETE);
306 assertEquals(meterMod.getMeterId(), meterId);
312 expect(ofSwitchService.getSwitch(dpid)).andStubReturn(iofSwitch);
313 expect(iofSwitch.getOFFactory()).andStubReturn(ofFactory);
315 mockFlowStatsRequest(cookie, DROP_RULE_COOKIE, VERIFICATION_BROADCAST_RULE_COOKIE,
316 VERIFICATION_UNICAST_RULE_COOKIE);
318 Capture<OFFlowMod> capture = EasyMock.newCapture();
319 expect(iofSwitch.write(capture(capture))).andReturn(
true);
321 mockBarrierRequest();
322 mockFlowStatsRequest(DROP_RULE_COOKIE, VERIFICATION_BROADCAST_RULE_COOKIE, VERIFICATION_UNICAST_RULE_COOKIE);
325 replay(ofSwitchService, iofSwitch);
331 final OFFlowMod actual = capture.getValue();
332 assertEquals(OFFlowModCommand.DELETE, actual.getCommand());
333 assertNull(actual.getMatch().get(MatchField.IN_PORT));
334 assertNull(actual.getMatch().get(MatchField.VLAN_VID));
335 assertEquals(
"any", actual.getOutPort().toString());
336 assertEquals(0, actual.getInstructions().size());
337 assertEquals(cookie, actual.getCookie().getValue());
338 assertEquals(U64.NO_MASK, actual.getCookieMask());
339 assertThat(deletedRules, containsInAnyOrder(cookie));
345 expect(ofSwitchService.getSwitch(dpid)).andStubReturn(iofSwitch);
346 expect(iofSwitch.getOFFactory()).andStubReturn(ofFactory);
348 mockFlowStatsRequest(cookie, DROP_RULE_COOKIE, VERIFICATION_BROADCAST_RULE_COOKIE,
349 VERIFICATION_UNICAST_RULE_COOKIE);
351 Capture<OFFlowMod> capture = EasyMock.newCapture(CaptureType.ALL);
352 expect(iofSwitch.write(capture(capture))).andReturn(
true).times(3);
354 mockBarrierRequest();
355 mockFlowStatsRequest(cookie);
358 replay(ofSwitchService, iofSwitch);
364 final List<OFFlowMod> actual = capture.getValues();
365 assertEquals(3, actual.size());
366 assertThat(actual, everyItem(hasProperty(
"command", equalTo(OFFlowModCommand.DELETE))));
367 assertThat(actual, hasItem(hasProperty(
"cookie", equalTo(U64.of(DROP_RULE_COOKIE)))));
368 assertThat(actual, hasItem(hasProperty(
"cookie", equalTo(U64.of(VERIFICATION_BROADCAST_RULE_COOKIE)))));
369 assertThat(actual, hasItem(hasProperty(
"cookie", equalTo(U64.of(VERIFICATION_UNICAST_RULE_COOKIE)))));
370 assertThat(deletedRules, containsInAnyOrder(DROP_RULE_COOKIE, VERIFICATION_BROADCAST_RULE_COOKIE,
371 VERIFICATION_UNICAST_RULE_COOKIE));
377 expect(ofSwitchService.getSwitch(dpid)).andStubReturn(iofSwitch);
378 expect(iofSwitch.getOFFactory()).andStubReturn(ofFactory);
380 mockFlowStatsRequest(cookie, DROP_RULE_COOKIE, VERIFICATION_BROADCAST_RULE_COOKIE,
381 VERIFICATION_UNICAST_RULE_COOKIE);
383 Capture<OFFlowMod> capture = EasyMock.newCapture(CaptureType.ALL);
384 expect(iofSwitch.write(capture(capture))).andReturn(
true).times(3);
386 mockBarrierRequest();
387 mockFlowStatsRequest(DROP_RULE_COOKIE, VERIFICATION_BROADCAST_RULE_COOKIE, VERIFICATION_UNICAST_RULE_COOKIE);
390 replay(ofSwitchService, iofSwitch);
397 final OFFlowMod actual = capture.getValue();
398 assertEquals(OFFlowModCommand.DELETE, actual.getCommand());
399 assertNull(actual.getMatch().get(MatchField.IN_PORT));
400 assertNull(actual.getMatch().get(MatchField.VLAN_VID));
401 assertEquals(
"any", actual.getOutPort().toString());
402 assertEquals(0, actual.getInstructions().size());
403 assertEquals(cookie, actual.getCookie().getValue());
404 assertEquals(U64.NO_MASK, actual.getCookieMask());
405 assertThat(deletedRules, containsInAnyOrder(cookie));
411 final int testInPort = 11;
413 expect(ofSwitchService.getSwitch(dpid)).andStubReturn(iofSwitch);
414 expect(iofSwitch.getOFFactory()).andStubReturn(ofFactory);
416 mockFlowStatsRequest(cookie, DROP_RULE_COOKIE, VERIFICATION_BROADCAST_RULE_COOKIE,
417 VERIFICATION_UNICAST_RULE_COOKIE);
419 Capture<OFFlowMod> capture = EasyMock.newCapture(CaptureType.ALL);
420 expect(iofSwitch.write(capture(capture))).andReturn(
true).times(3);
422 mockBarrierRequest();
423 mockFlowStatsRequest(DROP_RULE_COOKIE, VERIFICATION_BROADCAST_RULE_COOKIE, VERIFICATION_UNICAST_RULE_COOKIE);
426 replay(ofSwitchService, iofSwitch);
433 final OFFlowMod actual = capture.getValue();
434 assertEquals(OFFlowModCommand.DELETE, actual.getCommand());
435 assertEquals(testInPort, actual.getMatch().get(MatchField.IN_PORT).getPortNumber());
436 assertNull(actual.getMatch().get(MatchField.VLAN_VID));
437 assertEquals(
"any", actual.getOutPort().toString());
438 assertEquals(0, actual.getInstructions().size());
439 assertEquals(0L, actual.getCookie().getValue());
440 assertEquals(0L, actual.getCookieMask().getValue());
441 assertThat(deletedRules, containsInAnyOrder(cookie));
447 final short testInVlan = 101;
449 expect(ofSwitchService.getSwitch(dpid)).andStubReturn(iofSwitch);
450 expect(iofSwitch.getOFFactory()).andStubReturn(ofFactory);
452 mockFlowStatsRequest(cookie, DROP_RULE_COOKIE, VERIFICATION_BROADCAST_RULE_COOKIE,
453 VERIFICATION_UNICAST_RULE_COOKIE);
455 Capture<OFFlowMod> capture = EasyMock.newCapture(CaptureType.ALL);
456 expect(iofSwitch.write(capture(capture))).andReturn(
true).times(3);
458 mockBarrierRequest();
459 mockFlowStatsRequest(DROP_RULE_COOKIE, VERIFICATION_BROADCAST_RULE_COOKIE, VERIFICATION_UNICAST_RULE_COOKIE);
462 replay(ofSwitchService, iofSwitch);
469 final OFFlowMod actual = capture.getValue();
470 assertEquals(OFFlowModCommand.DELETE, actual.getCommand());
471 assertEquals(testInVlan, actual.getMatch().get(MatchField.VLAN_VID).getVlan());
472 assertNull(actual.getMatch().get(MatchField.IN_PORT));
473 assertEquals(
"any", actual.getOutPort().toString());
474 assertEquals(0, actual.getInstructions().size());
475 assertEquals(0L, actual.getCookie().getValue());
476 assertEquals(0L, actual.getCookieMask().getValue());
477 assertThat(deletedRules, containsInAnyOrder(cookie));
483 final int testInPort = 11;
484 final short testInVlan = 101;
486 expect(ofSwitchService.getSwitch(dpid)).andStubReturn(iofSwitch);
487 expect(iofSwitch.getOFFactory()).andStubReturn(ofFactory);
489 mockFlowStatsRequest(cookie, DROP_RULE_COOKIE, VERIFICATION_BROADCAST_RULE_COOKIE,
490 VERIFICATION_UNICAST_RULE_COOKIE);
492 Capture<OFFlowMod> capture = EasyMock.newCapture(CaptureType.ALL);
493 expect(iofSwitch.write(capture(capture))).andReturn(
true).times(3);
495 mockBarrierRequest();
496 mockFlowStatsRequest(DROP_RULE_COOKIE, VERIFICATION_BROADCAST_RULE_COOKIE, VERIFICATION_UNICAST_RULE_COOKIE);
499 replay(ofSwitchService, iofSwitch);
504 .inVlan((
int) testInVlan).build();
508 final OFFlowMod actual = capture.getValue();
509 assertEquals(OFFlowModCommand.DELETE, actual.getCommand());
510 assertEquals(testInPort, actual.getMatch().get(MatchField.IN_PORT).getPortNumber());
511 assertEquals(testInVlan, actual.getMatch().get(MatchField.VLAN_VID).getVlan());
512 assertEquals(
"any", actual.getOutPort().toString());
513 assertEquals(0, actual.getInstructions().size());
514 assertEquals(0L, actual.getCookie().getValue());
515 assertEquals(0L, actual.getCookieMask().getValue());
516 assertThat(deletedRules, containsInAnyOrder(cookie));
522 final int testPriority = 999;
524 expect(ofSwitchService.getSwitch(dpid)).andStubReturn(iofSwitch);
525 expect(iofSwitch.getOFFactory()).andStubReturn(ofFactory);
527 mockFlowStatsRequest(cookie, DROP_RULE_COOKIE, VERIFICATION_BROADCAST_RULE_COOKIE,
528 VERIFICATION_UNICAST_RULE_COOKIE);
530 Capture<OFFlowMod> capture = EasyMock.newCapture(CaptureType.ALL);
531 expect(iofSwitch.write(capture(capture))).andReturn(
true).times(3);
533 mockBarrierRequest();
534 mockFlowStatsRequest(DROP_RULE_COOKIE, VERIFICATION_BROADCAST_RULE_COOKIE, VERIFICATION_UNICAST_RULE_COOKIE);
537 replay(ofSwitchService, iofSwitch);
544 final OFFlowMod actual = capture.getValue();
545 assertEquals(OFFlowModCommand.DELETE, actual.getCommand());
546 assertNull(actual.getMatch().get(MatchField.IN_PORT));
547 assertNull(actual.getMatch().get(MatchField.VLAN_VID));
548 assertEquals(
"any", actual.getOutPort().toString());
549 assertEquals(0, actual.getInstructions().size());
550 assertEquals(0L, actual.getCookie().getValue());
551 assertEquals(0L, actual.getCookieMask().getValue());
552 assertEquals(testPriority, actual.getPriority());
553 assertThat(deletedRules, containsInAnyOrder(cookie));
559 final int testInPort = 11;
560 final short testInVlan = 101;
561 final int testPriority = 999;
563 expect(ofSwitchService.getSwitch(dpid)).andStubReturn(iofSwitch);
564 expect(iofSwitch.getOFFactory()).andStubReturn(ofFactory);
566 mockFlowStatsRequest(cookie, DROP_RULE_COOKIE, VERIFICATION_BROADCAST_RULE_COOKIE,
567 VERIFICATION_UNICAST_RULE_COOKIE);
569 Capture<OFFlowMod> capture = EasyMock.newCapture(CaptureType.ALL);
570 expect(iofSwitch.write(capture(capture))).andReturn(
true).times(3);
572 mockBarrierRequest();
573 mockFlowStatsRequest(DROP_RULE_COOKIE, VERIFICATION_BROADCAST_RULE_COOKIE, VERIFICATION_UNICAST_RULE_COOKIE);
576 replay(ofSwitchService, iofSwitch);
581 .inVlan((
int) testInVlan)
582 .priority(testPriority).build();
586 final OFFlowMod actual = capture.getValue();
587 assertEquals(OFFlowModCommand.DELETE, actual.getCommand());
588 assertEquals(testInPort, actual.getMatch().get(MatchField.IN_PORT).getPortNumber());
589 assertEquals(testInVlan, actual.getMatch().get(MatchField.VLAN_VID).getVlan());
590 assertEquals(
"any", actual.getOutPort().toString());
591 assertEquals(0, actual.getInstructions().size());
592 assertEquals(0L, actual.getCookie().getValue());
593 assertEquals(0L, actual.getCookieMask().getValue());
594 assertEquals(testPriority, actual.getPriority());
595 assertThat(deletedRules, containsInAnyOrder(cookie));
601 final int testOutPort = 21;
603 expect(ofSwitchService.getSwitch(dpid)).andStubReturn(iofSwitch);
604 expect(iofSwitch.getOFFactory()).andStubReturn(ofFactory);
606 mockFlowStatsRequest(cookie, DROP_RULE_COOKIE, VERIFICATION_BROADCAST_RULE_COOKIE,
607 VERIFICATION_UNICAST_RULE_COOKIE);
609 Capture<OFFlowMod> capture = EasyMock.newCapture(CaptureType.ALL);
610 expect(iofSwitch.write(capture(capture))).andReturn(
true).times(3);
612 mockBarrierRequest();
613 mockFlowStatsRequest(DROP_RULE_COOKIE, VERIFICATION_BROADCAST_RULE_COOKIE, VERIFICATION_UNICAST_RULE_COOKIE);
616 replay(ofSwitchService, iofSwitch);
623 final OFFlowMod actual = capture.getValue();
624 assertEquals(OFFlowModCommand.DELETE, actual.getCommand());
625 assertNull(actual.getMatch().get(MatchField.IN_PORT));
626 assertNull(actual.getMatch().get(MatchField.VLAN_VID));
627 assertEquals(testOutPort, actual.getOutPort().getPortNumber());
628 assertEquals(0L, actual.getCookie().getValue());
629 assertEquals(0L, actual.getCookieMask().getValue());
630 assertThat(deletedRules, containsInAnyOrder(cookie));
633 private void mockBarrierRequest() throws InterruptedException, ExecutionException, TimeoutException {
634 OFBarrierReply ofBarrierReply = mock(OFBarrierReply.class);
636 ListenableFuture<OFBarrierReply> ofBarrierFuture = mock(ListenableFuture.class);
637 expect(ofBarrierFuture.get(anyLong(), anyObject())).andStubReturn(ofBarrierReply);
638 replay(ofBarrierFuture);
640 expect(iofSwitch.writeRequest(anyObject(OFBarrierRequest.class))).andReturn(ofBarrierFuture);
643 private void mockFlowStatsRequest(Long... cookies)
644 throws InterruptedException, ExecutionException, TimeoutException {
645 List<OFFlowStatsEntry> ofFlowStatsEntries = Arrays.stream(cookies)
647 OFFlowStatsEntry ofFlowStatsEntry = mock(OFFlowStatsEntry.class);
648 expect(ofFlowStatsEntry.getCookie()).andStubReturn(U64.of(cookie));
649 replay(ofFlowStatsEntry);
650 return ofFlowStatsEntry;
652 .collect(Collectors.toList());
654 OFFlowStatsEntry ofFlowStatsEntry = mock(OFFlowStatsEntry.class);
655 expect(ofFlowStatsEntry.getCookie()).andStubReturn(U64.of(cookie));
656 replay(ofFlowStatsEntry);
658 OFFlowStatsReply ofFlowStatsReply = mock(OFFlowStatsReply.class);
659 expect(ofFlowStatsReply.getXid()).andReturn(0L);
660 expect(ofFlowStatsReply.getFlags()).andReturn(emptySet());
661 expect(ofFlowStatsReply.getEntries()).andStubReturn(ofFlowStatsEntries);
662 replay(ofFlowStatsReply);
664 ListenableFuture<List<OFFlowStatsReply>> ofStatsFuture = mock(ListenableFuture.class);
665 expect(ofStatsFuture.get(anyLong(), anyObject())).andStubReturn(singletonList(ofFlowStatsReply));
666 replay(ofStatsFuture);
668 expect(iofSwitch.writeStatsRequest(anyObject(OFFlowStatsRequest.class))).andReturn(ofStatsFuture);
671 private Capture<OFFlowMod> prepareForInstallTest() {
672 Capture<OFFlowMod> capture = EasyMock.newCapture();
674 expect(ofSwitchService.getSwitch(dpid)).andStubReturn(iofSwitch);
675 expect(iofSwitch.getOFFactory()).andStubReturn(ofFactory);
676 expect(iofSwitch.getSwitchDescription()).andStubReturn(switchDescription);
677 expect(switchDescription.getManufacturerDescription()).andStubReturn(
"");
678 expect(iofSwitch.write(capture(capture))).andReturn(
true);
681 replay(ofSwitchService);
683 replay(switchDescription);
688 private Capture<OFMeterMod> prepareForMeterTest() {
689 Capture<OFMeterMod> capture = EasyMock.newCapture();
691 expect(ofSwitchService.getSwitch(dpid)).andStubReturn(iofSwitch);
692 expect(iofSwitch.getOFFactory()).andStubReturn(ofFactory);
693 expect(iofSwitch.getSwitchDescription()).andStubReturn(switchDescription);
694 expect(switchDescription.getManufacturerDescription()).andStubReturn(
"");
695 expect(iofSwitch.write(capture(capture))).andReturn(
true);
698 replay(ofSwitchService);
700 replay(switchDescription);
long installMeter(final DatapathId dpid, final long bandwidth, final long burstSize, final long meterId)
void installIngressFlowNoneAction()
default OFFlowAdd ingressPopFlowMod(int inputPort, int outputPort, int inputVlan, int transitVlan, long meterId, long cookie)
void shouldDeleteAllNonDefaultRules()
void installIngressFlowReplaceAction()
OFFlowAdd egressPushFlowMod(int inputPort, int outputPort, int transitVlanId, int outputVlan, long cookie)
long installEgressFlow(final DatapathId dpid, String flowId, final Long cookie, final int inputPort, final int outputPort, final int transitVlanId, final int outputVlanId, final OutputVlanType outputVlanType)
void shouldDeleteRuleByOutPort()
void installOneSwitchFlowReplaceAction()
default OFFlowAdd oneSwitchReplaceFlowMod(int inputPort, int outputPort, int inputVlan, int outputVlan, long meterId, long cookie)
default OFMeterMod installMeter(long bandwidth, long burstSize, long meterId)
void init(FloodlightModuleContext context)
long installIngressFlow(final DatapathId dpid, final String flowId, final Long cookie, final int inputPort, final int outputPort, final int inputVlanId, final int transitVlanId, final OutputVlanType outputVlanType, final long meterId)
OFFlowAdd egressPopFlowMod(int inputPort, int outputPort, int transitVlanId, long cookie)
static final int inputVlanId
static final long bandwidth
static final long meterId
void shouldDeleteRuleByInVlan()
static final int inputPort
void installEgressFlowNoneAction()
long VERIFICATION_BROADCAST_RULE_COOKIE
List< Long > deleteRulesByCriteria(final DatapathId dpid, DeleteRulesCriteria... criteria)
default OFFlowAdd ingressNoneFlowMod(int inputPort, int outputPort, int transitVlan, long meterId, long cookie)
List< Long > deleteDefaultRules(final DatapathId dpid)
void installOneSwitchFlowPopAction()
void installIngressFlowPushAction()
List< Long > deleteAllNonDefaultRules(final DatapathId dpid)
default OFFlowAdd oneSwitchPushFlowMod(int inputPort, int outputPort, int outputVlan, long meterId, long cookie)
void shouldDeleteRuleByCookie()
static final int outputPort
void installOneSwitchFlowNoneAction()
void shouldDeleteRuleByPriority()
long installTransitFlow(final DatapathId dpid, final String flowId, final Long cookie, final int inputPort, final int outputPort, final int transitVlanId)
void installIngressFlowPopAction()
void shouldDeleteRuleByInPortAndVlan()
void installEgressFlowPushAction()
default OFFlowAdd oneSwitchNoneFlowMod(int inputPort, int outputPort, long meterId, long cookie)
static final int transitVlanId
void shouldDeleteRuleByInPort()
void shouldDeleteDefaultRules()
long VERIFICATION_UNICAST_RULE_COOKIE
void installEgressFlowReplaceAction()
default OFFlowAdd transitFlowMod(int inputPort, int outputPort, int transitVlan, long cookie)
default OFFlowAdd oneSwitchPopFlowMod(int inputPort, int outputPort, int inputVlan, long meterId, long cookie)
void installTransitFlow()
void installBandwidthMeter()
default OFFlowAdd ingressReplaceFlowMod(int inputPort, int outputPort, int inputVlan, int transitVlan, long meterId, long cookie)
void installOneSwitchFlowPushAction()
default OFFlowAdd ingressPushFlowMod(int inputPort, int outputPort, int transitVlan, long meterId, long cookie)
static final long burstSize
void shouldDeleteRuleByInPortVlanAndPriority()
long installOneSwitchFlow(final DatapathId dpid, final String flowId, final Long cookie, final int inputPort, final int outputPort, final int inputVlanId, final int outputVlanId, final OutputVlanType outputVlanType, final long meterId)
OFFlowAdd egressNoneFlowMod(int inputPort, int outputPort, int transitVlanId, long cookie)
long deleteMeter(final DatapathId dpid, final long meterId)
void installEgressFlowPopAction()
static final int outputVlanId
OFFlowAdd egressReplaceFlowMod(int inputPort, int outputPort, int inputVlan, int outputVlan, long cookie)
void installDefaultRules()