Revert "Checkstyle enforcer"
[controller.git] / opendaylight / protocol_plugins / openflow / src / main / java / org / opendaylight / controller / protocol_plugin / openflow / vendorextension / v6extension / V6FlowMod.java
index 47bb2213aaafcee053a7e6b083798ef57738ac4a..53f4e1d5ad0e73f61219483fc16344d34ed0ca95 100644 (file)
@@ -13,6 +13,7 @@ import java.nio.ByteBuffer;
 import java.util.LinkedList;
 import java.util.List;
 
+import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
 import org.openflow.protocol.OFPacketOut;
 import org.openflow.protocol.OFPort;
 import org.openflow.protocol.OFVendor;
@@ -20,8 +21,6 @@ import org.openflow.protocol.action.OFAction;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
-
 /**
  * This class is used to create IPv6 Vendor Extension messages. Specfically, It
  * defines the methods used in creation of Vendor specific IPv6 Flow Mod message.
@@ -148,6 +147,22 @@ public class V6FlowMod extends OFVendor implements Cloneable {
         super.setVendor(V6StatsRequest.NICIRA_VENDOR_ID);
     }
     
+    /**
+     * Get flags
+     * @return
+     */
+    public short getFlags() {
+        return flags;
+    }
+
+    /**
+     * Set flags
+     * @param flags
+     */
+    public void setFlags(short flags) {
+        this.flags = flags;
+    }
+    
     /**
      * This method forms the Vendor extension IPv6 Flow Mod message.It uses the
      * fields in V6FlowMod class, and writes the data according to vendor 
@@ -167,7 +182,7 @@ public class V6FlowMod extends OFVendor implements Cloneable {
         data.putShort(this.priority);
         data.putInt(OFPacketOut.BUFFER_ID_NONE);
         data.putShort(outPort); /* output_port */
-        data.putShort((short) 0); /* flags */
+        data.putShort(flags); /* flags */
         match_len = this.match.getIPv6MatchLen();
         data.putShort(match_len);
         byte[] pad = new byte[6];
@@ -189,7 +204,7 @@ public class V6FlowMod extends OFVendor implements Cloneable {
                 action.writeTo(data);
             }
         }
-        logger.trace("{}", this.toString());
+        logger.trace("{}", this);
     }
 
     /**