Add multipart reply deserializers
[openflowplugin.git] / model / model-flow-service / src / main / yang / flow-node-inventory.yang
index 41e78e2244f9bcf818c54650c5891a2c690bafc3..4901f08f24462b891d594a64845439841796456e 100644 (file)
@@ -3,73 +3,75 @@ module flow-node-inventory {
     prefix flownode;
 
     import yang-ext {prefix ext; revision-date "2013-07-09";}
-    import ietf-inet-types {prefix inet; revision-date "2010-09-24";}
+    import ietf-inet-types {prefix inet; revision-date "2013-07-15";}
+    import ietf-yang-types {prefix yang; revision-date "2013-07-15";}
     import opendaylight-port-types {prefix port;revision-date "2013-09-25";}
     import opendaylight-inventory {prefix inv;revision-date "2013-08-19";}
     import opendaylight-table-types {prefix table;revision-date "2013-10-26";}
     import opendaylight-flow-types {prefix flow;revision-date "2013-10-26";}
     import opendaylight-group-types {prefix group;revision-date "2013-10-18";}
     import opendaylight-meter-types {prefix meter;revision-date "2013-09-18";}
-    
+    import opendaylight-multipart-types { prefix multipart; revision-date "2017-01-12"; }
+
     description "Flow Capable Node extensions to the Inventory model";
 
     revision "2013-08-19" {
         description "added descriptions";
     }
-    
+
     identity feature-capability {
     }
-    
+
     identity flow-feature-capability-flow-stats {
-        description "Flow statistics"; 
-        base feature-capability;      
+        description "Flow statistics";
+        base feature-capability;
     }
-    
+
     identity flow-feature-capability-table-stats {
         description "Table statistics";
-        base feature-capability;        
+        base feature-capability;
     }
-    
+
     identity flow-feature-capability-port-stats {
         description "Port statistics";
-        base feature-capability;        
+        base feature-capability;
     }
-    
+
     identity flow-feature-capability-stp {
         description "802.1d spanning tree";
-        base feature-capability;        
+        base feature-capability;
     }
-    
+
     identity flow-feature-capability-reserved {
         description "Reserved, must be zero";
-        base feature-capability;        
+        base feature-capability;
     }
-    
+
     identity flow-feature-capability-ip-reasm {
         description "Can reassemble IP fragments";
-        base feature-capability;        
+        base feature-capability;
     }
-    
+
     identity flow-feature-capability-queue-stats {
         description "Queue statistics";
-        base feature-capability;        
+        base feature-capability;
     }
-    
+
     identity flow-feature-capability-arp-match-ip {
         description "Match IP addresses in ARP pkts";
-        base feature-capability;        
+        base feature-capability;
     }
-    
+
     identity flow-feature-capability-group-stats {
         description "Group statistics";
-        base feature-capability;        
+        base feature-capability;
     }
-    
+
     identity flow-feature-capability-port-blocked {
         description "Switch will block looping ports";
-        base feature-capability;        
+        base feature-capability;
     }
-    
+
     grouping feature {
         description "Features supported by openflow device.";
         leaf support-state {
@@ -81,7 +83,7 @@ module flow-node-inventory {
         leaf queue-id {
             type uint32;
             description "id for the specific queue";
-            mandatory true; 
+            mandatory true;
         }
         container properties {
             leaf minimum-rate {
@@ -101,32 +103,45 @@ module flow-node-inventory {
     grouping tables {
         description "Openflow table structure. Here flows are contained.";
         list table {
-            key "id"; 
-    
+            key "id";
+
             leaf id {
                     type uint8;
-            }            
-    
-            uses table:table-features;
-    
+            }
+
             list flow {
-                key "id"; 
-    
+                key "id";
+
                 leaf id {
                     type flow-id;
-                }           
-    
+                }
+
+                uses flow:flow;
+            }
+            // BE-RECON: Modification for including stale-flow for Reconciliation
+            list stale-flow {
+                key "id";
+
+                leaf id {
+                    type flow-id;
+                }
+
                 uses flow:flow;
             }
         }
     }
-    
+
     grouping meters {
         description "Openflow meter list.";
         list meter {
             key "meter-id";
             uses meter:meter;
         }
+        // BE-RECON: Modification for including stale-flow for Reconciliation
+        list stale-meter {
+            key "meter-id";
+            uses meter:meter;
+        }
     }
 
     grouping ip-address-grouping {
@@ -137,8 +152,14 @@ module flow-node-inventory {
         }
     }
 
-    grouping flow-node {
-        description "Openflow node structure = device";
+    grouping port-number-grouping {
+        leaf port-number {
+            description "Port number of a flow capable node.";
+            type inet:port-number;
+        }
+    }
+
+    grouping desc {
         leaf manufacturer {
             type string;
         }
@@ -154,13 +175,18 @@ module flow-node-inventory {
         leaf description {
             type string;
         }
+    }
 
+    grouping flow-node {
+        description "Openflow node structure = device";
+        uses desc;
         uses tables;
+        uses table:table-features;
         uses group:groups;
         uses meters;
         uses ip-address-grouping;
-        // TODO: ports
-        
+        uses port-number-grouping;
+
         container supported-match-types {
             list match-type {
                key "match";
@@ -168,10 +194,10 @@ module flow-node-inventory {
                 leaf match {
                     type string; // FIXME: Add identity
                 }
-                
+
             }
         }
-        
+
         container supported-instructions {
             list instruction-type {
                key "instruction";
@@ -192,23 +218,23 @@ module flow-node-inventory {
                 }
             }
         }
-        
+
         container switch-features {
-            
+
             leaf max_buffers {
                 type uint32;
             }
-            
+
             leaf max_tables {
                 type uint8;
             }
-            
+
             leaf-list capabilities {
                 type identityref {
                     base feature-capability;
                 }
             }
-            
+
         }
     }
 
@@ -217,6 +243,27 @@ module flow-node-inventory {
         uses port:flow-capable-port;
     }
 
+    grouping snapshot-gathering-status-grouping {
+        description "Basic info about snapshot gathering - timestamps of begin, end.";
+
+        container snapshot-gathering-status-start {
+            description "gathering start mark";
+            leaf begin {
+                type yang:date-and-time;
+            }
+        }
+
+        container snapshot-gathering-status-end {
+            description "gathering end mark + result";
+            leaf end {
+                type yang:date-and-time;
+            }
+            leaf succeeded {
+                type boolean;
+            }
+        }
+    }
+
     augment "/inv:nodes/inv:node" {
         ext:augment-identifier "flow-capable-node";
         description "Top attach point of openflow node into node inventory tree.";
@@ -241,7 +288,7 @@ module flow-node-inventory {
         description "Openflow port into node notification.";
         uses flow-node-connector;
     }
-    
+
     augment "/inv:node-connector-updated" {
         ext:augment-identifier "flow-capable-node-connector-updated";
         description "Openflow port into node-connector notification.";
@@ -264,4 +311,17 @@ module flow-node-inventory {
             }
         }
     }
+
+    augment "/inv:nodes/inv:node" {
+        ext:augment-identifier "flow-capable-statistics-gathering-status";
+        description "Placeholder for timestamp of device status snapshot.
+            This is contructed by asynchronous process.";
+        uses snapshot-gathering-status-grouping;
+    }
+
+    augment "/multipart:multipart-reply/multipart:multipart-reply-body" {
+        case multipart-reply-desc {
+            uses desc;
+        }
+    }
 }