Fix Direct statistics RPC - actions part
[openflowplugin.git] / extension / openflowplugin-extension-nicira / src / main / yang / openflowplugin-extension-nicira-match.yang
index a20da32c277239422ac491cec5c3c7407e4174c4..cd4c5890eaa905c3d0cc3b651db061f3c1151453 100644 (file)
@@ -11,17 +11,18 @@ module openflowplugin-extension-nicira-match {
     import packet-processing {prefix sal-packet;revision-date "2013-07-09";}
     import openflowplugin-extension-general {prefix ext-gen;revision-date "2014-07-14";}
     import opendaylight-flow-statistics {prefix odl-flow-stats;revision-date "2013-08-19";}
+    import opendaylight-direct-statistics {prefix odl-direct-stats;revision-date "2016-05-11";}
     import nicira-match {prefix nicira-match;revision-date "2014-04-21";}
-    import ietf-inet-types {prefix inet; revision-date "2010-09-24";}
-    import ietf-yang-types {prefix yang; 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";}
 
-    description 
+    description
         "Nicira openflow match extensions.";
 
     revision "2014-07-14" {
         description "Initial revision";
     }
-    
+
     identity nxm-nx-reg0-key {
         base ext-gen:extension-key;
     }
@@ -64,6 +65,9 @@ module openflowplugin-extension-nicira-match {
     identity nxm-of-arp-tpa-key {
         base ext-gen:extension-key;
     }
+    identity nxm-of-in-port-key {
+        base ext-gen:extension-key;
+    }
     identity nxm-nx-tun-ipv4-dst-key {
         base ext-gen:extension-key;
     }
@@ -97,6 +101,51 @@ module openflowplugin-extension-nicira-match {
     identity nxm-nx-nshc-4-key {
         base ext-gen:extension-key;
     }
+    identity nxm-of-tcp-src-key {
+        base ext-gen:extension-key;
+    }
+    identity nxm-of-tcp-dst-key {
+        base ext-gen:extension-key;
+    }
+    identity nxm-of-udp-src-key {
+        base ext-gen:extension-key;
+    }
+    identity nxm-of-udp-dst-key {
+        base ext-gen:extension-key;
+    }
+    identity nxm-nx-ct-state-key {
+        base ext-gen:extension-key;
+    }
+    identity nxm-nx-ct-zone-key {
+        base ext-gen:extension-key;
+    }
+    identity nxm-of-ip-dst-key {
+        base ext-gen:extension-key;
+    }
+    identity nxm-of-ip-src-key {
+        base ext-gen:extension-key;
+    }
+    identity nxm-of-icmp-type-key {
+        base ext-gen:extension-key;
+    }
+    identity nxm-nx-encap-eth-type-key {
+        base ext-gen:extension-key;
+    }
+    identity nxm-nx-encap-eth-src-key {
+        base ext-gen:extension-key;
+    }
+    identity nxm-nx-encap-eth-dst-key {
+        base ext-gen:extension-key;
+    }
+    identity nxm-nx-nsh-mdtype-key {
+        base ext-gen:extension-key;
+    }
+    identity nxm-nx-nsh-np-key {
+        base ext-gen:extension-key;
+    }
+    identity nxm-nx-tun-gpe-np-key {
+        base ext-gen:extension-key;
+    }
     grouping ipv4-address-grouping {
         leaf ipv4-address {
             type inet:ipv4-address;
@@ -151,6 +200,53 @@ module openflowplugin-extension-nicira-match {
             uses ipv4-address-grouping;
         }
     }
+    grouping nxm-of-in-port-grouping {
+        container of-in-port {
+            leaf value {
+                type uint16;
+            }
+        }
+    }
+    grouping nxm-of-tcp-src-grouping {
+        container nxm-of-tcp-src {
+            leaf port {
+               type inet:port-number;
+            }
+            leaf mask {
+               type uint16;
+            }
+        }
+    }
+    grouping nxm-of-tcp-dst-grouping {
+        container nxm-of-tcp-dst {
+            leaf port {
+                type inet:port-number;
+            }
+            leaf mask {
+               type uint16;
+            }
+        }
+    }
+    grouping nxm-of-udp-src-grouping {
+        container nxm-of-udp-src {
+            leaf port {
+               type inet:port-number;
+            }
+            leaf mask {
+               type uint16;
+            }
+        }
+    }
+    grouping nxm-of-udp-dst-grouping {
+        container nxm-of-udp-dst {
+            leaf port {
+                        type inet:port-number;
+            }
+            leaf mask {
+               type uint16;
+            }
+        }
+    }
     grouping nxm-of-arp-tpa-grouping {
         container nxm-of-arp-tpa {
             description "Prereqs: NXM_OF_ETH_TYPE must match either 0x0806 or 0x8035.";
@@ -226,8 +322,80 @@ module openflowplugin-extension-nicira-match {
             }
         }
     }
+    grouping nxm-nx-ct-state-grouping {
+         container nxm-nx-ct-state {
+            leaf ct-state {
+               type uint32;
+            }
+             leaf mask {
+               type uint32;
+            }
+        }
+    }
+    grouping nxm-nx-ct-zone-grouping {
+         container nxm-nx-ct-zone {
+            leaf ct-zone {
+               type uint16;
+            }
+        }
+    }
+    grouping nxm-of-ip-dst-grouping {
+        container nxm-of-ip-dst {
+            uses ipv4-address-grouping;
+        }
+    }
+    grouping nxm-of-ip-src-grouping {
+        container nxm-of-ip-src {
+            uses ipv4-address-grouping;
+        }
+    }
+    grouping nxm-of-icmp-type-grouping {
+        container nxm-of-icmp-type {
+            leaf value {
+                type uint8;
+            }
+        }
+    }
+    grouping nxm-nx-encap-eth-type-grouping {
+        container nxm-nx-encap-eth-type {
+            leaf value {
+                type uint16;
+            }
+        }
+    }
+    grouping nxm-nx-encap-eth-src-grouping {
+        container nxm-nx-encap-eth-src {
+            uses mac-address-grouping;
+        }
+    }
+    grouping nxm-nx-encap-eth-dst-grouping {
+        container nxm-nx-encap-eth-dst {
+            uses mac-address-grouping;
+        }
+    }
+    grouping nxm-nx-nsh-mdtype-grouping {
+        container nxm-nx-nsh-mdtype {
+            leaf value {
+                type uint8;
+            }
+        }
+    }
+    grouping nxm-nx-nsh-np-grouping {
+        container nxm-nx-nsh-np {
+            leaf value {
+                type uint8;
+            }
+        }
+    }
+    grouping nxm-nx-tun-gpe-np-grouping {
+        container nxm-nx-tun-gpe-np {
+            leaf value {
+                type uint8;
+            }
+        }
+    }
+
 
-    
     grouping all-matches-grouping {
         uses nxm-nx-reg-grouping;
         uses nxm-nx-tun-id-grouping;
@@ -236,6 +404,7 @@ module openflowplugin-extension-nicira-match {
         uses nxm-of-arp-op-grouping;
         uses nxm-of-arp-spa-grouping;
         uses nxm-of-arp-tpa-grouping;
+        uses nxm-of-in-port-grouping;
         uses nxm-nx-tun-ipv4-dst-grouping;
         uses nxm-nx-tun-ipv4-src-grouping;
         uses nxm-of-eth-src-grouping;
@@ -247,8 +416,23 @@ module openflowplugin-extension-nicira-match {
         uses nxm-nx-nshc-2-grouping;
         uses nxm-nx-nshc-3-grouping;
         uses nxm-nx-nshc-4-grouping;
+        uses nxm-nx-encap-eth-type-grouping;
+        uses nxm-nx-encap-eth-src-grouping;
+        uses nxm-nx-encap-eth-dst-grouping;
+        uses nxm-nx-nsh-mdtype-grouping;
+        uses nxm-nx-nsh-np-grouping;
+        uses nxm-nx-tun-gpe-np-grouping;
+        uses nxm-of-tcp-src-grouping;
+        uses nxm-of-tcp-dst-grouping;
+        uses nxm-of-udp-src-grouping;
+        uses nxm-of-udp-dst-grouping;
+        uses nxm-nx-ct-state-grouping;
+        uses nxm-nx-ct-zone-grouping;
+        uses nxm-of-ip-dst-grouping;
+        uses nxm-of-ip-src-grouping;
+        uses nxm-of-icmp-type-grouping;
     }
-    
+
     // MATCH augmentations
     // RPCS
     augment "/sal-flow:add-flow/sal-flow:input/sal-flow:match/ext-gen:extension-list/ext-gen:extension" {
@@ -267,13 +451,13 @@ module openflowplugin-extension-nicira-match {
         ext:augment-identifier "nx-aug-match-rpc-update-flow-updated";
         uses all-matches-grouping;
     }
-    
+
     // DATA
     augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:match/ext-gen:extension-list/ext-gen:extension" {
         ext:augment-identifier "nx-aug-match-nodes-node-table-flow";
         uses all-matches-grouping;
     }
-    
+
     // NOTIFICATIONS
     augment "/sal-flow:switch-flow-removed/sal-flow:match/ext-gen:extension-list/ext-gen:extension" {
         ext:augment-identifier "nx-aug-match-notif-switch-flow-removed";
@@ -287,5 +471,9 @@ module openflowplugin-extension-nicira-match {
         ext:augment-identifier "nx-aug-match-notif-update-flow-stats";
         uses all-matches-grouping;
     }
+    augment "/odl-direct-stats:get-flow-statistics/odl-direct-stats:output/odl-direct-stats:flow-and-statistics-map-list/odl-direct-stats:match/ext-gen:extension-list/ext-gen:extension" {
+        ext:augment-identifier "nx-aug-match-rpc-get-flow-stats";
+        uses all-matches-grouping;
+    }
 
 }