New Feature : Support VNF service access points, model changes 37/737/1
authorPhilip Joseph <philip.joseph@riftio.com>
Mon, 14 Nov 2016 06:57:38 +0000 (06:57 +0000)
committerPhilip Joseph <philip.joseph@riftio.com>
Mon, 28 Nov 2016 19:37:20 +0000 (01:07 +0530)
Signed-off-by: Philip Joseph <philip.joseph@riftio.com>
models/plugins/yang/mano-types.yang
models/plugins/yang/nsd.yang
models/plugins/yang/vnfd.yang
rwcm/plugins/yang/rw-conman.yang

index 3411cb7..91e981e 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,13 @@ 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";
@@ -252,22 +260,22 @@ 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;
         }
@@ -284,20 +292,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-primtive-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";
+              }
+            }
           }
         }
       }
index f5e7b28..ab92682 100644 (file)
@@ -417,6 +417,58 @@ module nsd
       }
     }
 
+    list vnfap-map {
+      description
+        "Mapping of capability and dependency in this
+         network service.";
+      key "id";
+
+      leaf id {
+        description "Identifier for VNF access point mapping";
+        type string;
+      }
+
+      container capability {
+        leaf member-vnf-index {
+          description "Reference to member VNF within this network service";
+          type leafref {
+            path "../../../constituent-vnfd/member-vnf-index";
+          }
+        }
+
+        leaf capability-ref {
+          description
+            "Reference to the capability in the specified
+             member VNF. This should be a leafref as follows:
+             path \"/vnfd:vnf-catalog/vnfd[id=
+                    ../../constituent-vnfd[member-vnf-index=
+                    ../member-vnf-index]/vnfd-id-ref]/
+                    vnfap/capability/name\"";
+            type string;
+        }
+      }
+
+      container dependency {
+        leaf member-vnf-index {
+          description "Reference to member VNF within this network service";
+          type leafref {
+            path "../../../constituent-vnfd/member-vnf-index";
+          }
+        }
+
+        leaf dependency-ref {
+          description
+            "Reference to the depenency in the specified
+             member VNF. This should be a leafref as follows:
+             path \"/vnfd:vnf-catalog/vnfd[id=
+                    ../../constituent-vnfd[member-vnf-index=
+                    ../member-vnf-index]/vnfd-id-ref]/
+                    vnfap/dependency/name\"";
+            type string;
+        }
+      }
+    }
+
     list scaling-group-descriptor {
       description
           "scaling group descriptor within this network service.
index ebd56ad..5fd811e 100644 (file)
@@ -116,96 +116,109 @@ module vnfd
   }
 
   grouping vnf-access-point {
-    list vnfap {
-      description "List of VNF access points";
-      key "name";
-      leaf name {
-        description "Name of the vnf access point";
-        type string {
-          length 128;
-        }
-      }
-      leaf description {
-        description "A description of this VNF access point";
-        type string;
-      }
-      list capability {
-        description "The List  of capabilities of this VNF access point";
+    container vnfap {
+      description
+        "List of VNF access points, i.e., the capabilites
+         and dependencies.";
+      list capbility {
+        description "The list of capabilites of this VNF";
         key "name";
+
         leaf name {
           description "Name of the capability";
           type string {
             length 128;
           }
         }
+
         leaf description {
-          description "A description of the capability";
+          description " Description of the capability";
           type string;
         }
+
         choice capability-location {
-          case location-path {
+          case location-xpath {
             leaf xpath {
-               description "Location of this capaibility as an xpath.
-                           This field points to an element within vnfd
-                           with the xpath notation and additionally 
-                           provides the flexibility to choose attributes
-                           within the instantiated version of this object.
-                           For example, 
-                              /vnfd-catalog/vnfd[id='xyz']/connection-point[name='cp1']/ip_address()
-                              refers to the ip address of the connection point with name 'cp1' 
-                              in VNFD with id 'xyz'.";
+              description
+                "Location of this capability as an xpath.
+                 For example:
+                   ../../../mgmt-interface/port";
               type string;
             }
           }
-          case location-primitive-ref {
-            leaf config-primitive-name-ref {
-               description "A leafref to configuration primitive.
-                            This field contains a link to the config primitive
-                            the output paramaters of which will satisfy this requirement.";
-               type leafref {
-                 path "/vnfd:vnfd-catalog/vnfd/vnf-configuration/service-primitive/name";
-               }
+
+          case location-attirbute {
+            leaf attribute {
+              description
+                "Location of this capability as runtime attribute.
+                 The value is <xpath>, <attribute_name>
+                 For example:
+                   ../../../mgmt-interface, ip-address
+                   which retruns the ip-address assigned to the
+                   mgmt-interface after VNF instantiation.";
+              type string;
             }
           }
-          case user-input {
-            list user-input {
-              key "name";
-              description "User input for this capability";
-              leaf name {
-                description "Name of this input";
-                type string;
+
+          case location-primitive-ref {
+            leaf config-primitive-name-ref {
+              description
+                "A leafref to configuration primitive.
+                 This refers to a config parameter whose
+                 output parameter is referred in out-parameter.";
+              type leafref {
+                path "../../../vnf-configuration/config-primitive/name";
               }
-              leaf value {
-                description "Value of this input";
-                type string;
+            }
+
+            leaf out-parameter {
+              description
+                "Name of the output parameter in the config primitiive";
+              type leafref {
+                path
+                  "../../../vnf-configuration/config-primitive[name=current()/../config-primitive-name-ref]/parameter/name";
               }
             }
           }
+
+          case location-default {
+            leaf value {
+              description
+                "Value to be used for this capability";
+              type string;
+            }
+          }
         }
       }
+
       list dependency {
-        description "The List of depenencies of this VNF access point";
+        description "The list of dependencies for this VNF";
         key "name";
+
         leaf name {
-          description "Name of this VNF access point";
+          description "Name of this dependency";
           type string {
             length 128;
           }
         }
+
         leaf mandatory {
-          description "Is this dependcy mandatory for this dependency";
+          description "IS this dependency mandatory for this VNF";
           type boolean;
+          default true;
         }
+
         leaf description {
-          description "A description of the dependency";
+          description "Description of this dependency";
           type string;
         }
-        leaf config-primitive-name-ref {
-         description "A leafref to configuration primitive.
-                      This field contains a link to the config primitive
-                      the input paramaters of which will satisfy this requirement.";
+
+        leaf-list config-primitive-name-ref {
+          description
+            "Leafref to configuration primitive where this
+             dependency will be added as a parameter";
           type leafref {
-            path "/vnfd:vnfd-catalog/vnfd/vnf-configuration/service-primitive/name";
+            path "../../../vnf-configuration/config-primitive/name";
           }
         }
       }
@@ -259,6 +272,8 @@ module vnfd
 
       uses manotypes:vnf-configuration;
 
+      uses vnf-access-point;
+
       container mgmt-interface {
         description
             "Interface over which the VNF is managed.";
index bb1555d..10e0519 100644 (file)
@@ -253,6 +253,10 @@ module rw-conman
             type inet:ip-address;
           }
         }
+        // Resolve the VNF config-primitives and publish it
+        // here. VNFR will use this and update config-primitives
+        // from here.
+        uses manotypes:vnf-configuration;
       } // list VNFR
     } // list NSR
   } // cm-state