MD-SAL Statistics Manger - Added support for fetching port statistics
[controller.git] / opendaylight / md-sal / model / model-flow-base / src / main / yang / port-types.yang
index 0df6b52b0bb0faa46fa5319d457e5a275eb3c0df..f0b7e97a15ff5b2a221ed9e15212b7516459de7f 100644 (file)
@@ -2,14 +2,20 @@ module opendaylight-port-types {
     namespace "urn:opendaylight:flow:types:port";
     prefix port-types;
 
-    import yang-ext {prefix ext;}
-    import ietf-inet-types {prefix inet;}
-    import ietf-yang-types {prefix yang;}
+    import ietf-inet-types {prefix inet; revision-date "2010-09-24";}
+    import ietf-yang-types {prefix yang; revision-date "2010-09-24";}
     
     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 {
@@ -21,13 +27,12 @@ module opendaylight-port-types {
     }
     
     typedef port-state {
-            type enumeration {
-                enum LINK-DOWN;
-                enum BLOCKED;
-                enum LIVE;
+        type enumeration {
+            enum link-down;
+            enum blocked;
+            enum live;
         }
     }
-
     
     typedef port-features {
         type bits {
@@ -73,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;
@@ -115,7 +128,7 @@ module opendaylight-port-types {
         }
     }    
     
-    grouping ofp-port-mod {
+    grouping port-mod {
         container port {
             list port {
                 key "port-mod-order";
@@ -126,7 +139,7 @@ module opendaylight-port-types {
                 uses common-port;
                 
                 leaf mask {
-                    type uint32;
+                    type port-config;
                     description "Bitmap of OFPPC-* flags to be changed";
                 }      
                 
@@ -136,7 +149,11 @@ module opendaylight-port-types {
             
                 leaf port-name {
                     type string; 
-                }                
+                } 
+
+                leaf barrier {
+                    type boolean; 
+                } 
             }            
         }    
     }