Remove "response" from yang.
[packetcable.git] / packetcable-model / src / main / yang / packetcable-match-types.yang
index 0a1abe1605ade38b292f84c0d0fd3812a7fa79ba..dcc22745943af80329b981c6651655690d5ad635 100644 (file)
 module packetcable-match-types
 {
-    namespace "urn:opendaylight:model:match:types";
-    prefix "match";
-
-    import ietf-inet-types {prefix inet; }
-
-    revision "2014-01-20" {
+    namespace "urn:opendaylight:packetcable:match:types";
+    prefix "packet-cable-match";
+
+    import yang-ext {prefix ext; revision-date "2013-07-09";}
+    import flow-node-inventory {prefix fni; revision-date "2013-08-19"; }
+    import opendaylight-inventory {prefix inv;revision-date "2013-08-19";}
+    import sal-flow {prefix sal-flow;revision-date "2013-08-19";}
+    import packet-processing {prefix sal-packet;revision-date "2013-07-09";}
+    import ietf-inet-types {prefix inet; revision-date "2010-09-24";}
+    import ietf-yang-types {prefix yang; revision-date "2010-09-24";}
+    import opendaylight-flow-types {prefix flow;revision-date "2013-10-26";}
+    import opendaylight-flow-statistics {prefix odl-flow-stats;revision-date "2013-08-19";}
+
+    revision 2014-09-09 {
         description "Initial revision of packetcable match types";
     }        
     
 
-    grouping "ip-match-fields" {
-        leaf ip-protocol {
-            description "IP protocol.";
-            type uint8;
-        }
-
-        leaf ip-dscp {
-            description "IP DSCP (6 bits in ToS field).";
-            type inet:dscp;
-        }
-
-        leaf ip-ecn {
-            description "IP ECN (2 bits in ToS field).";
-            type uint8;
-        }
-
-        leaf ip-proto {
-            description "IP Proto (IPv4 or IPv6 Protocol Number).";
-           type inet:ip-version;
+    grouping "udp-match-ranges-attributes" {
+        container upd-match-ranges {
+            leaf udp-source-port-start {
+                description "UDP source port start.";
+                type inet:port-number;
+            }
+            leaf udp-source-port-end {
+                description "UDP source port end.";
+                type inet:port-number;
+            }
+            leaf udp-destination-port-start {
+                description "UDP destination port start.";
+                type inet:port-number;
+            }
+            leaf udp-destination-port-end {
+                description "UDP destination port end.";
+                type inet:port-number;
+            }
         }
     }
 
-    grouping "ipv4-match-fields" {
-        leaf ipv4-source {
-            description "IPv4 source address.";
-            type inet:ipv4-prefix;
-        }
-
-        leaf ipv4-destination {
-            description "IPv4 destination address.";
-            type inet:ipv4-prefix;
-        }
-
+    
+    //  MATCH augmentations for udp-match-range
+    // RPCS
+    augment "/sal-flow:add-flow/sal-flow:input/sal-flow:match" {
+        ext:augment-identifier "udp-match-ranges-rpc-add-flow";
+        uses udp-match-ranges-attributes;
+    }
+    augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:match" {
+        ext:augment-identifier "udp-match-ranges-rpc-remove-flow";
+        uses udp-match-ranges-attributes;
+    }
+    augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:match" {
+        ext:augment-identifier "udp-match-ranges-rpc-update-flow-original";
+        uses udp-match-ranges-attributes;
+    }
+    augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:match" {
+        ext:augment-identifier "udp-match-ranges-rpc-update-flow-updated";
+        uses udp-match-ranges-attributes;
     }
 
-    grouping "ipv6-match-fields" {
-        leaf ipv6-source {
-            description "IPv6 source address.";
-            type inet:ipv6-prefix;
-        }
-
-        leaf ipv6-destination {
-            description "IPv6 destination address.";
-            type inet:ipv6-prefix;
-        }
-
-        leaf ipv6-nd-target {
-            description "IPv6 target address for neighbour discovery message";
-            type inet:ipv6-address;
-        }
+    // DATA
+    augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:match" {
+        ext:augment-identifier "udp-match-ranges-nodes-node-table-flow";
+        uses udp-match-ranges-attributes;
+    }
 
-        container "ipv6-label" {
-            leaf ipv6-flabel {
-                type inet:ipv6-flow-label;
+    // NOTIFICATIONS
+    augment "/sal-flow:switch-flow-removed/sal-flow:match" {
+        ext:augment-identifier "udp-match-ranges-notif-switch-flow-removed";
+        uses udp-match-ranges-attributes;
+    }
+    augment "/sal-packet:packet-received/sal-packet:match" {
+        ext:augment-identifier "udp-match-ranges-notif-packet-in";
+        uses udp-match-ranges-attributes;
+    }
+    augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:match" {
+        ext:augment-identifier "udp-match-ranges-notif-update-flow-stats";
+        uses udp-match-ranges-attributes;
+    }
+    
+    grouping "tcp-match-ranges-attributes" {
+        container tcp-match-ranges {
+            leaf tcp-source-port-start {
+                description "TCP source port start.";
+                type inet:port-number;
             }
-
-            leaf flabel-mask {
-                type binary;
+            leaf tcp-source-port-end {
+                description "TCP source port end.";
+                type inet:port-number;
+            }
+            leaf tcp-destination-port-start {
+                description "TCP destination port start.";
+                type inet:port-number;
+            }
+            leaf tcp-destination-port-end {
+                description "TCP destination port end.";
+                type inet:port-number;
             }
-        }
-
-        leaf ipv6-exthdr {
-            description "IPv6 Extension Header field";
-            type uint16;
         }
     }
-
-
-    grouping "udp-match-fields" {
-        leaf udp-source-port {
-            description "UDP source port.";
-            type inet:port-number;
-        }
-        leaf udp-destination-port {
-            description "UDP destination port.";
-            type inet:port-number;
-        }
+    
+//  MATCH augmentations for tcp-match-range
+// RPCS
+    augment "/sal-flow:add-flow/sal-flow:input/sal-flow:match" {
+        ext:augment-identifier "tcp-match-ranges-rpc-add-flow";
+        uses tcp-match-ranges-attributes;
     }
-
-    grouping "tcp-match-fields" {
-        leaf tcp-source-port {
-            description "TCP source port.";
-            type inet:port-number;
-        }
-        leaf tcp-destination-port {
-            description "TCP destination port.";
-            type inet:port-number;
-        }
+    augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:match" {
+        ext:augment-identifier "tcp-match-ranges-rpc-remove-flow";
+        uses tcp-match-ranges-attributes;
     }
-
-    grouping "udp-match-ranges" {
-        leaf udp-source-port-start {
-            description "UDP source port start.";
-            type inet:port-number;
-        }
-        leaf udp-source-port-end {
-            description "UDP source port end.";
-            type inet:port-number;
-        }
-        leaf udp-destination-port-start {
-            description "UDP destination port start.";
-            type inet:port-number;
-        }
-        leaf udp-destination-port-end {
-            description "UDP destination port end.";
-            type inet:port-number;
-        }
+    augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:match" {
+        ext:augment-identifier "tcp-match-ranges-rpc-update-flow-original";
+        uses tcp-match-ranges-attributes;
+    }
+    augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:match" {
+        ext:augment-identifier "tcp-match-ranges-rpc-update-flow-updated";
+        uses tcp-match-ranges-attributes;
     }
 
-    grouping "tcp-match-ranges" {
-        leaf tcp-source-port-start {
-            description "TCP source port start.";
-            type inet:port-number;
-        }
-        leaf tcp-source-port-end {
-            description "TCP source port end.";
-            type inet:port-number;
-        }
-        leaf tcp-destination-port-begin {
-            description "TCP destination port begin.";
-            type inet:port-number;
-        }
-        leaf tcp-destination-port-end {
-            description "TCP destination port end.";
-            type inet:port-number;
-        }
+// DATA
+    augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:match" {
+        ext:augment-identifier "tcp-match-ranges-nodes-node-table-flow";
+        uses tcp-match-ranges-attributes;
     }
 
-    grouping match {
+// NOTIFICATIONS
+    augment "/sal-flow:switch-flow-removed/sal-flow:match" {
+        ext:augment-identifier "tcp-match-ranges-notif-switch-flow-removed";
+        uses tcp-match-ranges-attributes;
+    }
+    augment "/sal-packet:packet-received/sal-packet:match" {
+        ext:augment-identifier "tcp-match-ranges-notif-packet-in";
+        uses tcp-match-ranges-attributes;
+    }
+    augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:match" {
+        ext:augment-identifier "tcp-match-ranges-notif-update-flow-stats";
+        uses tcp-match-ranges-attributes;
+    }
 
-        container "ip-match" {
-            uses "ip-match-fields";
+    grouping subscriber-id {
+        leaf subscriber-id {
+            type inet:ip-address;
+            description "Subscriber Id";
         }
+    }
+    
+//  MATCH augmentations for susbcriber-id
+// RPCS
+    augment "/sal-flow:add-flow/sal-flow:input/sal-flow:match" {
+        ext:augment-identifier "subscriber-id-rpc-add-flow";
+        uses subscriber-id;
+    }
+    augment "/sal-flow:remove-flow/sal-flow:input/sal-flow:match" {
+        ext:augment-identifier "subscriber-id-rpc-remove-flow";
+        uses subscriber-id;
+    }
+    augment "/sal-flow:update-flow/sal-flow:input/sal-flow:original-flow/sal-flow:match" {
+        ext:augment-identifier "subscriber-id-rpc-update-flow-original";
+        uses subscriber-id;
+    }
+    augment "/sal-flow:update-flow/sal-flow:input/sal-flow:updated-flow/sal-flow:match" {
+        ext:augment-identifier "subscriber-id-rpc-update-flow-updated";
+        uses subscriber-id;
+    }
 
-        choice layer-3-match {
-        case "ipv4-match" {
-                uses "ipv4-match-fields";
-            }
-        case "ipv6-match" {
-                uses "ipv6-match-fields";
-            }
-        }
+// DATA
+    augment "/inv:nodes/inv:node/fni:table/fni:flow/fni:match" {
+        ext:augment-identifier "subscriber-id-nodes-node-table-flow";
+        uses subscriber-id;
+    }
 
-        description "if tpSrc then tpSrcStart = tpSrcEnd = tpSrc";
-        choice layer-4-match {
-        case "udp-match" {
-            choice "udp-field-range" {
-                   case "udp-field" {
-                        uses "udp-match-fields";
-                   }
-                   case "udp-range" {
-                        uses "udp-match-ranges";
-                   }
-               }
-            }
-        case "tcp-match" {
-            choice "tcp-field-range" {
-                   case "tcp-field" {
-                        uses "tcp-match-fields";
-                   }
-                   case "tcp-range" {
-                        uses "tcp-match-ranges";
-                   }
-               }
-            }
-        }
+// NOTIFICATIONS
+    augment "/sal-flow:switch-flow-removed/sal-flow:match" {
+        ext:augment-identifier "subscriber-id-notif-switch-flow-removed";
+        uses subscriber-id;
+    }
+    augment "/sal-packet:packet-received/sal-packet:match" {
+        ext:augment-identifier "subscriber-id-notif-packet-in";
+        uses subscriber-id;
     }
+    augment "/odl-flow-stats:flows-statistics-update/odl-flow-stats:flow-and-statistics-map-list/odl-flow-stats:match" {
+        ext:augment-identifier "subscriber-id-notif-update-flow-stats";
+        uses subscriber-id;
+    }
+    
 }