Minor model refactor
[openflowjava.git] / openflow-protocol-impl / src / main / java / org / opendaylight / openflowjava / protocol / impl / serialization / factories / MultipartRequestInputFactory.java
index ac4a3105df3be1c964eb7509d8d5e5b041187854..0fdeff1cdc19b5f4341964cb42ff1b3def8beea2 100644 (file)
@@ -26,14 +26,14 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.NextTableRelatedTableFeatureProperty;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.OxmRelatedTableFeatureProperty;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.table.features.properties.container.table.feature.properties.NextTableIds;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.actions.ActionsList;
+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.instruction.rev130731.Experimenter;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.instructions.Instructions;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.instructions.grouping.Instruction;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartRequestFlags;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartType;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.TableConfig;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.TableFeaturesPropType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.MatchEntries;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.MultipartRequestBody;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestAggregateCase;
@@ -61,7 +61,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.queue._case.MultipartRequestQueue;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.table.features._case.MultipartRequestTableFeatures;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.table.features._case.multipart.request.table.features.TableFeatures;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.table.features.properties.TableFeatureProperties;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.table.features.properties.grouping.TableFeatureProperties;
 
 /**
  * Translates MultipartRequest messages
@@ -241,7 +241,7 @@ public class MultipartRequestInputFactory implements OFSerializer<MultipartReque
                 if (featProp.getAugmentation(InstructionRelatedTableFeatureProperty.class) != null) {
                     InstructionRelatedTableFeatureProperty property =
                             featProp.getAugmentation(InstructionRelatedTableFeatureProperty.class);
-                    length += property.getInstructions().size() * STRUCTURE_HEADER_LENGTH;
+                    length += property.getInstruction().size() * STRUCTURE_HEADER_LENGTH;
                     length += paddingNeeded(length);
                 } else if (featProp.getAugmentation(NextTableRelatedTableFeatureProperty.class) != null) {
                     NextTableRelatedTableFeatureProperty property =
@@ -251,7 +251,7 @@ public class MultipartRequestInputFactory implements OFSerializer<MultipartReque
                 } else if (featProp.getAugmentation(ActionRelatedTableFeatureProperty.class) != null) {
                     ActionRelatedTableFeatureProperty property =
                             featProp.getAugmentation(ActionRelatedTableFeatureProperty.class);
-                    length += property.getActionsList().size() * STRUCTURE_HEADER_LENGTH;
+                    length += property.getAction().size() * STRUCTURE_HEADER_LENGTH;
                     length += paddingNeeded(length);
                 } else if (featProp.getAugmentation(OxmRelatedTableFeatureProperty.class) != null) {
                     OxmRelatedTableFeatureProperty property =
@@ -476,12 +476,12 @@ public class MultipartRequestInputFactory implements OFSerializer<MultipartReque
     private static void writeInstructionRelatedTableProperty(ByteBuf output,
             TableFeatureProperties property, byte code) {
         output.writeShort(code);
-        List<Instructions> instructions = property.
-                getAugmentation(InstructionRelatedTableFeatureProperty.class).getInstructions();
+        List<Instruction> instructions = property.
+                getAugmentation(InstructionRelatedTableFeatureProperty.class).getInstruction();
         int length = TABLE_FEAT_HEADER_LENGTH;
         int padding = 0;
         if (instructions != null) {
-            for (Instructions instruction : instructions) {
+            for (Instruction instruction : instructions) {
                 if (instruction.getType().isAssignableFrom(Experimenter.class)) {
                     length += EncodeConstants.EXPERIMENTER_IDS_LENGTH;
                 } else {
@@ -531,13 +531,13 @@ public class MultipartRequestInputFactory implements OFSerializer<MultipartReque
     private static void writeActionsRelatedTableProperty(ByteBuf output,
             TableFeatureProperties property, byte code) {
         output.writeShort(code);
-        List<ActionsList> actions = property.
-                getAugmentation(ActionRelatedTableFeatureProperty.class).getActionsList();
+        List<Action> actions = property.
+                getAugmentation(ActionRelatedTableFeatureProperty.class).getAction();
         int length = TABLE_FEAT_HEADER_LENGTH;
         int padding = 0;
         if (actions != null) {
-            for (ActionsList action : actions) {
-                if (action.getAction().getType().isAssignableFrom(Experimenter.class)) {
+            for (Action action : actions) {
+                if (action.getType().isAssignableFrom(Experimenter.class)) {
                     length += EncodeConstants.EXPERIMENTER_IDS_LENGTH;
                 } else {
                     length += STRUCTURE_HEADER_LENGTH;