Day-2 primitives for CNF with proxy charms
[osm/IM.git] / models / augments / kdu.yang
index 0cad701..1b5c084 100644 (file)
@@ -24,10 +24,6 @@ module kdu {
         prefix vnfd;
     }
 
         prefix vnfd;
     }
 
-    import common-augments {
-        prefix common;
-    }
-
     grouping extended-ext-cpd {
         leaf k8s-cluster-net {
             description
     grouping extended-ext-cpd {
         leaf k8s-cluster-net {
             description
@@ -40,77 +36,86 @@ module kdu {
         }
     }
 
         }
     }
 
-    grouping extended-kdu-configuration {
-        list kdu-configuration {
-            key "id";
-            leaf id {
-                description
-                  "Internal identifier for the KDU configuration";
-                type string;
-            }
-            uses common:vnfc-configuration;
-            uses common:vdu-config-access;
+    grouping extended-kdu {
+        list kdu {
+            description
+              "List of K8s Deployment Units";
+            key "name";
 
 
-            leaf-list blacklist-config-primitive {
+            leaf name {
                 description
                 description
-                  "List of blacklisted config primitives from the list of
-                   default kdu config primitives";
-
-                type enumeration {
-                    enum upgrade;
-                    enum rollback;
-                }
+                  "Unique name for the KDU";
+                type string;
             }
             }
-        }
-    }
-
-    grouping extended-kdu-model {
-        list kdu-model {
-            key "id";
 
 
-            leaf id {
+            leaf description {
                 description
                 description
-                  "Internal identifier for the KDU model";
+                  "Description of the KDU.";
                 type string;
             }
 
                 type string;
             }
 
-            leaf kdu-model-type {
+            choice kdu-model {
                 description
                   "Indicates the KDU model, either as a helm-chart or as a juju-bundle.";
 
                 description
                   "Indicates the KDU model, either as a helm-chart or as a juju-bundle.";
 
-                type enumeration {
-                    enum helm-chart;
-                    enum juju-bundle;
+                case helm-chart {
+                    leaf helm-chart {
+                        description
+                          "Helm chart that models the KDU, in any of the following ways:
+                           - <helm-repo>/<helm-chart>
+                           - <helm-chart folder under k8s_models folder in the package>
+                           - <helm-chart tgz file (w/ or w/o extension) under k8s_models folder in the package>
+                           - <URL_where_to_fetch_chart>
+                          ";
+                        type string;
+                    }
+
+                    leaf helm-version {
+                        description
+                          "Helm version to use for this helm-chart, v3 by default";
+                        type enumeration {
+                            enum v2;
+                            enum v3;
+                        }
+                        default v3;
+                    }
                 }
                 }
-            }
 
 
-            leaf kdu-model-locator {
-                description
-                  "Indicates the KDU model location, either as a path to a folder in the 
-                   package or as a URL where to fetch the model.";
-
-                type string;
+                case juju-bundle {
+                    leaf juju-bundle {
+                        description
+                          "Juju bundle that models the KDU, in any of the following ways:
+                           - <juju-repo>/<juju-bundle>
+                           - <juju-bundle folder under k8s_models folder in the package>
+                           - <juju-bundle tgz file (w/ or w/o extension) under k8s_models folder in the package>
+                           - <URL_where_to_fetch_juju_bundle>
+                          ";
+                        type string;
+                    }
+                }
             }
             }
-        }
-    }
 
 
-    grouping extended-kdu {
-        list kdu {
-            description
-              "List of K8s Deployment Units";
-            key "name";
+            list service {
+              description
+                "List of Kubernetes services exposed by the KDU.
+                 If empty, all services are assumed to be exposed in the CP associated to the first network
+                 in k8s-cluster.nets.";
+              key name;
 
 
-            leaf name {
-                description
-                  "Unique name for the KDU";
+              leaf name {
+                description "Name of the Kubernetes service exposed by he KDU model";
                 type string;
                 type string;
-            }
+              }
 
 
-            leaf description {
+              leaf external-connection-point-ref {
                 description
                 description
-                  "Description of the KDU.";
+                  "String representing a leaf reference to the particular external connection point.
+                   This field should match /etsi-nfv-vnfd:vnfd/etsi-nfv-vnfd:ext-cpd/etsi-nfv-vnfd:id
+                  ";
                 type string;
                 type string;
+              }
             }
             }
+
         }
 
         container k8s-cluster {
         }
 
         container k8s-cluster {
@@ -155,11 +160,9 @@ module kdu {
 
     augment "/vnfd:vnfd" {
         uses extended-kdu;
 
     augment "/vnfd:vnfd" {
         uses extended-kdu;
-        uses extended-kdu-configuration;
-        uses extended-kdu-model;
     }
 
     augment "/vnfd:vnfd/vnfd:ext-cpd/vnfd:cp-connection" {
         uses extended-ext-cpd;
     }
     }
 
     augment "/vnfd:vnfd/vnfd:ext-cpd/vnfd:cp-connection" {
         uses extended-ext-cpd;
     }
-}
\ No newline at end of file
+}