Bug 2756 - Match model update
[openflowjava.git] / openflow-protocol-impl / src / main / java / org / opendaylight / openflowjava / protocol / impl / deserialization / action / OF10AbstractMacAddressActionDeserializer.java
index e2a7095aa4ed83f3caa2b4f7daf551340dce076c..46022f0c9c654b6fb6ed02ab516170b37c2e35dc 100644 (file)
@@ -1,46 +1,46 @@
-/*\r
- * Copyright (c) 2013 Pantheon Technologies s.r.o. and others. All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-\r
-package org.opendaylight.openflowjava.protocol.impl.deserialization.action;\r
-\r
-import io.netty.buffer.ByteBuf;\r
-\r
-import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;\r
-import org.opendaylight.openflowjava.protocol.impl.util.ByteBufUtils;\r
-import org.opendaylight.openflowjava.protocol.impl.util.EncodeConstants;\r
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;\r
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.DlAddressAction;\r
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.DlAddressActionBuilder;\r
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.actions.grouping.Action;\r
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.actions.grouping.ActionBuilder;\r
-\r
-/**\r
- * @author michal.polkorab\r
- *\r
- */\r
-public abstract class OF10AbstractMacAddressActionDeserializer extends AbstractActionDeserializer {\r
-\r
-    @Override\r
-    public Action deserialize(ByteBuf input) {\r
-        ActionBuilder builder = new ActionBuilder();\r
-        input.skipBytes(EncodeConstants.SIZE_OF_SHORT_IN_BYTES);\r
-        builder.setType(getType());\r
-        input.skipBytes(EncodeConstants.SIZE_OF_SHORT_IN_BYTES);\r
-        builder.addAugmentation(DlAddressAction.class, createDlAugmentationAndPad(input));\r
-        return builder.build();\r
-    }\r
-\r
-    private static DlAddressAction createDlAugmentationAndPad(ByteBuf input) {\r
-        DlAddressActionBuilder dlBuilder = new DlAddressActionBuilder();\r
-        byte[] address = new byte[EncodeConstants.MAC_ADDRESS_LENGTH];\r
-        input.readBytes(address);\r
-        dlBuilder.setDlAddress(new MacAddress(ByteBufUtils.macAddressToString(address)));\r
-        input.skipBytes(ActionConstants.PADDING_IN_DL_ADDRESS_ACTION);\r
-        return dlBuilder.build();\r
-    }\r
-}\r
+/*
+ * Copyright (c) 2013 Pantheon Technologies s.r.o. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
+package org.opendaylight.openflowjava.protocol.impl.deserialization.action;
+
+import io.netty.buffer.ByteBuf;
+
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
+import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
+import org.opendaylight.openflowjava.util.ByteBufUtils;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.DlAddressAction;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.DlAddressActionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.actions.grouping.Action;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.actions.grouping.ActionBuilder;
+
+/**
+ * @author michal.polkorab
+ *
+ */
+public abstract class OF10AbstractMacAddressActionDeserializer extends AbstractActionDeserializer {
+
+    @Override
+    public Action deserialize(ByteBuf input) {
+        ActionBuilder builder = new ActionBuilder();
+        input.skipBytes(EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
+        builder.setType(getType());
+        input.skipBytes(EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
+        builder.addAugmentation(DlAddressAction.class, createDlAugmentationAndPad(input));
+        return builder.build();
+    }
+
+    private static DlAddressAction createDlAugmentationAndPad(ByteBuf input) {
+        DlAddressActionBuilder dlBuilder = new DlAddressActionBuilder();
+        byte[] address = new byte[EncodeConstants.MAC_ADDRESS_LENGTH];
+        input.readBytes(address);
+        dlBuilder.setDlAddress(new MacAddress(ByteBufUtils.macAddressToString(address)));
+        input.skipBytes(ActionConstants.PADDING_IN_DL_ADDRESS_ACTION);
+        return dlBuilder.build();
+    }
+}