Updating LLDP Match TestCase 58/4358/4
authorGaurav Bhagwani <gaurav.bhagwani@ericsson.com>
Fri, 17 Jan 2014 15:51:27 +0000 (21:21 +0530)
committerGerrit Code Review <gerrit@opendaylight.org>
Sun, 19 Jan 2014 08:39:25 +0000 (08:39 +0000)
Signed-off-by: Gaurav Bhagwani <gaurav.bhagwani@ericsson.com>
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTestCommandProvider.java

index 7682951631a23730a5e44f16ba7ddb67e1da9f73..28d41809d95db16b4ea82f7d448334b5d478ca3e 100644 (file)
@@ -690,6 +690,11 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
             flow.setMatch(createMatch1().build());
             flow.setInstructions(createAppyActionInstruction88().build());
             break;
+        case "f81":
+            id += 81;
+            flow.setMatch(createLLDPMatch().build());
+            flow.setInstructions(createSentToControllerInstructions().build());
+            break;
         default:
             LOG.warn("flow type not understood: {}", flowType);
         }
@@ -2524,6 +2529,16 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
         return isb;
     }
 
+    private static MatchBuilder createLLDPMatch() {
+        MatchBuilder match = new MatchBuilder();
+        EthernetMatchBuilder eth = new EthernetMatchBuilder();
+        EthernetTypeBuilder ethTypeBuilder = new EthernetTypeBuilder();
+        ethTypeBuilder.setType(new EtherType(0x88ccL));
+        eth.setEthernetType(ethTypeBuilder.build());
+        match.setEthernetMatch(eth.build());
+        return match;
+    }
+
     /**
      * @return
      */