add vdur and vnfr monitoring-param lists. Fixes IM tree view generation
[osm/IM.git] / models / yang / vnfr.yang
index 6d23065..ef2edde 100644 (file)
@@ -289,9 +289,9 @@ module vnfr
         }
 
         // Use parameters provided here to configure this VNF
-      container vnf-configuration {
-        uses manotypes:vca-configuration;
-      }
+        container vnf-configuration {
+          uses manotypes:vca-configuration;
+        }
 
         // Mainly used by Mon-params & dashboard url
         container mgmt-interface {
@@ -443,9 +443,33 @@ module vnfr
 
           uses manotypes:supplemental-boot-data;
 
-        container vdu-configuration {
-          uses manotypes:vca-configuration;
-        }
+          container vdu-configuration {
+            uses manotypes:vca-configuration;
+          }
+
+          list monitoring-param {
+            description
+              "List of VDU-related monitoring parameters at NFVI level";
+            key id;
+            leaf id {
+              description "The unique id of the monitoring param at VDU level";
+              type string;
+            }
+
+            leaf nfvi-metric {
+              description "The associated NFVI metric to be monitored";
+              type manotypes:nfvi-metric-type;
+            }
+
+            leaf interface-name-ref {
+              description
+                "Reference to a VDU interface name. Applicable only when the nfvi-metric
+                refers to an interface and not to the VM";
+              type leafref {
+                path "../../interface/name";
+              }
+            }
+          }
 
           list volumes {
             key "name";
@@ -495,56 +519,56 @@ module vnfr
             uses associated-virtual-cps;
           }
 
-        list interface {
-          description
-              "List of interfaces (internal and external) for the VNF";
-          key name;
-
-          leaf name {
+          list interface {
             description
-                "Name of the interface. Note that this
-                name has only local significance to the VDU.";
-            type string;
-          }
+                "List of interfaces (internal and external) for the VNF";
+            key name;
 
-          leaf position {
-            description
-                "Explicit Position of the interface within the list";
-            type uint32;
-          }
+            leaf name {
+              description
+                  "Name of the interface. Note that this
+                  name has only local significance to the VDU.";
+              type string;
+            }
 
-          leaf type {
-            description
-                "Type of the Interface";
+            leaf position {
+              description
+                  "Explicit Position of the interface within the list";
+              type uint32;
+            }
+
+            leaf type {
+              description
+                  "Type of the Interface";
 
-            type vnfd-base:interface-type;
+              type vnfd-base:interface-type;
 
-            default "EXTERNAL";
-          }
-          choice connection-point-type {
-            case internal {
-              leaf internal-connection-point-ref {
-                description
-                    "Leaf Ref to the particular internal connection point";
-                type leafref {
-                  path "../../internal-connection-point/id";
+              default "EXTERNAL";
+            }
+            choice connection-point-type {
+              case internal {
+                leaf internal-connection-point-ref {
+                  description
+                      "Leaf Ref to the particular internal connection point";
+                  type leafref {
+                    path "../../internal-connection-point/id";
+                  }
                 }
               }
-            }
-            case external {
-              leaf external-connection-point-ref {
-                description
-                    "Leaf Ref to the particular external connection point";
-                type leafref {
-                  path "../../../connection-point/name";
+              case external {
+                leaf external-connection-point-ref {
+                  description
+                      "Leaf Ref to the particular external connection point";
+                  type leafref {
+                    path "../../../connection-point/name";
+                  }
                 }
               }
             }
+            uses virtual-interface;
           }
-          uses virtual-interface;
-        }
 
-         leaf operational-status {
+          leaf operational-status {
             description
               "The operational status of the VDU
                 init                : The VDU has just started.
@@ -558,12 +582,79 @@ module vnfr
                 failed              : The VDU  instantiation failed.
               ";
             type vdu-operational-status;
-         }
+          }
 
           uses placement-group-info;
         }
 
-        uses manotypes:monitoring-param;
+        list monitoring-param {
+          description
+            "List of monitoring parameters at the network service level";
+          key id;
+          leaf id {
+            type string;
+          }
+
+          leaf name {
+            type string;
+          }
+
+          uses manotypes:monitoring-param-aggregation;
+
+          choice monitoring-type {
+            description
+              "Defines the type of monitoring param to be used:
+                * vdu-monitorin-param:     VDU-related metric (from NFVI)
+                * vnf-metric:              VNF-related metric (from VCA)
+                * vdu-metric:              VDU-related metric (from VCA)
+              ";
+
+            case vdu-monitoring-param {
+              description "VDU-related metric from the infrastructure";
+              container vdu-monitoring-param {
+                leaf vdu-ref {
+                  type leafref {
+                    path "../../../vdur/id";
+                  }
+                }
+                leaf vdu-monitoring-param-ref {
+                  type leafref {
+                    path "../../../vdur[id = current()/../vdu-ref]/monitoring-param/id";
+                  }
+                }
+              }
+            }
+
+            case vnf-metric {
+              description "VNF-related metric (from VCA)";
+              container vnf-metric {
+                leaf vnf-metric-name-ref {
+                  type leafref {
+                    path "../../../vnf-configuration/metrics/name";
+                  }
+                }
+              }
+            }
+
+            case vdu-metric {
+              description "VDU-related metric (from VCA)";
+              container vdu-metric {
+                leaf vdu-ref {
+                  type leafref {
+                    path "../../../vdur/id";
+                  }
+                }
+                leaf vdu-metric-name-ref {
+                  type leafref {
+                    path "../../../vdur[id = current()/../vdu-ref]/vdu-configuration/metrics/name";
+                  }
+                }
+              }
+            }
+
+          }
+
+        }
 
         leaf operational-status {
           description