Merge "Bug 1072 -Add OF13 pre-req for PCP match in TestCommandProvider"
authormichal rehak <mirehak@cisco.com>
Wed, 11 Jun 2014 16:09:40 +0000 (16:09 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 11 Jun 2014 16:09:40 +0000 (16:09 +0000)
1  2 
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTestCommandProvider.java

index d5a9708348eacf9ca28881ff6b7efa505b1d60db,00cc719e005116950b05b6776ca4b9082b54865d..d610e65996c5af8cab6562158c325ae92c162701
@@@ -648,7 -648,7 +648,7 @@@ public class OpenflowpluginTestCommandP
              break;
          case "f80":
              id += 80;
-             flow.setMatch(createMatch1().build());
+             flow.setMatch(createVlanMatch().build());
              flow.setInstructions(createAppyActionInstruction88().build());
              break;
          case "f81":
              flow.setMatch(createTcpFlagMatch().build());
              flow.setInstructions(createDropInstructions().build());
              break;
+         case "f84":
+             id += 84;
+             flow.setMatch(createVlanMatch().build()); // match vlan=10,dl_vlan_pcp=3
+             flow.setInstructions(createAppyActionInstruction88().build()); // vlan_pcp=4
+             break;
          default:
              LOG.warn("flow type not understood: {}", flowType);
          }
      private static InstructionsBuilder createGotoTableInstructions() {
  
          GoToTableBuilder aab = new GoToTableBuilder();
 -        aab.setTableId((short) 2);
 +        aab.setTableId((short) 5);
  
          InstructionBuilder ib = new InstructionBuilder();
          ib.setInstruction(new GoToTableCaseBuilder().setGoToTable(aab.build()).build());
          MatchBuilder match = new MatchBuilder();
          TunnelBuilder tunnel = new TunnelBuilder(); // tunnel id match
          tunnel.setTunnelId(BigInteger.valueOf(10668));
 -        byte[] mask = new byte[] { (byte) -1, (byte) -1, (byte) -1, 0, 0, 0, (byte) 1, (byte) 1 };
 -        tunnel.setTunnelMask(new BigInteger(mask));
 +        byte[] mask = new byte[] {(byte) -1, (byte) -1, (byte) -1, 0, 0, 0, (byte) 1, (byte) 1 };
 +        tunnel.setTunnelMask(new BigInteger(1, mask));
          match.setTunnel(tunnel.build());
  
          return match;