2 Copyright 2020 Whitestack LLC
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
8 http://www.apache.org/licenses/LICENSE-2.0
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
14 See the License for the specific language governing permissions and
15 limitations under the License.
18 module common-augments {
20 namespace "urn:etsi:osm:yang:augments";
23 import etsi-nfv-vnfd {
30 typedef parameter-data-type {
38 grouping primitive-parameter-value {
41 "List of parameters to the configuration primitive.";
45 "Name of the parameter.";
51 "Data type associated with the value.";
52 type common:parameter-data-type;
57 "Value associated with the name.";
63 grouping primitive-parameter {
66 "Name of the parameter.";
72 "Data type associated with the name.";
73 type common:parameter-data-type;
78 "Is this field mandatory";
85 "The default value for this field";
91 "NSD parameter pool name to use for this parameter";
97 "The value should be dimmed by the UI.
98 Only applies to parameters with default values.";
105 "The value should be hidden by the UI.
106 Only applies to parameters with default values.";
112 grouping relations-ee {
114 "Information about the execution environment and endpoint for a relation.
115 The execution environment can be associated to different objects: kdu, vdu, vnf, or ns.
116 To select the object, the profile-id of the object might be needed:
117 Reference to a kdu-level execution enviroment:
118 in the VNFd: the kdu-resource-profile-id is needed.
119 in the NSd: the kdu-resource-profile-id and vnf-profile-id are needed.
120 Reference to a vdu-level execution enviroment:
121 in the VNFd: the vdu-profile-id is needed.
122 in the NSd: the vdu-profile-id and vnf-profile-id are needed.
123 Reference to a vnf-level execution enviroment:
124 in the VNFd: nothing is needed, implicit.
125 in the NSd: the vnf-profile-id is needed.
126 Reference to an ns-level execution enviroment:
127 in the VNFd: cannot be done.
128 in the NSd: nothing is needed, implicit.
129 The reference to the execution environment is only mandatory if there is more than one execution environment
130 in the execution-environment-list of an object.
131 The endpoint is always needed";
133 leaf vdu-profile-id {
135 "If the execution environment is associated to a vdu object,
136 this parameter is the reference to the vdu-profile id.";
138 path "/vnfd:vnfd/vnfd:df/vnfd:vdu-profile/vnfd:id";
142 leaf kdu-resource-profile-id {
144 "If the execution environment is associated to a kdu resource object,
145 this parameter is the reference to the kdu-resource-profile id.";
149 leaf vnf-profile-id {
151 "If the execution environment is associated to a vnf object,
152 this parameter is the reference to the vnf-profile id.
153 Only valid in the NSd. The value is implicit in a VNFd.
154 To reference an execution environment associated to a vnf object
155 from the VNFd, none of the profile ids need to be specified.";
157 path "/nsd:nsd/nsd:nsd/nsd:df/nsd:vnf-profile/nsd:id";
160 leaf execution-environment-ref {
162 "Optional reference to the execution environment id.
163 Only needed if there is more than one execution environment
164 in the execution-environment-list of an object.";
170 "Endpoint name of the execution environment.";
178 "List of relations between elements in this descriptor.
179 The relations are used to integrate pairs of execution environments,
180 that are in charge of the configuration and lifecycle management
181 of VDUs, VNFs, KDUs, or NSs.
182 Each relation is formed by a provider and a requirer.
183 The provider is the execution environment that provides a particular service.
184 The requirer is the execution environment that requires the service provided by the provider";
189 "Name of the relation.";
195 "Execution environment that offers an endpoint for a particular service";
200 "Execution environment that uses the service provided by the provider";
205 "DEPRECATION NOTICE: use provider and requirer instead.
206 List of two elements to be related.
207 Elements to be related are identified by a pair (id, endpoint).
208 The relation will relate (id1, endpoint1) to (id2, endpoint2).";
213 "A string, reference to the element id in the descriptor.
214 It could be a vnfd-id or a vdu-id in a VNFD,
215 or a nsd-id or member-vnf-index in a NSD.";
221 "Endpoint name defining the relation.";
225 must 'not(entities) or (not(provider) and not(requirer))' {
226 error-message 'Cannot set both "entities" and "provider/requirer" fields.';
231 grouping vnfc-metrics {
233 "Information about the VNF or VDU metrics";
236 "List of VNFC related metrics";
240 "Name of the metric, as defined in the Juju charm.";
246 grouping configuration-method {
247 choice config-method {
249 "Defines the configuration method for the VNF or VDU.";
252 "Use custom script for configuring the VNF or VDU.
253 This script is executed in the context of
254 Orchestrator (The same system and environment
259 "Script type - currently supported - Scripts confirming to Rift CA plugin";
269 "Configure the VNF or VDU through Juju.";
273 "Juju charm to use with the VNF or VDU.";
278 "Is this a proxy charm?";
284 "Type of cloud where the charm will be deployed. It only
285 applies to proxy charms (not native)";
295 case execution-environment-list {
297 "List of Execution Environments to configure or monitor VNF or VDU.";
298 list execution-environment-list {
301 description "Execution environment identifier.";
304 choice execution-environment-model {
306 "Execution environment model (juju, helm-chart)";
309 "Interact with the VNF or xDU through Juju.";
313 "Juju charm to use with the VNF or VDU.";
318 "Is this a proxy charm?";
324 "Type of cloud where the charm will be deployed. It only
325 applies to proxy charms (not native)";
336 "Interact with the VNF or xDU through Helm.";
339 "Helm chart that models the execution environment, in any of the following ways:
340 - <helm-repo>/<helm-chart>
341 - <helm-chart folder name under helm-charts folder in the package>
342 - <helm-chart tgz file (w/ or w/o extension) under helm-charts folder in the package>
343 - <URL_where_to_fetch_chart>
349 "Helm version to use for this helm-chart, v3 by default";
357 leaf metric-service {
359 "Service name in the execution environment. For helm charts, it will be
360 the name of the kubernetes service used by the exporter to expose metrics
361 to the OSM collector.
365 leaf external-connection-point-ref {
367 "String representing a leaf reference to the particular external connection point
368 This field should match /vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id/vnfd:connection-point/vnfd:name
377 grouping vdu-config-access {
379 container config-access {
382 "Indicates the way to access to the xNF or xDU for VCA configuration.
383 For the moment there is a single way (ssh-access).";
385 container ssh-access {
388 "If the xNF requires ssh and this parameter is set, SSH keys
389 will be injected so that VCA can configure the xNF or xDU via ssh.";
393 "whether ssh access is needed or not";
400 "Default user for ssh";
407 grouping vnfc-configuration {
409 "Common information in the descriptors for NS, VNF or VDU configuration.
410 Note: If the NS contains multiple instances of the
411 same VNF or VDU, each instance could have a different
414 uses common:configuration-method;
416 list config-primitive {
418 "List of config primitives supported by the
419 configuration agent for this VNF or VDU.";
424 "Name of the config primitive.";
428 leaf execution-environment-ref {
430 "Leaf reference to the particular execution environment";
432 path "../../execution-environment-list/id";
436 leaf execution-environment-primitive {
438 "Name of the primitive in the execution enviroment. If not explicit,
439 the leaf 'name' will be used as the name of the primitive.";
446 "List of parameters to the config primitive.";
448 uses primitive-parameter;
451 leaf user-defined-script {
453 "A user defined script. If user defined script is defined,
454 the script will be executed using bash";
459 list initial-config-primitive {
461 "Initial set of configuration primitives.";
465 "Sequence number for the configuration primitive.";
469 choice primitive-type {
470 case primitive-definition {
473 "Name of the configuration primitive.";
477 leaf execution-environment-ref {
479 "Leaf reference to the particular execution environment";
481 path "../../execution-environment-list/id";
485 uses primitive-parameter-value;
487 leaf user-defined-script {
489 "A user defined script.";
496 list terminate-config-primitive {
498 "Terminate set of configuration primitives.";
502 "Sequence number for the configuration primitive.";
507 "Name of the configuration primitive.";
511 leaf execution-environment-ref {
513 "Leaf reference to the particular execution environment";
515 path "../../execution-environment-list/id";
519 uses primitive-parameter-value;
521 leaf user-defined-script {
523 "A user defined script.";
527 uses common:vnfc-metrics;
530 typedef alarm-severity-type {
532 "An indication of the importance or urgency of the alarm";
540 typedef alarm-statistic-type {
542 "Statistic type to use to determine threshold crossing
553 typedef relational-operation-type {
555 "The relational operator used to define whether an alarm,
556 scaling event, etc. should be triggered in certain scenarios,
557 such as if the metric statistic goes above or below a specified
560 enum GE; // greater than or equal
561 enum LE; // less than or equal
562 enum GT; // greater than
563 enum LT; // less than
565 enum NE; // not equal
569 grouping alarm-properties {
572 "A human readable string to identify the alarm";
578 "A description of this alarm";
584 "The identifier of the VDUR that the alarm is associated with";
596 list insufficient-data {
613 "This flag indicates whether the alarm should be repeatedly emitted
614 while the associated threshold has been crossed.";
622 "This flag indicates whether the alarm has been enabled or
631 "A measure of the importance or urgency of the alarm";
632 type alarm-severity-type;
637 "The type of metric statistic that is tracked by this alarm";
638 type alarm-statistic-type;
643 "The relational operator used to define whether an alarm should be
644 triggered in certain scenarios, such as if the metric statistic
645 goes above or below a specified value.";
646 type relational-operation-type;
651 "This value defines the threshold that, if crossed, will trigger
660 "The period defines the length of time (seconds) that the metric
661 data are collected over in oreder to evaluate the chosen
668 "Defines the length of time (seconds) in which metric data are
669 collected in order to evaluate the chosen statistic.";
674 grouping virtual-interface {
675 container virtual-interface {
677 "Container for the virtual interface properties";
681 "Specifies the type of virtual interface
683 PARAVIRT : Use the default paravirtualized interface for the VIM (virtio, vmxnet3, etc.).
684 VIRTIO : Deprecated! Use the traditional VIRTIO interface.
685 PCI-PASSTHROUGH : Use PCI-PASSTHROUGH interface.
686 SR-IOV : Use SR-IOV interface.
687 E1000 : Emulate E1000 interface.
688 RTL8139 : Emulate RTL8139 interface.
689 PCNET : Emulate PCNET interface.
690 OM-MGMT : Deprecated! Use PARAVIRT instead and set the VNF management interface at vnfd:mgmt-interface:cp";
695 enum PCI-PASSTHROUGH;
707 "Specifies the virtual PCI address. Expressed in
708 the following format dddd:dd:dd.d. For example
709 0000:00:12.0. This information can be used to
710 pass as metadata during the VM creation.";
716 "Aggregate bandwidth of the NIC.";
722 grouping description {
728 grouping vdu-storage-requirements {
729 list vdu-storage-requirements {
731 "Array of key-value pairs that articulate the storage
732 deployment requirements.
734 If the storage type is persistent-storage, the following setting
735 holds the persistent volume upon VM deletion:
739 If storage volume can be attached to several VMs, the following setting
756 typedef scaling-trigger {
767 enum post-scale-out {
773 typedef scaling-policy-type {
784 typedef scaling-criteria-operation {