Path for nesting: external CP in VNFD and NSD can refer to internal VLDs and CPs 73/5773/6
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Tue, 12 Dec 2017 12:33:33 +0000 (13:33 +0100)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Fri, 2 Mar 2018 11:37:28 +0000 (12:37 +0100)
Change-Id: Ide252b05ee74c763b05761787f8839b19a092c5e
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
models/yang/nsd-base.yang
models/yang/vnfd-base.yang

index 8403730..aded995 100644 (file)
@@ -31,6 +31,10 @@ module nsd-base
     prefix "manotypes";
   }
 
+  import vnfd {
+    prefix "vnfd";
+  }
+
   revision 2017-02-28 {
     description
       "Initial revision. This YANG file defines
@@ -184,6 +188,62 @@ module nsd-base
              It must be explicitly asked for a floating IP address to be allocated.";
         type boolean;
       }
+
+      choice connection {
+        description "Logical connection of the CP to a VLD or to a VNF CP";
+
+        case vld-ref {
+
+          leaf vld-id-ref {
+            description
+              "ID reference to a VLD in the NS";
+            type leafref {
+              path "../../vld/id";
+            }
+          }
+
+        }
+
+        case vnfd-connection-point-ref {
+
+          leaf member-vnf-index-ref {
+            description "Reference to member-vnf within constituent-vnfd";
+            type leafref {
+              path "../../constituent-vnfd/member-vnf-index";
+            }
+          }
+
+          leaf vnfd-id-ref {
+            description
+              "A reference to a vnfd. This is a leafref to path:
+                  ../../nsd:constituent-vnfd
+                  + [nsd:id = current()/../nsd:id-ref]
+                  + /nsd:vnfd-id-ref";
+            type leafref {
+              path "../../constituent-vnfd" +
+                   "[member-vnf-index = current()/../member-vnf-index-ref]" +
+                   "/vnfd-id-ref";
+            }
+          }
+
+          leaf vnfd-connection-point-ref {
+            description
+              "A reference to a connection point name
+                  in a vnfd. This is a leafref to path:
+                      /vnfd:vnfd-catalog/vnfd:vnfd
+                      + [vnfd:id = current()/../nsd:vnfd-id-ref]
+                      + /vnfd:connection-point/vnfd:name";
+            type leafref {
+              path "/vnfd:vnfd-catalog/vnfd:vnfd" +
+                   "[vnfd:id = current()/../vnfd-id-ref]" +
+                   "/vnfd:connection-point/vnfd:name";
+            }
+          }
+
+        }
+
+      }
+
     }
 
     list scaling-group-descriptor {
index 9163e33..75dcadc 100644 (file)
@@ -346,6 +346,19 @@ module vnfd-base
           at the network service level to construct network services.";
 
         uses common-connection-point;
+
+        leaf internal-vld-ref {
+          description
+            "Reference to an internal VLD of the VNF. This field is
+            optional. It allows exposing an internal VLD through a
+            connection point. When building a NS, this VNF CP might be
+            connected to a NS VLD, then both VLDs (the i-VLD of the VNF and the
+            VLD of the NS) will become the same network and the IP profile will
+            be the one configured at NS level.";
+          type leafref {
+            path "../../internal-vld/id";
+          }
+        }
       }
 
       list vdu {