Modified flow to add setField. MeterID and group ID are needed for plugin 74/2774/2
authorPrasanna Huddar <prasanna.huddar@ericsson.com>
Fri, 15 Nov 2013 13:03:07 +0000 (18:33 +0530)
committerPrasanna Huddar <prasanna.huddar@ericsson.com>
Fri, 15 Nov 2013 14:19:28 +0000 (19:49 +0530)
Signed-off-by: Prasanna Huddar <prasanna.huddar@ericsson.com>
Change-Id: I8cda9248d381b7e596f4491462de1ecff8657a94

opendaylight/forwardingrulesmanager_mdsal/openflow/src/main/java/org/opendaylight/controller/forwardingrulesmanager_mdsal/consumer/impl/FRMUtil.java
opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/MDFlowMapping.xtend
opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/ToSalConversionsUtils.java
opendaylight/md-sal/compatibility/sal-compatibility/src/test/java/org/opendaylight/controller/sal/compatibility/test/TestToSalConversionsUtils.java
opendaylight/md-sal/model/model-flow-base/src/main/yang/action-types.yang
opendaylight/md-sal/model/model-flow-base/src/main/yang/flow-types.yang

index 4acaf7b..9f18664 100644 (file)
@@ -127,7 +127,7 @@ public class FRMUtil {
                 }
             } else if (action instanceof OutputAction) {
                 Integer length = ((OutputAction) action).getMaxLength();
-                List<Uri> outputnodeconnector = ((OutputAction) action).getOutputNodeConnector();
+                Uri outputnodeconnector = ((OutputAction) action).getOutputNodeConnector();
                 if (length < 0 || length > 65294) {
                     logger.error("OutputAction: MaxLength is not valid");
                     return false;
index 5dd149a..1e33481 100644 (file)
@@ -190,7 +190,7 @@ public class MDFlowMapping {
     public static dispatch def toAction(Output sourceAction) {
         val actionBuilder = new ActionBuilder();
         val it = new OutputActionBuilder();
-        outputNodeConnector = sourceAction.port.toUriList;
+        outputNodeConnector = sourceAction.port.toUri;
         actionBuilder.action = it.build();
         return actionBuilder.build();
 
@@ -331,7 +331,7 @@ public class MDFlowMapping {
         return it.build()
     }
 
-    public static def List<Uri> toUriList(NodeConnector connector) {
+    public static def Uri toUri(NodeConnector connector) {
         throw new UnsupportedOperationException("TODO: auto-generated method stub")
     }
 
index 96b6961..064b920 100644 (file)
@@ -166,11 +166,11 @@ public class ToSalConversionsUtils {
                 targetAction.add(new Controller());
             } else if (sourceAction instanceof OutputAction) {
 
-                List<Uri> nodeConnectors = ((OutputAction) sourceAction).getOutputNodeConnector();
-                if (nodeConnectors != null) {
-                    for (Uri uri : nodeConnectors) {
-                        targetAction.add(new Output(fromNodeConnectorRef(uri)));
-                    }
+                Uri nodeConnector = ((OutputAction) sourceAction).getOutputNodeConnector();
+                if (nodeConnector != null) {
+                    //for (Uri uri : nodeConnectors) {
+                        targetAction.add(new Output(fromNodeConnectorRef(nodeConnector)));
+                    //}
                 }
             } else if (sourceAction instanceof PopMplsAction) {
                 // TODO: define maping
index e2ae724..8108074 100644 (file)
@@ -175,7 +175,7 @@ public class TestToSalConversionsUtils {
         checkSalAction(actions, FloodAll.class, 1);
         checkSalAction(actions, HwPath.class, 1);
         checkSalAction(actions, Loopback.class, 1);
-        checkSalAction(actions, Output.class, 2, true);
+        checkSalAction(actions, Output.class, 1, true);
         checkSalAction(actions, PopVlan.class, 1);
         checkSalAction(actions, PushVlan.class, 1, true);
         checkSalAction(actions, SetDlDst.class, 1, true);
@@ -451,11 +451,8 @@ public class TestToSalConversionsUtils {
         pushVlanActionBuilder.setTag(0x8100); // 12 bit
     }
 
-    private void prepareActionOutput(OutputActionBuilder outputActionBuilder) {
-        List<Uri> uris = new ArrayList<>();
-        uris.add(new Uri("uri1"));
-        uris.add(new Uri("uri2"));
-        outputActionBuilder.setOutputNodeConnector(uris);
+    private void prepareActionOutput(OutputActionBuilder outputActionBuilder) {       
+        outputActionBuilder.setOutputNodeConnector(new Uri("uri1"));
     }
 
     private Match prepOdMatch(MtchType mt) {
index 3bf7db6..5bfe54e 100644 (file)
@@ -5,6 +5,7 @@ module opendaylight-action-types {
     import ietf-inet-types {prefix inet; revision-date "2010-09-24";}
     import ietf-yang-types {prefix yang; revision-date "2010-09-24";}
     import opendaylight-l2-types {prefix l2t; revision-date "2013-08-27";}
+    import opendaylight-match-types {prefix match; revision-date 2013-10-26";}
     
     revision "2013-11-12" {
         description "Initial revision of action service";
@@ -42,7 +43,7 @@ module opendaylight-action-types {
     grouping action {
         choice action {
             case output-action {
-                leaf-list output-node-connector {
+                leaf output-node-connector {
                     type inet:uri;
                 }
                 
@@ -60,11 +61,21 @@ module opendaylight-action-types {
                     }
                 }
             }
-
+            
+            case set-field {
+                container match {
+                    uses match:match;
+                }
+            }
+            
             case set-queue-action {
                 leaf queue {
                     type string; 
                 }
+                
+                leaf queue-id {
+                    type uint32; 
+                }
             }
 
             case pop-mpls-action {
@@ -168,6 +179,10 @@ module opendaylight-action-types {
                 leaf group {
                     type string;
                 }
+                
+                leaf group-id {
+                    type uint32;
+                }
             }
             
             case set-dl-type-action {
index b5a70cc..4b50c0e 100644 (file)
@@ -55,6 +55,10 @@ module opendaylight-flow-types {
                 leaf meter {
                     type string;
                 }
+                
+                leaf meter-id {
+                    type uint32;
+                }
             }   
         }
     }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.