PortNumber fixed + enums provided 85/2985/1
authorMichal Polkorab <michal.polkorab@pantheon.sk>
Fri, 22 Nov 2013 08:33:24 +0000 (09:33 +0100)
committerMichal Polkorab <michal.polkorab@pantheon.sk>
Fri, 22 Nov 2013 08:39:01 +0000 (09:39 +0100)
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
openflow-protocol-api/src/main/yang/openflow-types.yang

index c9e6990e1f4b00ab49cc084c17bf5986410c5e69..473966054d3d7d8fcc809c1d172a3587fe1b77e9 100644 (file)
@@ -7,8 +7,47 @@ module openflow-types {
     }
 
     typedef port-number {
-        type uint32 {
-            range "0..4294967040"; // 0xffffff00 See for actual value
+        type uint32;
+    }
+    
+    typedef port-number-values {
+        type enumeration {
+            enum MAX {
+                value -256; // 0xffffff00 
+                description "Hello Protocol failed.";
+            }
+            enum IN_PORT {
+                value -8; // 0xfffffff8
+                description "Request was not understood.";
+            }
+            enum TABLE {
+                value -7; // 0xfffffff9 
+                description "Error in action description.";
+            }
+            enum NORMAL {
+                value -6; // 0xfffffffa 
+                description "Error in instruction list.";
+            }
+            enum FLOOD {
+                value -5; // 0xfffffffb 
+                description "Error in match.";
+            }
+            enum ALL {
+                value -4; // 0xfffffffc 
+                description "Problem modifying flow entry.";
+            }
+            enum CONTROLLER {
+                value -3; // 0xfffffffd
+                description "Problem modifying group entry.";
+            }
+            enum LOCAL {
+                value -2; // 0xfffffffe
+                description "Port mod request failed.";
+            }
+            enum ANY {
+                value -1; // 0xffffffff
+                description "Table mod request failed.";
+            }
         }
     }
 
@@ -911,6 +950,47 @@ module openflow-types {
     // Structures under this line are needed to support OpenFlow version 1.0 
     // wire protocol 0x01; 
     
+    typedef port-number-values-v10 {
+        type enumeration {
+            enum MAX {
+                value 65280; // 0xff00 
+                description "Hello Protocol failed.";
+            }
+            enum IN_PORT {
+                value 65528; // 0xfff8
+                description "Request was not understood.";
+            }
+            enum TABLE {
+                value 65529; // 0xfff9 
+                description "Error in action description.";
+            }
+            enum NORMAL {
+                value 65530; // 0xfffa 
+                description "Error in instruction list.";
+            }
+            enum FLOOD {
+                value 65531; // 0xfffb 
+                description "Error in match.";
+            }
+            enum ALL {
+                value 65532; // 0xfffc 
+                description "Problem modifying flow entry.";
+            }
+            enum CONTROLLER {
+                value 65533; // 0xfffd
+                description "Problem modifying group entry.";
+            }
+            enum LOCAL {
+                value 65534; // 0xfffe
+                description "Port mod request failed.";
+            }
+            enum ANY {
+                value 65535; // 0xffff
+                description "Table mod request failed.";
+            }
+        }
+    }
+    
     typedef port-config-v10 {
         description 
            "Flags to indicate behavior of the physical port. These flags are