Remove "strip vlan" from our API because it is the same as "pop vlan".

"Strip vlan" is OF1.0 terminology, whereas by OF1.3 it is called "pop vlan".

Change-Id: I483526b39bf8ab6f9f96f251a8469e060b688878
diff --git a/core/api/src/main/java/org/onosproject/net/flow/DefaultTrafficTreatment.java b/core/api/src/main/java/org/onosproject/net/flow/DefaultTrafficTreatment.java
index f35074b..5b2343e 100644
--- a/core/api/src/main/java/org/onosproject/net/flow/DefaultTrafficTreatment.java
+++ b/core/api/src/main/java/org/onosproject/net/flow/DefaultTrafficTreatment.java
@@ -207,8 +207,6 @@
                 default:
                     throw new IllegalArgumentException("Unknown instruction type: " +
                                                                instruction.type());
-
-
             }
 
             return this;
@@ -249,10 +247,6 @@
             return add(Instructions.modVlanPcp(pcp));
         }
 
-        public Builder stripVlan() {
-            return add(Instructions.stripVlanId());
-        }
-
         @Override
         public Builder setIpSrc(IpAddress addr) {
             return add(Instructions.modL3Src(addr));
diff --git a/core/api/src/main/java/org/onosproject/net/flow/TrafficTreatment.java b/core/api/src/main/java/org/onosproject/net/flow/TrafficTreatment.java
index 3d76f3b..0732e35 100644
--- a/core/api/src/main/java/org/onosproject/net/flow/TrafficTreatment.java
+++ b/core/api/src/main/java/org/onosproject/net/flow/TrafficTreatment.java
@@ -142,12 +142,6 @@
         public Builder setVlanPcp(Byte pcp);
 
         /**
-         * Strips the vlan tag if there is one.
-         * @return a treatment builder
-         */
-        public Builder stripVlan();
-
-        /**
          * Sets the src l3 address.
          *
          * @param addr an ip
diff --git a/core/api/src/main/java/org/onosproject/net/flow/instructions/Instructions.java b/core/api/src/main/java/org/onosproject/net/flow/instructions/Instructions.java
index 3a0566d..15f7f12f 100644
--- a/core/api/src/main/java/org/onosproject/net/flow/instructions/Instructions.java
+++ b/core/api/src/main/java/org/onosproject/net/flow/instructions/Instructions.java
@@ -42,7 +42,6 @@
 import static org.onosproject.net.flow.instructions.L2ModificationInstruction.ModVlanPcpInstruction;
 import static org.onosproject.net.flow.instructions.L2ModificationInstruction.PopVlanInstruction;
 import static org.onosproject.net.flow.instructions.L2ModificationInstruction.PushHeaderInstructions;
-import static org.onosproject.net.flow.instructions.L2ModificationInstruction.StripVlanInstruction;
 
 /**
  * Factory class for creating various traffic treatment instructions.
@@ -141,15 +140,6 @@
     }
 
     /**
-     * Strips the VLAN tag if one is present.
-     *
-     * @return a L2 modification
-     */
-    public static L2ModificationInstruction stripVlanId() {
-        return new StripVlanInstruction();
-    }
-
-    /**
      * Creates a MPLS label modification.
      *
      * @param mplsLabel MPLS label to set
diff --git a/core/api/src/main/java/org/onosproject/net/flow/instructions/L2ModificationInstruction.java b/core/api/src/main/java/org/onosproject/net/flow/instructions/L2ModificationInstruction.java
index dcb137e..2982dda 100644
--- a/core/api/src/main/java/org/onosproject/net/flow/instructions/L2ModificationInstruction.java
+++ b/core/api/src/main/java/org/onosproject/net/flow/instructions/L2ModificationInstruction.java
@@ -53,11 +53,6 @@
         VLAN_PCP,
 
         /**
-         * Strips the vlan.
-         */
-        STRIP_VLAN,
-
-        /**
          * MPLS Label modification.
          */
         MPLS_LABEL,
@@ -283,38 +278,6 @@
         }
     }
 
-    public static final class StripVlanInstruction extends L2ModificationInstruction {
-
-        StripVlanInstruction() {}
-
-        @Override
-        public L2SubType subtype() {
-            return L2SubType.STRIP_VLAN;
-        }
-
-        @Override
-        public String toString() {
-            return toStringHelper(subtype().toString())
-                    .toString();
-        }
-
-        @Override
-        public int hashCode() {
-            return Objects.hash(type(), subtype());
-        }
-
-        @Override
-        public boolean equals(Object obj) {
-            if (this == obj) {
-                return true;
-            }
-            if (obj instanceof StripVlanInstruction) {
-                return true;
-            }
-            return false;
-        }
-    }
-
     /**
      * Represents a VLAN POP modification instruction.
      */
diff --git a/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowEntryBuilder.java b/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowEntryBuilder.java
index 0e7e31a..05035de 100644
--- a/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowEntryBuilder.java
+++ b/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowEntryBuilder.java
@@ -83,10 +83,8 @@
 
     private final Match match;
 
-    /*
-    All actions are contained in an OFInstruction. For OF1.0
-     the instruction type is apply instruction (immediate set in ONOS speak)
-     */
+    // All actions are contained in an OFInstruction. For OF1.0
+    // the instruction type is apply instruction (immediate set in ONOS speak)
     private final List<OFInstruction> instructions;
 
     private final Dpid dpid;
@@ -308,15 +306,13 @@
                     OFActionGroup group = (OFActionGroup) act;
                     builder.group(new DefaultGroupId(group.getGroup().getGroupNumber()));
                     break;
+                case STRIP_VLAN:
                 case POP_VLAN:
                     builder.popVlan();
                     break;
                 case PUSH_VLAN:
                     builder.pushVlan();
                     break;
-                case STRIP_VLAN:
-                    builder.stripVlan();
-                    break;
                 case SET_TP_DST:
                 case SET_TP_SRC:
                 case POP_PBB:
diff --git a/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowModBuilderVer10.java b/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowModBuilderVer10.java
index 39694b4..e308299 100644
--- a/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowModBuilderVer10.java
+++ b/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowModBuilderVer10.java
@@ -207,7 +207,7 @@
         case VLAN_PCP:
             ModVlanPcpInstruction vlanPcp = (ModVlanPcpInstruction) l2m;
             return factory().actions().setVlanPcp(VlanPcp.of(vlanPcp.vlanPcp()));
-        case STRIP_VLAN:
+        case VLAN_POP:
             return factory().actions().stripVlan();
         default:
             log.warn("Unimplemented action type {}.", l2m.subtype());
diff --git a/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowModBuilderVer13.java b/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowModBuilderVer13.java
index dc6a857..1554fa3 100644
--- a/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowModBuilderVer13.java
+++ b/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowModBuilderVer13.java
@@ -330,12 +330,10 @@
                 return factory().actions().pushMpls(EthType.of(pushHeaderInstructions
                                                                .ethernetType()));
             case MPLS_POP:
-                PushHeaderInstructions  popHeaderInstructions =
+                PushHeaderInstructions popHeaderInstructions =
                         (PushHeaderInstructions) l2m;
                 return factory().actions().popMpls(EthType.of(popHeaderInstructions
                                                               .ethernetType()));
-            case STRIP_VLAN:
-                return factory().actions().popVlan();
             case MPLS_LABEL:
                 ModMplsLabelInstruction mplsLabel =
                         (ModMplsLabelInstruction) l2m;