AETHER-2464, AETHER-2467 Make DG Qos Mandatoy; Add allow-internet boolean

Change-Id: I5ee6e8b384aa062b73aad7774ce072f3e9379ae5
diff --git a/config-models/aether-4.x/files/yang/onf-aether-types.yang b/config-models/aether-4.x/files/yang/onf-aether-types.yang
index 07b526e..bbf3a5e 100755
--- a/config-models/aether-4.x/files/yang/onf-aether-types.yang
+++ b/config-models/aether-4.x/files/yang/onf-aether-types.yang
@@ -87,7 +87,14 @@
       type uint16 {
         range 0..1000;
       }
-  }  
+  }
+
+  typedef priority {
+    type uint8 {
+      // priorities 201-255 are reserved for system use
+      range 0..200;
+    }
+  }
 
   // "TCP" or "UDP"
   typedef protocol {
@@ -105,7 +112,14 @@
         pattern "ENABLE|MAINTENANCE|DISABLE";
       }
       default "ENABLE";
-  }  
+  }
+
+  typedef behavior {
+      type string {
+        length 0..20;
+        pattern "DENY-ALL|ALLOW-ALL|ALLOW-PUBLIC";
+      }
+  }
 
   typedef mtu {
       type inet:port-number;
diff --git a/config-models/aether-4.x/files/yang/onf-device-group.yang b/config-models/aether-4.x/files/yang/onf-device-group.yang
index 36079e0..6dca9a3 100755
--- a/config-models/aether-4.x/files/yang/onf-device-group.yang
+++ b/config-models/aether-4.x/files/yang/onf-device-group.yang
@@ -95,12 +95,14 @@
             type at:bitrate;
             units bps;
             description "Per-device mbr uplink data rate in mbps";
+            mandatory true;
           }
 
           leaf downlink {
             type at:bitrate;
             units bps;
             description "Per-device mbr downlink data rate in mbps";
+            mandatory true;
           }
         }
         leaf traffic-class {
@@ -109,6 +111,7 @@
           }
           description
             "Link to traffic class";
+          mandatory true;
         }
       }
 
@@ -116,9 +119,9 @@
         type leafref {
           path "/st:site/st:site/st:id";
         }
-        mandatory true;
         description
           "Link to site";
+        mandatory true;
       }
     }
   }
diff --git a/config-models/aether-4.x/files/yang/onf-template.yang b/config-models/aether-4.x/files/yang/onf-template.yang
index 7d05600..0ab16a3 100755
--- a/config-models/aether-4.x/files/yang/onf-template.yang
+++ b/config-models/aether-4.x/files/yang/onf-template.yang
@@ -8,7 +8,6 @@
 
   import ietf-yang-types{ prefix yg; }
   import onf-aether-types{ prefix at; }
-  import onf-traffic-class{ prefix tc; }
 
   organization "Open Networking Foundation.";
   contact "Scott Baker";
@@ -17,7 +16,7 @@
      by a virtual connectivity service. Templates are used to
      populate a VCS.";
 
-  revision "2021-06-02" {
+  revision "2021-09-10" {
     description "An Aether Virtual Cellular Service Template";
     reference "RFC 6087";
   }
@@ -58,24 +57,6 @@
         description "Slice differentiator";
       }
 
-      container device {
-        description "Per-device QOS Settings";
-        container mbr {
-          description "Maximum bitrate";
-          leaf uplink {
-            type at:bitrate;
-            units bps;
-            description "Per-device mbr uplink data rate in mbps";
-          }
-
-          leaf downlink {
-            type at:bitrate;
-            units bps;
-            description "Per-device mbr downlink data rate in mbps";
-          }
-        }
-      }
-
       container slice {
         description "Per-Slice QOS Settings";
         container mbr {
@@ -92,15 +73,14 @@
             description "Per-Slice mbr downlink data rate in mbps";
           }
         }
-      }      
+      }
 
-      leaf traffic-class {
-        type leafref {
-          path "/tc:traffic-class/tc:traffic-class/tc:id";
-        }          
+      leaf default-behavior {
+        type at:behavior;
+        mandatory true;
         description
-          "Link to traffic class";
-      } 
+          "Default behavior if no filter rules match";
+      }      
 
       leaf description {
         type at:description;
diff --git a/config-models/aether-4.x/files/yang/onf-vcs.yang b/config-models/aether-4.x/files/yang/onf-vcs.yang
index 183d6f6..7373d1b 100755
--- a/config-models/aether-4.x/files/yang/onf-vcs.yang
+++ b/config-models/aether-4.x/files/yang/onf-vcs.yang
@@ -12,7 +12,6 @@
   import onf-device-group{ prefix dg; }
   import onf-enterprise{ prefix ent; }
   import onf-template{ prefix vt; }
-  import onf-traffic-class{ prefix tc; }
   import onf-upf { prefix upf; }
 
   organization "Open Networking Foundation.";
@@ -72,13 +71,11 @@
            the VCS if the enable field is set to True";
       }
 
-      leaf template {
-        type leafref {
-          path "/vt:template/vt:template/vt:id";
-        }
+      leaf default-behavior {
+        type at:behavior;
+        mandatory true;
         description
-          "Link to user vcs template that was used to initialize
-           this VCS";
+          "Default behavior if no filter rules match";
       }
 
       list filter {
@@ -92,7 +89,7 @@
             "Link to application";
         }
         leaf priority {
-          type uint8;
+          type at:priority;
           default 0;
           description
             "Priority of this application";
@@ -144,26 +141,6 @@
         description "Slice differentiator. Immutable.";
       }
 
-      // This is deprecated. Per-device QOS is moving
-      // to DG.
-      container device {
-        description "Per-device QOS Settings";
-        container mbr {
-          description "Maximum bitrate";
-          leaf uplink {
-            type at:bitrate;
-            units bps;
-            description "Per-device mbr uplink data rate in mbps";
-          }
-
-          leaf downlink {
-            type at:bitrate;
-            units bps;
-            description "Per-device mbr downlink data rate in mbps";
-          }
-        }
-      }
-
       container slice {
         description "Per-Slice QOS Settings";
         container mbr {
@@ -182,14 +159,6 @@
         }
       }
 
-      leaf traffic-class {
-        type leafref {
-          path "/tc:traffic-class/tc:traffic-class/tc:id";
-        }
-        mandatory true;
-        description
-          "Link to traffic class";
-      }
       // end of items populated from the template
     }
   }