RIFT-15222: Several relative leafref paths need to be fixed to include reference...
[osm/SO.git] / models / plugins / yang / vnfd.yang
index c035bd3..a825be1 100644 (file)
@@ -67,6 +67,10 @@ module vnfd
       description "Type of the connection point.";
       type manotypes:connection-point-type;
     }
+    leaf port-security-enabled {
+      description "Enables the port security for the port";
+      type boolean;
+    }
   }
 
   grouping virtual-interface {
@@ -115,14 +119,7 @@ module vnfd
     }
   }
 
-  container vnfd-catalog {
-
-    description
-        "Virtual Network Function Descriptor (VNFD).";
-
-    list vnfd {
-      key "id";
-
+  grouping vnfd-descriptor {
       leaf id {
         description "Identifier for the VNFD.";
         type string;
@@ -183,7 +180,7 @@ module vnfd
                 "Use the default management interface on this VDU.";
             leaf vdu-id {
               type leafref {
-                path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:vdu/vnfd:id";
+                path "../../vdu/id";
               }
             }
           }
@@ -193,7 +190,7 @@ module vnfd
                 "Use the ip address associated with this connection point.";
             leaf cp {
               type leafref {
-                path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:connection-point/vnfd:name";
+                path "../../connection-point/name";
               }
             }
           }
@@ -268,15 +265,41 @@ module vnfd
           type uint64;
         }
 
-        leaf-list internal-connection-point-ref {
-          type leafref {
-            path "../../vdu/internal-connection-point/id";
+        list internal-connection-point {
+          key "id-ref";
+          description "List of internal connection points in this VLD";
+          leaf id-ref {
+            description "reference to the internal connection point id";
+            type leafref {
+              path "../../../vdu/internal-connection-point/id";
+            }
           }
         }
-
         uses manotypes:provider-network;
+        choice init-params {
+          description "Extra parameters for VLD instantiation";
+
+          case vim-network-ref {
+            leaf vim-network-name {
+              description
+                  "Name of network in VIM account. This is used to indicate
+                    pre-provisioned network name in cloud account.";
+              type string;
+            }
+          }
+
+          case vim-network-profile {
+            leaf ip-profile-ref {
+              description "Named reference to IP-profile object";
+              type string;
+            }
+          }
+
+        }
       }
 
+      uses manotypes:ip-profile-list;
+
       list connection-point {
         key "name";
         description
@@ -338,26 +361,7 @@ module vnfd
           uses manotypes:alarm;
         }
 
-        leaf image {
-          description
-            "Image name for the software image.
-             If the image name is found within the VNF packaage it will
-             be uploaded to all cloud accounts during onboarding process.
-             Otherwise, the image must be added to the cloud account with
-             the same name as entered here.
-            ";
-          mandatory true;
-          type string;
-        }
-
-        leaf image-checksum {
-          description
-            "Image md5sum for the software image.
-            The md5sum, if provided, along with the image name uniquely
-            identifies an image uploaded to the CAL.
-            ";
-          type string;
-        }
+        uses manotypes:image-properties;
 
         choice cloud-init-input {
           description
@@ -381,6 +385,8 @@ module vnfd
           }
         }
 
+        uses manotypes:supplemental-boot-data;
+
         list internal-connection-point {
           key "id";
           description
@@ -443,6 +449,17 @@ module vnfd
           }
           uses virtual-interface;
         }
+
+        list volumes {
+          key "name";
+
+          leaf name {
+            description "Name of the disk-volumes, e.g. vda, vdb etc";
+            type string;
+          }
+
+          uses manotypes:volume-info;
+        } 
       }
 
       list vdu-dependency {
@@ -494,7 +511,7 @@ module vnfd
 
         key "name";
         uses manotypes:placement-group-info;
-        
+
         list member-vdus {
 
           description
@@ -508,7 +525,17 @@ module vnfd
           }
         }
       }
-    }
+  }
+
+  container vnfd-catalog {
+    description
+        "Virtual Network Function Descriptor (VNFD).";
+
+    list vnfd {
+      key "id";
+
+      uses vnfd-descriptor;
+     }
   }
 }