[ONOS-3499] Add the set treatments of ARP_SPA, ARP_SHA and ARP_OP.

Change-Id: I7e1927bcf26e7c25fede43aa864a1b71ae2e8b49
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 4643b31..8ed882c8 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
@@ -35,6 +35,9 @@
 import org.onosproject.net.flow.instructions.L1ModificationInstruction.ModOduSignalIdInstruction;
 import org.onosproject.net.flow.instructions.L3ModificationInstruction.L3SubType;
 import org.onosproject.net.flow.instructions.L3ModificationInstruction.ModIPInstruction;
+import org.onosproject.net.flow.instructions.L3ModificationInstruction.ModArpIPInstruction;
+import org.onosproject.net.flow.instructions.L3ModificationInstruction.ModArpEthInstruction;
+import org.onosproject.net.flow.instructions.L3ModificationInstruction.ModArpOpInstruction;
 import org.onosproject.net.flow.instructions.L3ModificationInstruction.ModIPv6FlowLabelInstruction;
 import org.onosproject.net.flow.instructions.L3ModificationInstruction.ModTtlInstruction;
 import org.onosproject.net.flow.instructions.L4ModificationInstruction.L4SubType;
@@ -299,6 +302,39 @@
     }
 
     /**
+     * Creates a L3 ARP IP src modification.
+     *
+     * @param addr the ip address to modify to
+     * @return a L3 modification
+     */
+    public static L3ModificationInstruction modArpSpa(IpAddress addr) {
+        checkNotNull(addr, "Src l3 ARP IP address cannot be null");
+        return new ModArpIPInstruction(L3SubType.ARP_SPA, addr);
+    }
+
+    /**
+     * Creates a l3 ARP Ether src modification.
+     *
+     * @param addr the mac address to modify to
+     * @return a l3 modification
+     */
+    public static L3ModificationInstruction modArpSha(MacAddress addr) {
+        checkNotNull(addr, "Src l3 ARP address cannot be null");
+        return new ModArpEthInstruction(L3SubType.ARP_SHA, addr);
+    }
+
+    /**
+     * Creates a l3 ARP operation modification.
+     *
+     * @param op the ARP operation to modify to
+     * @return a l3 modification
+     */
+    public static L3ModificationInstruction modL3ArpOp(short op) {
+        checkNotNull(op, "Arp operation cannot be null");
+        return new ModArpOpInstruction(L3SubType.ARP_OP, op);
+    }
+
+    /**
      * Creates a push MPLS header instruction.
      *
      * @return a L2 modification.