aether-2.0.0 models: Reorganize the YANG tree as submodules

Change-Id: I5c41899b466f7ece528d5e078924589118441104
diff --git a/aether-roc-umbrella/Chart.yaml b/aether-roc-umbrella/Chart.yaml
index 7429c10..789392d 100644
--- a/aether-roc-umbrella/Chart.yaml
+++ b/aether-roc-umbrella/Chart.yaml
@@ -7,7 +7,7 @@
 description: Aether ROC Umbrella chart to deploy all Aether ROC
 kubeVersion: ">=1.18.0"
 type: application
-version: 2.0.6
+version: 2.0.7
 appVersion: v0.0.0
 keywords:
   - aether
@@ -24,7 +24,7 @@
   - name: config-model-aether-2
     condition: onos-config.models.aether.v2.enabled
     repository: "file://../config-models/aether-2.0.x"
-    version: 2.0.0
+    version: 2.0.1
   - name: config-model-aether-4
     condition: onos-config.models.aether.v4.enabled
     repository: "file://../config-models/aether-4.x"
diff --git a/config-models/aether-2.0.x/Chart.yaml b/config-models/aether-2.0.x/Chart.yaml
index 682915a..fd27292 100644
--- a/config-models/aether-2.0.x/Chart.yaml
+++ b/config-models/aether-2.0.x/Chart.yaml
@@ -4,7 +4,7 @@
 
 apiVersion: v2
 name: config-model-aether-2
-version: 2.0.0
+version: 2.0.1
 kubeVersion: ">=1.18.0"
 appVersion: 2.0.0
 description: Aether config model
diff --git a/config-models/aether-2.0.x/files/aether-2.0.0.tree b/config-models/aether-2.0.x/files/aether-2.0.0.tree
index 24f7a1b..32b29fc 100644
--- a/config-models/aether-2.0.x/files/aether-2.0.0.tree
+++ b/config-models/aether-2.0.x/files/aether-2.0.0.tree
@@ -1,161 +1,129 @@
-module: onf-application
-  +--rw application
-     +--rw application* [id]
-        +--rw id              application-id
-        +--rw display-name?   string
-        +--rw description?    at:description
-        +--rw address         ietf:host
-        +--rw endpoint* [endpoint-id]
-        |  +--rw endpoint-id      yg:yang-identifier
-        |  +--rw port-start?      ietf:port-number
-        |  +--rw port-end?        ietf:port-number
-        |  +--rw protocol?        at:protocol
-        |  +--rw mbr
-        |  |  +--rw uplink?     at:bitrate
-        |  |  +--rw downlink?   at:bitrate
-        |  +--rw traffic-class?   -> /tc:traffic-class/traffic-class/id
-        |  +--rw display-name?    string
-        +--rw enterprise      -> /ent:enterprise/enterprise/id
+module: onf-enterprise
+  +--rw enterprises
+     +--rw enterprise* [ent-id]
+        +--rw ent-id                  enterprise-id
+        +--rw display-name?           string
+        +--rw description?            at:description
+        +--rw connectivity-service* [connectivity-service]
+        |  +--rw connectivity-service    -> /cs:connectivity-services/connectivity-service/id
+        |  +--rw enabled?                boolean
+        +--rw application* [app-id]
+        |  +--rw app-id          application-id
+        |  +--rw display-name?   string
+        |  +--rw description?    at:description
+        |  +--rw address         ietf:host
+        |  +--rw endpoint* [endpoint-id]
+        |     +--rw endpoint-id      yg:yang-identifier
+        |     +--rw port-start?      ietf:port-number
+        |     +--rw port-end?        ietf:port-number
+        |     +--rw protocol?        at:protocol
+        |     +--rw mbr
+        |     |  +--rw uplink?     at:bitrate
+        |     |  +--rw downlink?   at:bitrate
+        |     +--rw traffic-class?   -> ../../../traffic-class/tc-id
+        |     +--rw display-name?    string
+        +--rw traffic-class* [tc-id]
+        |  +--rw tc-id           traffic-class-id
+        |  +--rw display-name?   string
+        |  +--rw arp?            at:arp
+        |  +--rw qci?            at:qci
+        |  +--rw pelr?           at:pelr
+        |  +--rw pdb?            at:pdb
+        |  +--rw description?    at:description
+        +--rw template* [tp-id]
+        |  +--rw tp-id               template-id
+        |  +--rw display-name?       string
+        |  +--rw sst?                at:sst
+        |  +--rw sd?                 at:sd
+        |  +--rw slice
+        |  |  +--rw mbr
+        |  |     +--rw uplink?                at:bitrate
+        |  |     +--rw downlink?              at:bitrate
+        |  |     +--rw uplink-burst-size?     at:burst
+        |  |     +--rw downlink-burst-size?   at:burst
+        |  +--rw default-behavior    at:behavior
+        |  +--rw description?        at:description
+        +--rw site* [site-id]
+           +--rw site-id            site-id
+           +--rw display-name?      string
+           +--rw small-cell* [small-cell-id]
+           |  +--rw small-cell-id    yg:yang-identifier
+           |  +--rw address?         inet:host
+           |  +--rw tac              at:tac
+           |  +--rw enable?          boolean
+           |  +--rw display-name?    string
+           +--rw monitoring
+           |  +--rw edge-cluster-prometheus-url?      inet:uri
+           |  +--rw edge-monitoring-prometheus-url?   inet:uri
+           |  +--rw edge-device* [edge-device-id]
+           |     +--rw edge-device-id    yg:yang-identifier
+           |     +--rw display-name?     string
+           |     +--rw description?      at:description
+           +--rw imsi-definition
+           |  +--rw mcc           at:mcc
+           |  +--rw mnc           at:mnc
+           |  +--rw enterprise    at:ent
+           |  +--rw format        string
+           +--rw description?       at:description
+           +--rw upf* [upf-id]
+           |  +--rw upf-id             upf-id
+           |  +--rw address            inet:host
+           |  +--rw port               inet:port-number
+           |  +--rw config-endpoint?   inet:uri
+           |  +--rw display-name?      string
+           |  +--rw description?       at:description
+           +--rw vcs* [vcs-id]
+           |  +--rw vcs-id              vcs-id
+           |  +--rw display-name?       string
+           |  +--rw device-group* [device-group]
+           |  |  +--rw device-group    -> ../../../device-group/dg-id
+           |  |  +--rw enable?         boolean
+           |  +--rw default-behavior    at:behavior
+           |  +--rw filter* [application]
+           |  |  +--rw application    -> ../../../../application/app-id
+           |  |  +--rw priority?      at:priority
+           |  |  +--rw allow?         boolean
+           |  +--rw upf?                -> ../../upf/upf-id
+           |  +--rw description?        at:description
+           |  +--rw sst                 at:sst
+           |  +--rw sd                  at:sd
+           |  +--rw slice
+           |     +--rw mbr
+           |        +--rw uplink?                at:bitrate
+           |        +--rw downlink?              at:bitrate
+           |        +--rw uplink-burst-size?     at:burst
+           |        +--rw downlink-burst-size?   at:burst
+           +--rw device-group* [dg-id]
+           |  +--rw dg-id           device-group-id
+           |  +--rw description?    at:description
+           |  +--rw display-name?   string
+           |  +--rw imsis* [imsi-id]
+           |  |  +--rw imsi-id            yg:yang-identifier
+           |  |  +--rw imsi-range-from?   uint64
+           |  |  +--rw imsi-range-to?     uint64
+           |  |  +--rw display-name?      string
+           |  +--rw ip-domain?      -> ../../ip-domain/ip-id
+           |  +--rw device
+           |     +--rw mbr
+           |     |  +--rw uplink      at:bitrate
+           |     |  +--rw downlink    at:bitrate
+           |     +--rw traffic-class    -> ../../../../traffic-class/tc-id
+           +--rw ip-domain* [ip-id]
+              +--rw ip-id            ip-domain-id
+              +--rw display-name?    string
+              +--rw dnn              at:dnn
+              +--rw dns-primary?     inet:ip-address
+              +--rw dns-secondary?   inet:ip-address
+              +--rw subnet           inet:ipv4-prefix
+              +--rw admin-status?    at:admin-status
+              +--rw mtu?             at:mtu
+              +--rw description?     at:description
 
 module: onf-connectivity-service
-  +--rw connectivity-service
+  +--rw connectivity-services
      +--rw connectivity-service* [id]
         +--rw id                    connectivity-service-id
         +--rw display-name?         string
         +--rw description?          at:description
         +--rw core-5g-endpoint?     inet:uri
         +--rw acc-prometheus-url?   inet:uri
-
-module: onf-device-group
-  +--rw device-group
-     +--rw device-group* [id]
-        +--rw id              device-group-id
-        +--rw description?    at:description
-        +--rw display-name?   string
-        +--rw imsis* [imsi-id]
-        |  +--rw imsi-id            yg:yang-identifier
-        |  +--rw imsi-range-from?   uint64
-        |  +--rw imsi-range-to?     uint64
-        |  +--rw display-name?      string
-        +--rw ip-domain?      -> /ipd:ip-domain/ip-domain/id
-        +--rw device
-        |  +--rw mbr
-        |  |  +--rw uplink      at:bitrate
-        |  |  +--rw downlink    at:bitrate
-        |  +--rw traffic-class    -> /tc:traffic-class/traffic-class/id
-        +--rw site            -> /st:site/site/id
-
-module: onf-enterprise
-  +--rw enterprise
-     +--rw enterprise* [id]
-        +--rw id                      enterprise-id
-        +--rw display-name?           string
-        +--rw description?            at:description
-        +--rw connectivity-service* [connectivity-service]
-           +--rw connectivity-service    -> /cs:connectivity-service/connectivity-service/id
-           +--rw enabled?                boolean
-
-module: onf-ip-domain
-  +--rw ip-domain
-     +--rw ip-domain* [id]
-        +--rw id               ip-domain-id
-        +--rw display-name?    string
-        +--rw dnn              at:dnn
-        +--rw dns-primary?     inet:ip-address
-        +--rw dns-secondary?   inet:ip-address
-        +--rw subnet           inet:ipv4-prefix
-        +--rw admin-status?    at:admin-status
-        +--rw mtu?             at:mtu
-        +--rw description?     at:description
-        +--rw enterprise       -> /ent:enterprise/enterprise/id
-
-module: onf-site
-  +--rw site
-     +--rw site* [id]
-        +--rw id                 site-id
-        +--rw display-name?      string
-        +--rw small-cell* [small-cell-id]
-        |  +--rw small-cell-id    yg:yang-identifier
-        |  +--rw address?         inet:host
-        |  +--rw tac              at:tac
-        |  +--rw enable?          boolean
-        |  +--rw display-name?    string
-        +--rw monitoring
-        |  +--rw edge-cluster-prometheus-url?      inet:uri
-        |  +--rw edge-monitoring-prometheus-url?   inet:uri
-        |  +--rw edge-device* [edge-device-id]
-        |     +--rw edge-device-id    yg:yang-identifier
-        |     +--rw display-name?     string
-        |     +--rw description?      at:description
-        +--rw enterprise         -> /ent:enterprise/enterprise/id
-        +--rw imsi-definition
-        |  +--rw mcc           at:mcc
-        |  +--rw mnc           at:mnc
-        |  +--rw enterprise    at:ent
-        |  +--rw format        string
-        +--rw description?       at:description
-
-module: onf-template
-  +--rw template
-     +--rw template* [id]
-        +--rw id                  template-id
-        +--rw display-name?       string
-        +--rw sst?                at:sst
-        +--rw sd?                 at:sd
-        +--rw slice
-        |  +--rw mbr
-        |     +--rw uplink?                at:bitrate
-        |     +--rw downlink?              at:bitrate
-        |     +--rw uplink-burst-size?     at:burst
-        |     +--rw downlink-burst-size?   at:burst
-        +--rw default-behavior    at:behavior
-        +--rw description?        at:description
-
-module: onf-traffic-class
-  +--rw traffic-class
-     +--rw traffic-class* [id]
-        +--rw id              traffic-class-id
-        +--rw display-name?   string
-        +--rw arp?            at:arp
-        +--rw qci?            at:qci
-        +--rw pelr?           at:pelr
-        +--rw pdb?            at:pdb
-        +--rw description?    at:description
-
-module: onf-upf
-  +--rw upf
-     +--rw upf* [id]
-        +--rw id                 upf-id
-        +--rw address            inet:host
-        +--rw port               inet:port-number
-        +--rw config-endpoint?   inet:uri
-        +--rw display-name?      string
-        +--rw description?       at:description
-        +--rw enterprise         -> /ent:enterprise/enterprise/id
-        +--rw site               -> /st:site/site/id
-
-module: onf-vcs
-  +--rw vcs
-     +--rw vcs* [id]
-        +--rw id                  vcs-id
-        +--rw display-name?       string
-        +--rw device-group* [device-group]
-        |  +--rw device-group    -> /dg:device-group/device-group/id
-        |  +--rw enable?         boolean
-        +--rw default-behavior    at:behavior
-        +--rw filter* [application]
-        |  +--rw application    -> /app:application/application/id
-        |  +--rw priority?      at:priority
-        |  +--rw allow?         boolean
-        +--rw upf?                -> /upf:upf/upf/id
-        +--rw description?        at:description
-        +--rw enterprise          -> /ent:enterprise/enterprise/id
-        +--rw site                -> /st:site/site/id
-        +--rw sst                 at:sst
-        +--rw sd                  at:sd
-        +--rw slice
-           +--rw mbr
-              +--rw uplink?                at:bitrate
-              +--rw downlink?              at:bitrate
-              +--rw uplink-burst-size?     at:burst
-              +--rw downlink-burst-size?   at:burst
diff --git a/config-models/aether-2.0.x/files/yang/onf-application.yang b/config-models/aether-2.0.x/files/yang/onf-application.yang
index c48cab1..c81c501 100755
--- a/config-models/aether-2.0.x/files/yang/onf-application.yang
+++ b/config-models/aether-2.0.x/files/yang/onf-application.yang
@@ -2,15 +2,14 @@
 //
 // SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
 
-module onf-application {
-  namespace "http://opennetworking.org/enterprise/application";
-  prefix app;
+submodule onf-application {
+  belongs-to onf-enterprise { prefix ent; }
 
   import ietf-inet-types{ prefix ietf; }
   import ietf-yang-types{ prefix yg; }
   import onf-aether-types{ prefix at; }
-  import onf-enterprise{ prefix ent; }
-  import onf-traffic-class{ prefix tc; }
+
+  include onf-traffic-class;
 
   organization "Open Networking Foundation.";
   contact "Scott Baker";
@@ -19,6 +18,11 @@
      connect to. Includes a set of endpoints where services are
      provided.";
 
+  revision "2022-01-14" {
+    description "Refactored as submodule";
+    reference "RFC 6020";
+  }
+
   revision "2021-09-10" {
     description "Aether Application.";
     reference "RFC 6087";
@@ -31,15 +35,15 @@
     description "The typedef for application-id";
   }
 
-  container application {
-    description "The top level container";
+  grouping application {
+    description "The application grouping";
 
     list application {
-      key "id";
+      key "app-id";
       description
         "List of applications";
 
-      leaf id {
+      leaf app-id {
         type application-id;
         description "ID for this application.";
       }
@@ -101,7 +105,7 @@
         }
         leaf traffic-class {
           type leafref {
-            path "/tc:traffic-class/tc:traffic-class/tc:id";
+            path "../../../traffic-class/tc-id";
           }
           description
             "Link to traffic class";
@@ -114,15 +118,6 @@
         }
         description "list for endpoint";
       }
-
-      leaf enterprise {
-        type leafref {
-          path "/ent:enterprise/ent:enterprise/ent:id";
-        }
-        mandatory true;
-        description
-          "Link to enterprise that owns this Application. May be set to None if the application is global to all Enterprises.";
-      }
     }
   }
 }
diff --git a/config-models/aether-2.0.x/files/yang/onf-connectivity-service.yang b/config-models/aether-2.0.x/files/yang/onf-connectivity-service.yang
index e1d53b6..183be39 100755
--- a/config-models/aether-2.0.x/files/yang/onf-connectivity-service.yang
+++ b/config-models/aether-2.0.x/files/yang/onf-connectivity-service.yang
@@ -16,6 +16,11 @@
     "An Aether Connectivity service is the linkage between the
      ROC and a core that provides connectivity.";
 
+  revision "2022-01-14" {
+    description "Renamed top level container as plural";
+    reference "RFC 6020";
+  }
+
   revision "2021-10-21" {
     description "An Aether Connectivity Service. Specifies the endpoints where the sdcore-adapter should push configuration to. A single connectivity service may be attached to multiple Enterprises.";
     reference "RFC 6087";
@@ -28,8 +33,8 @@
    description "The typedef for connectivity-service-id";
   }
 
-  container connectivity-service {
-    description "The top level container";
+  container connectivity-services {
+    description "The connectivity-services top level container";
 
     list connectivity-service {
       key "id";
diff --git a/config-models/aether-2.0.x/files/yang/onf-device-group.yang b/config-models/aether-2.0.x/files/yang/onf-device-group.yang
index a93c295..4b5371b 100755
--- a/config-models/aether-2.0.x/files/yang/onf-device-group.yang
+++ b/config-models/aether-2.0.x/files/yang/onf-device-group.yang
@@ -2,15 +2,14 @@
 //
 // SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
 
-module onf-device-group {
-  namespace "http://opennetworking.org/aether/device-group";
-  prefix dg;
+submodule onf-device-group {
+  belongs-to onf-enterprise { prefix ent; }
 
   import ietf-yang-types{ prefix yg; }
   import onf-aether-types { prefix at; }
-  import onf-ip-domain{ prefix ipd; }
-  import onf-site{ prefix st; }
-  import onf-traffic-class{ prefix tc; }
+
+  include onf-ip-domain;
+  include onf-traffic-class;
 
   organization "Open Networking Foundation.";
   contact "Scott Baker";
@@ -25,6 +24,11 @@
      and DNS settings that apply to devices within the
      group";
 
+  revision "2022-01-14" {
+    description "Refactored as submodule";
+    reference "RFC 6020";
+  }
+
   revision "2021-06-02" {
     description "An Aether Device Group";
     reference "RFC 6087";
@@ -37,15 +41,15 @@
     description "The typedef for device-group-id";
   }
 
-  container device-group {
-    description "The top level container";
+  grouping device-group {
+    description "The device-group grouping";
 
     list device-group {
-      key "id";
+      key "dg-id";
       description
         "List of device groups";
 
-      leaf id {
+      leaf dg-id {
         type device-group-id;
         description "ID for this device group.";
       }
@@ -93,7 +97,7 @@
 
       leaf ip-domain {
         type leafref {
-          path "/ipd:ip-domain/ipd:ip-domain/ipd:id";
+          path "../../ip-domain/ip-id";
         }
         description
           "Link to ip-domain settings that determine the pool of IP addresses,
@@ -120,22 +124,13 @@
         }
         leaf traffic-class {
           type leafref {
-            path "/tc:traffic-class/tc:traffic-class/tc:id";
+            path "../../../../traffic-class/tc-id";
           }
           mandatory true;
           description
             "Link to traffic class";
         }
       }
-
-      leaf site {
-        type leafref {
-          path "/st:site/st:site/st:id";
-        }
-        mandatory true;
-        description
-          "Link to site";
-      }
     }
   }
 }
diff --git a/config-models/aether-2.0.x/files/yang/onf-enterprise.yang b/config-models/aether-2.0.x/files/yang/onf-enterprise.yang
index 16ad5f9..95e691e 100755
--- a/config-models/aether-2.0.x/files/yang/onf-enterprise.yang
+++ b/config-models/aether-2.0.x/files/yang/onf-enterprise.yang
@@ -10,12 +10,26 @@
   import onf-aether-types { prefix at; }
   import onf-connectivity-service { prefix cs; }
 
+  include onf-site;
+  include onf-upf;
+  include onf-vcs;
+  include onf-device-group;
+  include onf-ip-domain;
+  include onf-application;
+  include onf-traffic-class;
+  include onf-template;
+
   organization "Open Networking Foundation.";
   contact "Scott Baker";
   description
     "An Aether Enterprise is an administration entity that
      has ownership of resrouces.";
 
+  revision "2022-01-14" {
+    description "Refactored to work with submodules";
+    reference "RFC 6020";
+  }
+
   revision "2021-06-02" {
     description "An Aether Enterprise. Used to distinguish ownership of devices and other resources as well as a domain of configuration.";
     reference "RFC 6087";
@@ -28,15 +42,15 @@
    description "The typedef for enterprise-id";
   }
 
-  container enterprise {
-    description "The top level container";
+  container enterprises {
+    description "The top level enterprises container";
 
     list enterprise {
-      key "id";
+      key "ent-id";
       description
         "List of enterprises";
 
-      leaf id {
+      leaf ent-id {
         type enterprise-id;
         description "ID for this enterprise.";
       }
@@ -57,7 +71,7 @@
         key "connectivity-service";
         leaf connectivity-service {
           type leafref {
-            path "/cs:connectivity-service/cs:connectivity-service/cs:id";
+            path "/cs:connectivity-services/cs:connectivity-service/cs:id";
           }
           description
             "Link to connectivity services where configuration should be pushed for this enterprise's devices";
@@ -70,6 +84,14 @@
         }
         description "The list for connectivity-service";
       }
+
+      uses application;
+
+      uses traffic-class;
+
+      uses template;
+
+      uses site;
     }
   }
 }
diff --git a/config-models/aether-2.0.x/files/yang/onf-ip-domain.yang b/config-models/aether-2.0.x/files/yang/onf-ip-domain.yang
index e896cc5..b5fb974 100755
--- a/config-models/aether-2.0.x/files/yang/onf-ip-domain.yang
+++ b/config-models/aether-2.0.x/files/yang/onf-ip-domain.yang
@@ -2,14 +2,12 @@
 //
 // SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
 
-module onf-ip-domain {
-  namespace "http://opennetworking.org/aether/ip-domain";
-  prefix ipd;
+submodule onf-ip-domain {
+  belongs-to onf-enterprise { prefix ent; }
 
   import ietf-inet-types { prefix inet; }
   import ietf-yang-types{ prefix yg; }
   import onf-aether-types { prefix at; }
-  import onf-enterprise{ prefix ent; }
 
   organization "Open Networking Foundation.";
   contact "Scott Baker";
@@ -18,6 +16,11 @@
      that may be assigned to UEs, as well as DNS servers and other
      metadata";
 
+  revision "2022-01-14" {
+    description "Refactored as submodule";
+    reference "RFC 6020";
+  }
+
   revision "2021-06-02" {
     description "An Aether IP and Domain Specification";
     reference "RFC 6087";
@@ -30,15 +33,15 @@
     description "The typedef for ip-domain-id";
   }
 
-  container ip-domain {
-    description "The top level container";
+  grouping ip-domain {
+    description "The ip-domain grouping";
 
     list ip-domain {
-      key "id";
+      key "ip-id";
       description
         "List of ip domains";
 
-      leaf id {
+      leaf ip-id {
         type ip-domain-id;
         description "ID for this ip domain.";
       }
@@ -88,17 +91,6 @@
         type at:description;
         description "description of this ip domain";
       }
-
-      // Ip-Domain is always owned by an Enterprise, because it contains
-      // IP addresses relative to that Enterprise.
-      leaf enterprise {
-        type leafref {
-          path "/ent:enterprise/ent:enterprise/ent:id";
-        }
-        mandatory true;
-        description
-          "Link to enterprise that owns this IP-Domain";
-      }
     }
   }
 }
diff --git a/config-models/aether-2.0.x/files/yang/onf-site.yang b/config-models/aether-2.0.x/files/yang/onf-site.yang
index b5f22c4..2b782ff 100755
--- a/config-models/aether-2.0.x/files/yang/onf-site.yang
+++ b/config-models/aether-2.0.x/files/yang/onf-site.yang
@@ -2,20 +2,28 @@
 //
 // SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
 
-module onf-site {
-  namespace "http://opennetworking.org/aether/site";
-  prefix st;
+submodule onf-site {
+  belongs-to onf-enterprise { prefix ent; }
 
   import ietf-inet-types { prefix inet; }
   import ietf-yang-types{ prefix yg; }
   import onf-aether-types{ prefix at; }
-  import onf-enterprise{ prefix ent; }
+
+  include onf-upf;
+  include onf-vcs;
+  include onf-device-group;
+  include onf-ip-domain;
 
   organization "Open Networking Foundation.";
   contact "Scott Baker";
   description
     "An Aether site is a location where resources are deployed.";
 
+  revision "2022-01-14" {
+    description "Refactored as submodule";
+    reference "RFC 6020";
+  }
+
   revision "2021-09-10" {
     description "An Aether Site.";
     reference "RFC 6087";
@@ -28,15 +36,15 @@
     description "The typedef for site-id";
   }
 
-  container site {
-    description "The top level container";
+  grouping site {
+    description "The site grouping";
 
     list site {
-      key "id";
+      key "site-id";
       description
         "List of site";
 
-      leaf id {
+      leaf site-id {
         type site-id;
         description "ID for this site.";
       }
@@ -117,15 +125,6 @@
             "container for monitoring";
       }
 
-      leaf enterprise {
-        type leafref {
-          path "/ent:enterprise/ent:enterprise/ent:id";
-        }
-        mandatory true;
-        description
-          "Link to enterprise that owns this site";
-      }
-
       container imsi-definition {
         leaf mcc {
           type at:mcc;
@@ -167,6 +166,14 @@
         type at:description;
         description "description of this site";
       }
+
+      uses upf;
+
+      uses vcs;
+
+      uses device-group;
+
+      uses ip-domain;
     }
   }
 }
diff --git a/config-models/aether-2.0.x/files/yang/onf-template.yang b/config-models/aether-2.0.x/files/yang/onf-template.yang
index bbd94ef..7c1f1b9 100755
--- a/config-models/aether-2.0.x/files/yang/onf-template.yang
+++ b/config-models/aether-2.0.x/files/yang/onf-template.yang
@@ -2,9 +2,8 @@
 //
 // SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
 
-module onf-template {
-  namespace "http://opennetworking.org/aether/template";
-  prefix tp;
+submodule onf-template {
+  belongs-to onf-enterprise { prefix ent; }
 
   import ietf-yang-types{ prefix yg; }
   import onf-aether-types{ prefix at; }
@@ -16,6 +15,11 @@
      by a virtual connectivity service. Templates are used to
      populate a VCS.";
 
+  revision "2022-01-14" {
+    description "Refactored as submodule";
+    reference "RFC 6020";
+  }
+
   revision "2021-09-10" {
     description "An Aether Virtual Cellular Service Template";
     reference "RFC 6087";
@@ -28,15 +32,15 @@
     description "The typedef for template-id";
   }
 
-  container template {
-    description "The top level container";
+  grouping template {
+    description "The template grouping";
 
     list template {
-      key "id";
+      key "tp-id";
       description
         "List of vcs templates";
 
-      leaf id {
+      leaf tp-id {
         type template-id;
         description "ID for this vcs template.";
       }
diff --git a/config-models/aether-2.0.x/files/yang/onf-traffic-class.yang b/config-models/aether-2.0.x/files/yang/onf-traffic-class.yang
index a592267..4a4a96d 100755
--- a/config-models/aether-2.0.x/files/yang/onf-traffic-class.yang
+++ b/config-models/aether-2.0.x/files/yang/onf-traffic-class.yang
@@ -2,9 +2,8 @@
 //
 // SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
 
-module onf-traffic-class {
-  namespace "http://opennetworking.org/aether/traffic-class";
-  prefix tp;
+submodule onf-traffic-class {
+  belongs-to onf-enterprise { prefix ent; }
 
   import ietf-yang-types{ prefix yg; }
   import onf-aether-types{ prefix at; }
@@ -15,6 +14,11 @@
     "The aether traffic class associates qos constants
      with a named class of service";
 
+  revision "2022-01-14" {
+    description "Refactored as submodule";
+    reference "RFC 6020";
+  }
+
   revision "2021-09-10" {
     description "An Aether Traffic Class";
     reference "RFC 6087";
@@ -27,15 +31,15 @@
     description "The typedef for traffic-class-id";
   }
 
-  container traffic-class {
-    description "The top level container";
+  grouping traffic-class {
+    description "The traffic-class grouping";
 
     list traffic-class {
-      key "id";
+      key "tc-id";
       description
         "List of traffic class";
 
-      leaf id {
+      leaf tc-id {
         type traffic-class-id;
         description "ID for this traffic class.";
       }
diff --git a/config-models/aether-2.0.x/files/yang/onf-upf.yang b/config-models/aether-2.0.x/files/yang/onf-upf.yang
index 5c8be50..4d27f31 100755
--- a/config-models/aether-2.0.x/files/yang/onf-upf.yang
+++ b/config-models/aether-2.0.x/files/yang/onf-upf.yang
@@ -2,20 +2,22 @@
 //
 // SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
 
-module onf-upf {
-  namespace "http://opennetworking.org/aether/upf";
-  prefix upf;
+submodule onf-upf {
+  belongs-to onf-enterprise { prefix ent; }
 
   import ietf-inet-types { prefix inet; }
   import ietf-yang-types{ prefix yg; }
   import onf-aether-types { prefix at; }
-  import onf-enterprise{ prefix ent; }
-  import onf-site{ prefix st; }
 
   organization "Open Networking Foundation.";
   contact "Scott Baker";
   description "A Aether UPF List is a named User Plane Function.";
 
+  revision "2022-01-14" {
+    description "Refactored as submodule";
+    reference "RFC 6020";
+  }
+
   revision "2021-09-16" {
     description "An Aether User Plane Function";
     reference "RFC 6087";
@@ -28,15 +30,15 @@
    description "The typedef for upf-id";
   }
 
-  container upf {
-    description "The top level container";
+  grouping upf {
+    description "The upf grouping";
 
     list upf {
-      key "id";
+      key "upf-id";
       description
         "A list of named upfs.";
 
-      leaf id {
+      leaf upf-id {
         type upf-id;
         description "ID for this upf.";
       }
@@ -71,28 +73,6 @@
         type at:description;
         description "description of this UPF";
       }
-
-      // UPFs are always owned by an Enterprise, since they typically exist on the
-      // Enterprise's edge.
-      leaf enterprise {
-        type leafref {
-          path "/ent:enterprise/ent:enterprise/ent:id";
-        }
-        mandatory true;
-        description
-          "Link to enterprise that owns this Access Point List";
-      }
-
-      // UPFs always reside at a site, as the exist on physical infrastructure. GUI
-      // will ensure that the tuple (DG, VCS, UPF) all exist on the same site.
-      leaf site {
-        type leafref {
-          path "/st:site/st:site/st:id";
-        }
-        mandatory true;
-        description
-          "Link to site";
-      }
     }
   }
 }
diff --git a/config-models/aether-2.0.x/files/yang/onf-vcs.yang b/config-models/aether-2.0.x/files/yang/onf-vcs.yang
index c275565..d050ed1 100755
--- a/config-models/aether-2.0.x/files/yang/onf-vcs.yang
+++ b/config-models/aether-2.0.x/files/yang/onf-vcs.yang
@@ -2,17 +2,15 @@
 //
 // SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
 
-module onf-vcs {
-  namespace "http://opennetworking.org/aether/vcs";
-  prefix sl;
+submodule onf-vcs {
+  belongs-to onf-enterprise { prefix ent; }
 
   import ietf-yang-types{ prefix yg; }
   import onf-aether-types{ prefix at; }
-  import onf-application{ prefix app; }
-  import onf-device-group{ prefix dg; }
-  import onf-enterprise{ prefix ent; }
-  import onf-upf { prefix upf; }
-  import onf-site{ prefix st; }
+
+  include onf-upf;
+  include onf-device-group;
+  include onf-application;
 
   organization "Open Networking Foundation.";
   contact "Scott Baker";
@@ -20,6 +18,11 @@
     "An Aether Virtual Cellular Service (VCS) is
      used to connect devices with applications";
 
+  revision "2022-01-14" {
+    description "Refactored as submodule";
+    reference "RFC 6020";
+  }
+
   revision "2021-09-10" {
     description "An Aether Virtual Cellular Service";
     reference "RFC 6087";
@@ -32,15 +35,15 @@
     description "The typedef for vcs-id";
   }
 
-  container vcs {
-    description "The top level container";
+  grouping vcs {
+    description "The vcs grouping";
 
     list vcs {
-      key "id";
+      key "vcs-id";
       description
         "List of virtual cellular services";
 
-      leaf id {
+      leaf vcs-id {
         type vcs-id;
         description "ID for this vcs.";
       }
@@ -56,7 +59,7 @@
         key "device-group";
         leaf device-group {
           type leafref {
-            path "/dg:device-group/dg:device-group/dg:id";
+            path "../../../device-group/dg-id";
           }
           description
             "Link to device group";
@@ -83,7 +86,7 @@
         key "application";
         leaf application {
           type leafref {
-            path "/app:application/app:application/app:id";
+            path "../../../../application/app-id";
           }
           mandatory true;
           description
@@ -109,7 +112,7 @@
 
       leaf upf {
         type leafref {
-          path "/upf:upf/upf:upf/upf:id";
+          path "../../upf/upf-id";
         }
         description
           "Link to user plane that implements this vcf";
@@ -120,24 +123,6 @@
         description "description of this vcs";
       }
 
-      leaf enterprise {
-        type leafref {
-          path "/ent:enterprise/ent:enterprise/ent:id";
-        }
-        mandatory true;
-        description
-          "Link to enterprise that owns this VCS";
-      }
-
-      leaf site {
-        type leafref {
-          path "/st:site/st:site/st:id";
-        }
-	mandatory true;
-        description
-          "Link to site where this VCS is deployed";
-      }
-
       // the following are populated from the template
       leaf sst {
         type at:sst;
diff --git a/config-models/aether-2.0.x/templates/model.yaml b/config-models/aether-2.0.x/templates/model.yaml
index 301bfae..b6ef0f6 100644
--- a/config-models/aether-2.0.x/templates/model.yaml
+++ b/config-models/aether-2.0.x/templates/model.yaml
@@ -14,50 +14,14 @@
     type: Aether
     version: {{ .Chart.AppVersion | quote }}
   modules:
-  - name: connectivity-service
+  - name: onf-connectivity-service
     organization: Open Networking Foundation
-    revision: 2021-10-21
+    revision: 2022-01-14
     file: onf-connectivity-service.yang
-  - name: enterprise
+  - name: onf-enterprise
     organization: Open Networking Foundation
-    revision: 2021-06-02
+    revision: 2022-01-14
     file: onf-enterprise.yang
-  - name: aether-types
-    organization: Open Networking Foundation
-    revision: 2021-09-10
-    file: onf-aether-types.yang
-  - name: application
-    organization: Open Networking Foundation
-    revision: 2021-09-10
-    file: onf-application.yang
-  - name: device-group
-    organization: Open Networking Foundation
-    revision: 2021-06-02
-    file: onf-device-group.yang
-  - name: ip-domain
-    organization: Open Networking Foundation
-    revision: 2021-06-02
-    file: onf-ip-domain.yang
-  - name: site
-    organization: Open Networking Foundation
-    revision: 2021-09-10
-    file: onf-site.yang
-  - name: upf-list
-    organization: Open Networking Foundation
-    revision: 2021-09-16
-    file: onf-upf.yang
-  - name: vcs
-    organization: Open Networking Foundation
-    revision: 2021-09-10
-    file: onf-vcs.yang
-  - name: template
-    organization: Open Networking Foundation
-    revision: 2021-09-10
-    file: onf-template.yang
-  - name: traffic-class
-    organization: Open Networking Foundation
-    revision: 2021-06-02
-    file: onf-traffic-class.yang    
   files:
     {{- range $path, $_  := $.Files.Glob "files/yang/*.yang" }}
     {{ base $path }}: |