Support of VNF and NS relations as described in pad 6297
[osm/IM.git] / models / yang / vnfd-base.yang
index 69f5265..6b627b2 100644 (file)
@@ -20,7 +20,7 @@
 
 module vnfd-base
 {
-  namespace "http://riftio.com/ns/riftware-1.0/vnfd-base";
+  namespace "urn:etsi:osm:yang:vnfd-base";
   prefix "vnfd-base";
 
   import mano-types {
@@ -95,15 +95,17 @@ module vnfd-base
         description
             "Specifies the type of virtual interface
              between VM and host.
-             VIRTIO          : Use the traditional VIRTIO interface.
+             PARAVIRT        : Use the default paravirtualized interface for the VIM (virtio, vmxnet3, etc.).
+             VIRTIO          : Deprecated! Use the traditional VIRTIO interface.
              PCI-PASSTHROUGH : Use PCI-PASSTHROUGH interface.
              SR-IOV          : Use SR-IOV interface.
              E1000           : Emulate E1000 interface.
              RTL8139         : Emulate RTL8139 interface.
              PCNET           : Emulate PCNET interface.
-             OM-MGMT         : Deprecated! Use VIRTIO instead and set the VNF management interface at vnfd:mgmt-interface:cp";
+             OM-MGMT         : Deprecated! Use PARAVIRT instead and set the VNF management interface at vnfd:mgmt-interface:cp";
 
         type enumeration {
+          enum PARAVIRT;
           enum OM-MGMT;
           enum PCI-PASSTHROUGH;
           enum SR-IOV;
@@ -112,7 +114,7 @@ module vnfd-base
           enum RTL8139;
           enum PCNET;
         }
-        default "VIRTIO";
+        default "PARAVIRT";
       }
 
       leaf vpci {
@@ -174,6 +176,8 @@ module vnfd-base
 
       container vnf-configuration {
         uses manotypes:vca-configuration;
+        uses manotypes:vca-relations;
+        uses manotypes:vca-config-access;
       }
 
       leaf operational-status {
@@ -415,7 +419,24 @@ module vnfd-base
         list alarm {
           key "alarm-id";
 
-          uses manotypes:alarm;
+          leaf alarm-id {
+            description
+                  "This field is reserved for the identifier assigned by the VIM provider";
+
+            type string;
+          }
+
+
+          leaf vnf-monitoring-param-ref {
+              description
+                 "Reference to the VNF level monitoring parameter
+                  that is aggregated";
+              type leafref {
+                path "../../monitoring-param/id";
+              }
+          }
+
+          uses manotypes:alarm-properties;
         }
 
         uses manotypes:image-properties;
@@ -441,6 +462,7 @@ module vnfd-base
 
         container vdu-configuration {
           uses manotypes:vca-configuration;
+          uses manotypes:vca-config-access;
         }
 
         list monitoring-param {
@@ -528,6 +550,14 @@ module vnfd-base
             type uint32;
           }
 
+          leaf mgmt-interface {
+            description
+                "Flag to indicate that this is the mgmt interface
+                to be used for VDU configuration";
+            type boolean;
+            default false;
+          }
+
           leaf type {
             description
                 "Type of the Interface";
@@ -711,7 +741,9 @@ module vnfd-base
             leaf scale-in-threshold {
               description
                   "Value below which scale-in requests are generated";
-              type uint64;
+              type decimal64{
+                fraction-digits 10;
+             }
             }
 
             leaf scale-in-relational-operation {
@@ -725,7 +757,9 @@ module vnfd-base
             leaf scale-out-threshold {
               description
                   "Value above which scale-out requests are generated";
-              type uint64;
+              type decimal64{
+                fraction-digits 10;
+             }
             }
 
             leaf scale-out-relational-operation {
@@ -829,37 +863,43 @@ module vnfd-base
 
           case vdu-monitoring-param {
             description "VDU-related metric from the infrastructure";
-            leaf vdu-ref {
-              type leafref {
-                path "../../vdu/id";
+            container vdu-monitoring-param {
+              leaf vdu-ref {
+                type leafref {
+                  path "../../../vdu/id";
+                }
               }
-            }
-            leaf vdu-monitoring-param-ref {
-              type leafref {
-                path "../../vdu[id = current()/../vdu-ref]/monitoring-param/id";
+              leaf vdu-monitoring-param-ref {
+                type leafref {
+                  path "../../../vdu[id = current()/../vdu-ref]/monitoring-param/id";
+                }
               }
             }
           }
 
           case vnf-metric {
             description "VNF-related metric (from VCA)";
-            leaf vnf-metric-name-ref {
-              type leafref {
-                path "../../vnf-configuration/metrics/name";
+            container vnf-metric {
+              leaf vnf-metric-name-ref {
+                type leafref {
+                  path "../../../vnf-configuration/metrics/name";
+                }
               }
             }
           }
 
           case vdu-metric {
             description "VDU-related metric (from VCA)";
-            leaf vdu-id-ref {
-              type leafref {
-                path "../../vdu/id";
+            container vdu-metric {
+              leaf vdu-ref {
+                type leafref {
+                  path "../../../vdu/id";
+                }
               }
-            }
-            leaf vdu-metric-name-ref {
-              type leafref {
-                path "../../vdu[id = current()/../vdu-id-ref]/vdu-configuration/metrics/name";
+              leaf vdu-metric-name-ref {
+                type leafref {
+                  path "../../../vdu[id = current()/../vdu-ref]/vdu-configuration/metrics/name";
+                }
               }
             }
           }