ID's are made in sync with openflow specification. Flow/Group/Table/Port/Queue/Meter... 58/2858/4
authorPrasanna Huddar <prasanna.huddar@ericsson.com>
Tue, 19 Nov 2013 09:07:23 +0000 (14:37 +0530)
committerPrasanna Huddar <prasanna.huddar@ericsson.com>
Tue, 19 Nov 2013 13:25:55 +0000 (13:25 +0000)
Signed-off-by: Prasanna Huddar <prasanna.huddar@ericsson.com>
Change-Id: I75382f32ba715879db25cff1513283035c0d2dfd

13 files changed:
opendaylight/md-sal/compatibility/flow-management-compatibility/src/main/java/org/opendaylight/controller/md/frm/compatibility/FRMRuntimeDataProvider.xtend
opendaylight/md-sal/compatibility/flow-management-compatibility/src/main/java/org/opendaylight/controller/md/frm/compatibility/FlowConfigMapping.xtend
opendaylight/md-sal/compatibility/flow-management-compatibility/src/main/java/org/opendaylight/controller/md/frm/compatibility/SampleConsumer.java
opendaylight/md-sal/model/model-flow-base/src/main/yang/port-types.yang
opendaylight/md-sal/model/model-flow-management/src/main/yang/flow-config.yang
opendaylight/md-sal/model/model-flow-management/src/main/yang/group-config.yang
opendaylight/md-sal/model/model-flow-management/src/main/yang/meter-config.yang
opendaylight/md-sal/model/model-flow-management/src/main/yang/port-config.yang
opendaylight/md-sal/model/model-flow-management/src/main/yang/table-config.yang
opendaylight/md-sal/model/model-flow-service/src/main/yang/flow-error.yang
opendaylight/md-sal/model/model-flow-service/src/main/yang/flow-service.yang
opendaylight/md-sal/model/model-flow-service/src/main/yang/port-service.yang
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/sal/binding/test/bugfix/DOMCodecBug01Test.java

index d462251..bbad85b 100644 (file)
@@ -108,7 +108,7 @@ class ConfigurationReader implements FlowManagementReader {
     }
 
     override readFlow(FlowKey key) {
-        val flowCfg = manager.getStaticFlow(key.id,key.node.toADNode());
+        val flowCfg = manager.getStaticFlow(String.valueOf(key.id), key.node.toADNode());
         return flowCfg.toConfigurationFlow;
     }
 }
index e4d9173..ef806f3 100644 (file)
@@ -24,14 +24,14 @@ class FlowConfigMapping {
         idleTimeout = source.idleTimeout
         match = source.match
         node = source.node
-        key = new FlowKey(sourceCfg.name,node);
+        key = new FlowKey(Long.parseLong(sourceCfg.name),node);
         return it.build();
     }
 
     static def toFlowConfig(Flow sourceCfg) {
         val flow = toFlow(sourceCfg);
         val it = new FlowConfig;
-        name = sourceCfg.key.id
+        name = String.valueOf(sourceCfg.id);
         node = sourceCfg.node.toADNode();
 
         return it
@@ -40,7 +40,7 @@ class FlowConfigMapping {
     static def toFlowConfig(InstanceIdentifier<?> identifier) {
         val it = new FlowConfig()
         val FlowKey key = ((identifier.path.get(2) as IdentifiableItem<Flow,FlowKey>).key)
-        name = key.id;
+        name = String.valueOf(key.id);
         node = key.node.toADNode();
 
         return it;
index a82eedc..2fbe0a0 100644 (file)
@@ -31,7 +31,7 @@ public class SampleConsumer {
 
     Flow createSampleFlow(String name, NodeRef node) {
         FlowBuilder ret = new FlowBuilder();
-        FlowKey key = new FlowKey(name, node);
+        FlowKey key = new FlowKey(Long.parseLong(name), node);
         ret.setKey(key);
         return ret.build();
     }
index 8338d18..f0b7e97 100644 (file)
@@ -8,7 +8,14 @@ module opendaylight-port-types {
     revision "2013-09-25" {
         description "Initial revision of Port Inventory model";
     }
-
+    
+    typedef port-reason {
+        type enumeration {
+            enum add;
+            enum delete;
+            enum update;
+        }
+    }
     
     typedef port-config {
         type bits {
@@ -26,7 +33,6 @@ module opendaylight-port-types {
             enum live;
         }
     }
-
     
     typedef port-features {
         type bits {
@@ -72,6 +78,14 @@ module opendaylight-port-types {
         }
     }
     
+    grouping flow-port-status {
+        leaf reason {
+            type port-reason;
+        }
+        
+        uses flow-capable-port;
+    }
+    
     grouping flow-capable-port {    
                 
         uses common-port;
@@ -114,7 +128,7 @@ module opendaylight-port-types {
         }
     }    
     
-    grouping ofp-port-mod {
+    grouping port-mod {
         container port {
             list port {
                 key "port-mod-order";
index 7361358..1c57142 100644 (file)
@@ -23,7 +23,7 @@ module flow-management {
             key "node id"; 
 
             leaf id {
-                type string;
+                type uint32;
             }
             uses flow:flow-entry;
         }
index 48dda2e..2fc0510 100644 (file)
@@ -22,7 +22,7 @@ module group-management {
             key "id node"; 
                         
             leaf id {
-                type string;
+                type uint32;
             }                       
             
             uses group-entry;
index 111d3d6..35d4550 100644 (file)
@@ -22,7 +22,7 @@ module meter-management {
             key "id node"; 
                         
             leaf id {
-                type string;
+                type uint32;
             }                    
             
             uses meter-entry;
index 945cc32..50762b8 100644 (file)
@@ -14,7 +14,7 @@ module port-management {
         leaf node {
             type inv:node-ref;
         }
-        uses port:ofp-port-mod;
+        uses port:port-mod;
     }   
      
     container ports {
@@ -22,7 +22,7 @@ module port-management {
             key "id node"; 
                         
             leaf id {
-                type string;
+                type uint32;
             }                       
             
             uses port-entry;
index 88dcfce..512fb65 100644 (file)
@@ -23,7 +23,7 @@ module table-management {
             key "id node"; 
                         
             leaf id {
-                type string;
+                type uint32;
             }                    
             
             uses table-entry;
index 171f956..369b279 100644 (file)
@@ -16,13 +16,15 @@ module flow-errors {
             enum flow-mod-failed;
             enum group-mod-failed;
             enum port-mod-failed;
-            enum table-mod-failed;
-            enum meter-mod-failed;
+            enum table-mod-failed;            
             enum queue-op-failed;
             enum switch-config-failed;
             enum role-request-failed;
+            enum meter-mod-failed;
             enum table-features-failed;
-            enum experimenter;
+            enum experimenter {
+                value "65535";
+            }
         }
     }
     
index df0b252..a32a45f 100644 (file)
@@ -97,9 +97,11 @@ module sal-flow {
     
     notification node-error-notification {
         uses error:error-message;
+        uses tr:transaction-aware;
     }
     
     notification node-experimenter-error-notification {
         uses error:experimenter-error-message;
+        uses tr:transaction-aware;
     }
 }
\ No newline at end of file
index df527ef..9588652 100644 (file)
@@ -13,7 +13,7 @@ module sal-port {
     grouping node-port {
         uses "inv:node-context-ref";
         
-        uses port-type:ofp-port-mod;
+        uses port-type:flow-port-status;
     }
 
     /** Base configuration structure **/
@@ -21,10 +21,10 @@ module sal-port {
         uses "inv:node-context-ref";
 
         container original-port {
-            uses port-type:ofp-port-mod;
+            uses port-type:port-mod;
         }
         container updated-port {
-            uses port-type:ofp-port-mod;
+            uses port-type:port-mod;
         }
     }
 
index 70be175..08eb409 100644 (file)
@@ -46,7 +46,7 @@ public class DOMCodecBug01Test extends AbstractDataServiceTest {
     private static final QName FLOW_ID_QNAME = QName.create(Flow.QNAME, "id");
     private static final QName FLOW_NODE_QNAME = QName.create(Flow.QNAME, "node");
     
-    private static final String FLOW_ID = "foo";
+    private static final long FLOW_ID = 1234;
     private static final String NODE_ID = "node:1";
 
     private static final NodeKey NODE_KEY = new NodeKey(new NodeId(NODE_ID));