New Feature : Addtional changes for VNF access point support
[osm/SO.git] / models / plugins / yang / mano-types.yang
index cd5d446..da5d1cd 100644 (file)
@@ -101,6 +101,7 @@ module mano-types
         "The value should be greyed out by the UI.
         Only applies to parameters with default values.";
       type boolean;
+      default false;
     }
 
     leaf hidden {
@@ -108,6 +109,29 @@ module mano-types
         "The value should be hidden by the UI.
         Only applies to parameters with default values.";
       type boolean;
+      default false;
+    }
+
+    leaf out {
+      description "If this is an output of the primitive execution";
+      type boolean;
+      default false;
+    }
+    leaf parameter-type {
+      description "Type of this parameter, whether this in IN or OUT";
+      type enumeration {
+       enum OUT;
+       enum IN;
+      }
+      default "IN";
+    }
+    leaf parameter-path {
+      description "A Leafref to the parameter path with the attribute selection.
+                   At present only attribute ip-address() is supported.
+                   For example, to get the ip address of VNF connection point
+                   the xpath would look something along the following lines,
+                   /vnfd-catalog/vnfd[id='x']/connection-point[name='cp']/ip-address()";
+      type string;
     }
   }
   
@@ -236,25 +260,32 @@ module mano-types
         }
       }
 
-      list service-primitive {
-        rwpb:msg-new ServicePrimitive;
+      list config-primitive {
+        rwpb:msg-new ConfigPrimitive;
         description
-          "List of service primitives supported by the
+          "List of config primitives supported by the
           configuration agent for this VNF.";
         key "name";
 
         leaf name {
           description
-            "Name of the service primitive.";
+            "Name of the config primitive.";
           type string;
         }
 
         list parameter {
           description
-            "List of parameters to the service primitive.";
+            "List of parameters to the config primitive.";
           key "name";
           uses primitive-parameter;
         }
+
+        leaf user-defined-script {
+          description
+            "A user defined script. If user defined script is defined,
+             the script will be executed using bash";
+          type string;
+        }
       }
 
       list initial-config-primitive {
@@ -268,20 +299,28 @@ module mano-types
           type uint64;
         }
 
-        leaf name {
-          description 
-              "Name of the configuration primitive.";
-          type string;
-        }
+        choice primtive-type {
+          case primtive-definition {
+            leaf name {
+              description
+                "Name of the configuration primitive.";
+              type string;
+            }
 
-        list parameter {
-          key "name";
-          leaf name {
-            type string;
+            uses primitive-parameter-value;
           }
 
-          leaf value {
-            type string;
+          case primitive-ref {
+            leaf config-primitive-ref {
+              description
+                "Reference to a config primitive name.
+                 NOTE: The config primitive referred should have
+                       all the input paramaters predefined either
+                       with default values or dependency references.";
+              type leafref {
+                path "../../config-primitive/name";
+              }
+            }
           }
         }
       }
@@ -717,10 +756,13 @@ module mano-types
         type uint64;
       }
       
-      leaf-list cpu-feature {
-        description
-            "List of CPU features.";
-        type cpu-feature-type;
+      list cpu-feature {
+        key "feature";
+        description "List of CPU features.";
+        leaf feature {
+          description "CPU feature.";
+          type cpu-feature-type;
+        }
       }
 
       
@@ -729,9 +771,13 @@ module mano-types
         type string;
       }
 
-      leaf-list om-cpu-feature {
-        description "Openmano CPU features";
-        type string;
+      list om-cpu-feature {
+        key "feature";
+        description "List of openmano CPU features";
+        leaf feature {
+          description "CPU feature";
+          type string;
+        }
       }
     }
   }
@@ -873,11 +919,16 @@ module mano-types
                 type uint64;
               }
 
-              leaf-list vcpu {
+              list vcpu {
+                key "id";
                 description
                     "List of vcpus to allocate on
                      this numa node.";
-                type uint64;
+                leaf id {
+                  type uint64;
+                  description "List of vcpus ids to allocate on
+                               this numa node";
+                }
               }
 
               leaf memory-mb {
@@ -1936,9 +1987,12 @@ module mano-types
         type string;
       }
 
-      leaf-list dns-server {
-        description "List of DNS Servers associated with IP Profile";
-        type inet:ip-address;
+      list dns-server {
+        key "address";
+        leaf address {
+                                       description "List of DNS Servers associated with IP Profile";
+                                       type inet:ip-address;
+        }
       }
 
       container dhcp-params {