New Feature : Addtional changes for VNF access point support
[osm/SO.git] / models / plugins / yang / vnfd.yang
index 2cc43d3..20072d6 100644 (file)
@@ -115,6 +115,117 @@ module vnfd
     }
   }
 
+  grouping vnf-access-point {
+    container vnfap {
+      rwpb:msg-new VnfAp;
+      description
+        "List of VNF access points, i.e., the capabilites
+         and dependencies.";
+      list capability {
+        description "The list of capabilites of this VNF";
+        key "name";
+
+        leaf name {
+          description "Name of the capability";
+          type string {
+            length 128;
+          }
+        }
+
+        leaf description {
+          description " Description of the capability";
+          type string;
+        }
+
+        choice capability-location {
+          case location-xpath {
+            leaf xpath {
+              description
+                "Location of this capability as an xpath.
+                 For example:
+                   ../../../mgmt-interface/port";
+              type string;
+            }
+          }
+
+          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 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 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 dependencies for this VNF";
+        key "name";
+
+        leaf name {
+          description "Name of this dependency";
+          type string {
+            length 128;
+          }
+        }
+
+        leaf mandatory {
+          description "IS this dependency mandatory for this VNF";
+          type boolean;
+          default true;
+        }
+
+        leaf description {
+          description "Description of this dependency";
+          type string;
+        }
+
+        leaf-list config-primitive-name-ref {
+          description
+            "Leafref to configuration primitive where this
+             dependency will be added as a parameter";
+          type leafref {
+            path "../../../vnf-configuration/config-primitive/name";
+          }
+        }
+      }
+    }
+  }
+
   container vnfd-catalog {
 
     description
@@ -162,6 +273,8 @@ module vnfd
 
       uses manotypes:vnf-configuration;
 
+      uses vnf-access-point;
+
       container mgmt-interface {
         description
             "Interface over which the VNF is managed.";
@@ -512,6 +625,7 @@ module vnfd
           }
         }
       }
+      uses vnf-access-point;
     }
   }
 }