From: garciadeblas Date: Mon, 2 Apr 2018 15:29:08 +0000 (+0200) Subject: VNFD and NSD updated to support VDU and NS scaling from NFVI and VNF metrics X-Git-Tag: v3.1.0~2 X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FIM.git;a=commitdiff_plain;h=8efd85eaa707711720c050432b552be4c1740509;ds=sidebyside VNFD and NSD updated to support VDU and NS scaling from NFVI and VNF metrics Change-Id: Ib9214f394a7ffc5402fa3f339e2a4498ad4e6d6b Signed-off-by: garciadeblas --- diff --git a/models/yang/mano-types.yang b/models/yang/mano-types.yang index 3aa10a1..7f50c1a 100644 --- a/models/yang/mano-types.yang +++ b/models/yang/mano-types.yang @@ -237,6 +237,20 @@ module mano-types } } + grouping vca-metrics { + description + "Information about the VNF or VDU metrics"; + list metrics { + description "List of VCA related metrics"; + key "name"; + leaf name { + description + "Name of the metric, as defined in the Juju charm."; + type string; + } + } + } // END - grouping vca-metrics + grouping vca-configuration { description "Information about the VNF or VDU configuration. Note: @@ -337,6 +351,9 @@ module mano-types } } } + + uses manotypes:vca-metrics; + } // END - grouping vca-configuration typedef virtual-link-type { @@ -622,6 +639,60 @@ module mano-types } } + typedef nfvi-metric-type { + description "Type of NFVI metric to be monitored"; + type enumeration { + enum cpu_utilization; + enum average_memory_utilization; + enum disk_read_ops; + enum disk_write_ops; + enum disk_read_bytes; + enum disk_write_bytes; + enum packets_sent; + enum packets_received; + enum packets_dropped; + } + } + + typedef scaling-trigger { + type enumeration { + enum pre-scale-in { + value 1; + } + enum post-scale-in { + value 2; + } + enum pre-scale-out { + value 3; + } + enum post-scale-out { + value 4; + } + } + } + + typedef scaling-policy-type { + type enumeration { + enum manual { + value 1; + } + enum automatic { + value 2; + } + } + } + + typedef scaling-criteria-operation { + type enumeration { + enum AND { + value 1; + } + enum OR { + value 2; + } + } + } + grouping vm-flavor { container vm-flavor { leaf vcpu-count { @@ -1118,7 +1189,7 @@ module mano-types } } - grouping monitoring-param { + grouping http-endpoints { list http-endpoint { description "List of http endpoints to be used by monitoring params"; @@ -1179,47 +1250,6 @@ module mano-types } } } - - list monitoring-param { - description - "List of monitoring parameters at the network service level"; - key id; - leaf id { - type string; - } - - leaf name { - type string; - } - - leaf http-endpoint-ref { - type leafref { - path "../../http-endpoint/path"; - } - } - - leaf json-query-method { - type json-query-method; - default "NAMEKEY"; - } - - container json-query-params { - leaf json-path { - description - "The jsonpath to use to extract value from JSON structure"; - type string; - } - leaf object-path { - description - "The objectpath to use to extract value from JSON structure"; - type string; - } - } - - uses monitoring-param-ui-data; - uses monitoring-param-value; - - } } grouping monitoring-param-aggregation { @@ -1735,11 +1765,12 @@ module mano-types } } - typedef alarm-operation-type { + typedef relational-operation-type { description - "The relational operator used to define whether an alarm - should be triggered in certain scenarios, such as if the - metric statistic goes above or below a specified value."; + "The relational operator used to define whether an alarm, + scaling event, etc. should be triggered in certain scenarios, + such as if the metric statistic goes above or below a specified + value."; type enumeration { enum GE; // greater than or equal enum LE; // less than or equal @@ -1834,7 +1865,7 @@ module mano-types "The relational operator used to define whether an alarm should be triggered in certain scenarios, such as if the metric statistic goes above or below a specified value."; - type alarm-operation-type; + type relational-operation-type; } leaf value { diff --git a/models/yang/nsd-base.yang b/models/yang/nsd-base.yang index f11ab22..df99563 100644 --- a/models/yang/nsd-base.yang +++ b/models/yang/nsd-base.yang @@ -259,6 +259,12 @@ module nsd-base type string; } + leaf scaling-type { + description + "Type of scaling"; + type manotypes:scaling-policy-type; + } + leaf enabled { description "Specifies if the scaling policy can be applied"; @@ -271,7 +277,7 @@ module nsd-base "Operation to be applied to check between scaling criterias to check if the scale in threshold condition has been met. Defaults to AND"; - type scaling-criteria-operation; + type manotypes:scaling-criteria-operation; default AND; } @@ -280,7 +286,7 @@ module nsd-base "Operation to be applied to check between scaling criterias to check if the scale out threshold condition has been met. Defauls to OR"; - type scaling-criteria-operation; + type manotypes:scaling-criteria-operation; default OR; } @@ -315,12 +321,28 @@ module nsd-base type uint64; } + leaf scale-in-relational-operation { + description + "The relational operator used to compare the monitoring param + against the scale-in-threshold."; + type manotypes:relational-operation-type; + default LE; + } + leaf scale-out-threshold { description "Value above which scale-out requests are generated"; type uint64; } + leaf scale-out-relational-operation { + description + "The relational operator used to compare the monitoring param + against the scale-out-threshold."; + type manotypes:relational-operation-type; + default GE; + } + leaf ns-monitoring-param-ref { description "Reference to the NS level monitoring parameter @@ -378,7 +400,7 @@ module nsd-base leaf trigger { description "scaling trigger"; - type scaling-trigger; + type manotypes:scaling-trigger; } leaf ns-service-primitive-name-ref { diff --git a/models/yang/vnfd-base.yang b/models/yang/vnfd-base.yang index cd2061b..69f5265 100644 --- a/models/yang/vnfd-base.yang +++ b/models/yang/vnfd-base.yang @@ -443,6 +443,30 @@ module vnfd-base 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"; + } + } + } + choice cloud-init-input { description "Indicates how the contents of cloud-init script are provided. @@ -602,7 +626,274 @@ module vnfd-base type string; } - uses manotypes:monitoring-param; + uses manotypes:http-endpoints; + + list scaling-group-descriptor { + description + "scaling group descriptor within the VNF. + The scaling group defines a group of VDUs, + and the ratio of VDUs in the VNF + that is used as target for scaling action"; + + key "name"; + + leaf name { + description "Name of this scaling group."; + type string; + } + + list scaling-policy { + + key "name"; + + leaf name { + description + "Name of the scaling policy"; + type string; + } + + leaf scaling-type { + description + "Type of scaling"; + type manotypes:scaling-policy-type; + } + + leaf enabled { + description + "Specifies if the scaling policy can be applied"; + type boolean; + default true; + } + + leaf scale-in-operation-type { + description + "Operation to be applied to check between scaling criterias to + check if the scale in threshold condition has been met. + Defaults to AND"; + type manotypes:scaling-criteria-operation; + default AND; + } + + leaf scale-out-operation-type { + description + "Operation to be applied to check between scaling criterias to + check if the scale out threshold condition has been met. + Defauls to OR"; + type manotypes:scaling-criteria-operation; + default OR; + } + + leaf threshold-time { + description + "The duration for which the criteria must hold true"; + type uint32; + mandatory true; + } + + leaf cooldown-time { + description + "The duration after a scaling-in/scaling-out action has been + triggered, for which there will be no further optional"; + type uint32; + mandatory true; + } + + list scaling-criteria { + description + "list of conditions to be met for generating scaling + requests"; + key "name"; + + leaf name { + type string; + } + + leaf scale-in-threshold { + description + "Value below which scale-in requests are generated"; + type uint64; + } + + leaf scale-in-relational-operation { + description + "The relational operator used to compare the monitoring param + against the scale-in-threshold."; + type manotypes:relational-operation-type; + default LE; + } + + leaf scale-out-threshold { + description + "Value above which scale-out requests are generated"; + type uint64; + } + + leaf scale-out-relational-operation { + description + "The relational operator used to compare the monitoring param + against the scale-out-threshold."; + type manotypes:relational-operation-type; + default GE; + } + + leaf vnf-monitoring-param-ref { + description + "Reference to the VNF level monitoring parameter + that is aggregated"; + type leafref { + path "../../../../monitoring-param/id"; + } + } + } + } + + list vdu { + description "List of VDUs in this scaling group"; + key "vdu-id-ref"; + + leaf vdu-id-ref { + description "Reference to the VDU id"; + type leafref { + path "../../../vdu/id"; + } + } + + leaf count { + description + "count of this VDU id within this scaling group. + The count allows to define the number of instances + when a scaling action targets this scaling group"; + type uint32; + default 1; + } + } + + leaf min-instance-count { + description + "Minimum instances of the scaling group which are allowed. + These instances are created by default when the network service + is instantiated."; + type uint32; + default 0; + } + + leaf max-instance-count { + description + "Maximum instances of this scaling group that are allowed + in a single network service. The network service scaling + will fail, when the number of service group instances + exceed the max-instance-count specified."; + type uint32; + default 10; + } + + list scaling-config-action { + description "List of scaling config actions"; + key "trigger"; + + leaf trigger { + description "scaling trigger"; + type manotypes:scaling-trigger; + } + + leaf vnf-config-primitive-name-ref { + description "Reference to the VNF config primitive"; + type leafref { + path "../../../vnf-configuration/config-primitive/name"; + } + } + } + } + + 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"; + leaf vdu-ref { + type leafref { + path "../../vdu/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"; + } + } + } + + case vdu-metric { + description "VDU-related metric (from VCA)"; + leaf vdu-id-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 http-endpoint-ref { + type leafref { + path "../../http-endpoint/path"; + } + } + + leaf json-query-method { + type manotypes:json-query-method; + default "NAMEKEY"; + } + + container json-query-params { + leaf json-path { + description + "The jsonpath to use to extract value from JSON structure"; + type string; + } + leaf object-path { + description + "The objectpath to use to extract value from JSON structure"; + type string; + } + } + + uses manotypes:monitoring-param-ui-data; + uses manotypes:monitoring-param-value; + + } list placement-groups { description "List of placement groups at VNF level";