- Removed validation for all classifier fields (yang and validation code);
[packetcable.git] / packetcable-policy-model / src / main / yang / packetcable.yang
index df2f0e5071fb42e6589c3abc17b49c358ac86a9e..f316437377c4454dd4dda3e9cfb95a6c5d908314 100644 (file)
@@ -209,23 +209,35 @@ module packetcable
     }
 
     grouping gate-operational-attributes {
-        leaf gatePath {
-            config false;
-            type string;
-            description "FQ Gate path app/subscriber/gate";
-            mandatory true;
-        }
-        leaf ccapId {
-            config false;
-            type string;
-            description "CCAP Identity";
-            mandatory true;
-        }
-        leaf cops-state {
-            config false;
-            type string;
-            description "Gate operational COPS state";
-            mandatory true;
+               leaf gatePath {
+                       config false;
+                   type string;
+                   description "FQ Gate path app/subscriber/gate";
+                   mandatory true;
+               }
+               leaf ccapId {
+                       config false;
+                   type string;
+                   description "CCAP Identity";
+                   mandatory true;
+               }
+               leaf cops-gate-state {
+                       config false;
+                       type string;
+                       description "Operational COPS Gate state";
+                       mandatory true;
+               }
+               leaf cops-gate-time-info {
+                       config false;
+                       type string;
+                       description "Operational COPS Gate time info";
+                       mandatory true;
+               }
+               leaf cops-gate-usage-info {
+          config false;
+          type string;
+          description "Operational COPS gate usage info";
+          mandatory true;
         }
         leaf cops-gateId {
             config false;
@@ -307,22 +319,18 @@ module packetcable
         leaf srcPort-start {
             type inet:port-number;
             description "TCP/UDP source port range start.";
-            mandatory true;
         }
         leaf srcPort-end {
             type inet:port-number;
             description "TCP/UDP source port range end.";
-            mandatory true;
         }
         leaf dstPort-start {
             type inet:port-number;
             description "TCP/UDP destination port range start.";
-            mandatory true;
         }
         leaf dstPort-end {
             type inet:port-number;
             description "TCP/UDP destination port range end.";
-            mandatory true;
         }
     }
 
@@ -331,37 +339,30 @@ module packetcable
             leaf srcIp {
                 type inet:ipv4-address;
                 description "Source IPv4 address (exact match)";
-                mandatory true;
             }
             leaf dstIp {
                 type inet:ipv4-address;
                 description "Destination IPv4 address (exact match)";
-                mandatory true;
             }
              leaf tos-byte {
                  type tos-byte;
                  description "TOS/DSCP match";
-                 mandatory true;
              }
              leaf tos-mask {
                  type tos-byte;
                  description "TOS/DSCP mask";
-                 mandatory true;
              }
              leaf protocol {
                 type tp-protocol;
                 description "IPv4 transport protocol";
-                mandatory true;
             }
              leaf srcPort {
                 type inet:port-number;
                 description "TCP/UDP source port (exact match).";
-                mandatory true;
                }
              leaf dstPort {
                 type inet:port-number;
                 description "TCP/UDP destination port (exact match).";
-                mandatory true;
                }
            }
     }
@@ -371,37 +372,30 @@ module packetcable
             leaf srcIp {
                 type inet:ipv4-address;
                 description "Source IPv4 address match";
-                mandatory true;
             }
             leaf srcIpMask {
                 type inet:ipv4-address;
                 description "Source IPv4 mask";
-                mandatory true;
             }
             leaf dstIp {
                 type inet:ipv4-address;
                 description "Destination IPv4 address match";
-                mandatory true;
             }
             leaf dstIpMask {
                 type inet:ipv4-address;
                 description "Destination IPv4 mask";
-                mandatory true;
             }
              leaf tos-byte {
                  type tos-byte;
                  description "TOS/DSCP match";
-                 mandatory true;
              }
              leaf tos-mask {
                  type tos-byte;
                  description "TOS/DSCP mask";
-                 mandatory true;
              }
              leaf protocol {
                 type tp-protocol;
                 description "IPv4 transport protocol";
-                mandatory true;
             }
             uses tp-port-match-ranges;
            }
@@ -412,43 +406,126 @@ module packetcable
             leaf srcIp6 {
                 type inet:ipv6-prefix;
                 description "Source IPv6 prefix match in  'address/len' notation";
-                mandatory true;
             }
             leaf dstIp6 {
                 type inet:ipv6-prefix;
                 description "Destination IPv6 prefix match in 'address/len' notation";
-                mandatory true;
             }
              leaf tc-low {
                  type tos-byte;
                  description "TC low range match";
-                 mandatory true;
              }
              leaf tc-high {
                  type tos-byte;
                  description "TC high range match";
-                 mandatory true;
              }
              leaf tc-mask {
                  type tos-byte;
                  description "TC mask";
-                 mandatory true;
              }
              leaf next-hdr {
                 type tp-protocol;
                 description "IPv6 Next Header";
-                mandatory true;
             }
             leaf flow-label {
                 type uint32 {
                     range "0 .. 1048575";
                 }
                 description "IPv6 Flow Label (20 bits)";
-                mandatory true;
             }
                uses tp-port-match-ranges;
            }
     }
 
-}
+           //RPCs
+    rpc ccap-set-connection {
+               input {
+            leaf ccapId {
+                       type instance-identifier;
+                       ext:context-reference ccap-context;
+               }
+               container connection {
+                       leaf connected {
+                               type boolean;
+                               description "COPS session state";
+                       }
+//                     leaf idle-detect {
+//                                     type uint8;             
+//                                     description "COPS connection idle timer";
+//                             }
+               }
+        }
+        output {
+               container ccap {
+                       leaf ccapId {
+                               type string;
+                       }
+                       container connection {
+                                       uses ccap-connection;
+                               }
+               }
+               leaf response {
+                       type string;
+               }
+                       leaf timestamp {
+                               type yang:date-and-time;
+                               description "RPC timestamp";
+               }
+        }
+    }
+    
+    rpc ccap-poll-connection {
+               input {
+            leaf ccapId {
+                       type instance-identifier;
+                       ext:context-reference ccap-context;
+               }
+        }
+        output {
+               container ccap {
+                       leaf ccapId {
+                               type string;
+                       }
+                       container connection {
+                                       uses ccap-connection;
+                               }
+               }
+               leaf response {
+                       type string;
+               }
+                       leaf timestamp {
+                               type yang:date-and-time;
+                               description "RPC timestamp";
+               }
+        }
+    }
 
+       rpc qos-poll-gates {
+               input {
+            leaf appId {
+               type instance-identifier;
+                       ext:context-reference app-context;
+               }
+               leaf subscriberId {
+               type string;
+               description "Subscriber Identity -- must be a CM or CPE IP address";
+               }
+               leaf gateId {
+               type string;
+               description "Qos Gate Identity";
+               }
+        }
+        output {
+                       container gate {
+                               uses gate-operational-attributes;
+                       }
+                       leaf response {
+                       type string;
+               }
+                       leaf timestamp {
+                       type yang:date-and-time;
+                       description "RPC timestamp";
+               }
+        }
+    }
+}
\ No newline at end of file