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 typedef parameter-data-type {
31 grouping primitive-parameter-value {
34 "List of parameters to the configuration primitive.";
38 "Name of the parameter.";
44 "Data type associated with the value.";
45 type common:parameter-data-type;
50 "Value associated with the name.";
56 grouping primitive-parameter {
59 "Name of the parameter.";
65 "Data type associated with the name.";
66 type common:parameter-data-type;
71 "Is this field mandatory";
78 "The default value for this field";
84 "NSD parameter pool name to use for this parameter";
90 "The value should be dimmed by the UI.
91 Only applies to parameters with default values.";
98 "The value should be hidden by the UI.
99 Only applies to parameters with default values.";
105 grouping vnfc-relations {
108 "List of relations between elements in this descriptor.";
113 "Name of the relation.";
120 "List of two elements to be related.
121 Elements to be related are identified by a pair (id, endpoint).
122 The relation will relate (id1, endpoint1) to (id2, endpoint2).";
127 "A string, reference to the element id in the descriptor.
128 It could be a vnfd-id or a vdu-id in a VNFD,
129 or a nsd-id or member-vnf-index in a NSD.";
135 "Endpoint name defining the relation.";
142 grouping vnfc-metrics {
144 "Information about the VNF or VDU metrics";
147 "List of VNFC related metrics";
151 "Name of the metric, as defined in the Juju charm.";
157 grouping configuration-method {
158 choice config-method {
160 "Defines the configuration method for the VNF or VDU.";
163 "Use custom script for configuring the VNF or VDU.
164 This script is executed in the context of
165 Orchestrator (The same system and environment
170 "Script type - currently supported - Scripts confirming to Rift CA plugin";
180 "Configure the VNF or VDU through Juju.";
184 "Juju charm to use with the VNF or VDU.";
189 "Is this a proxy charm?";
195 "Type of cloud where the charm will be deployed. It only
196 applies to proxy charms (not native)";
206 case execution-environment-list {
208 "List of Execution Environments to configure or monitor VNF or VDU.";
209 list execution-environment-list {
212 description "Execution environment identifier.";
215 choice execution-environment-model {
217 "Execution environment model (juju, helm-chart)";
220 "Interact with the VNF or xDU through Juju.";
224 "Juju charm to use with the VNF or VDU.";
229 "Is this a proxy charm?";
235 "Type of cloud where the charm will be deployed. It only
236 applies to proxy charms (not native)";
247 "Interact with the VNF or xDU through Helm.";
250 "Helm chart that models the execution environment, in any of the following ways:
251 - <helm-repo>/<helm-chart>
252 - <helm-chart folder name under helm-charts folder in the package>
253 - <helm-chart tgz file (w/ or w/o extension) under helm-charts folder in the package>
254 - <URL_where_to_fetch_chart>
260 "Helm version to use for this helm-chart, v3 by default";
269 leaf metric-service {
271 "Service name in the execution environment. For helm charts, it will be
272 the name of the kubernetes service used by the exporter to expose metrics
273 to the OSM collector.
277 leaf connection-point-ref {
279 "String representing a leaf reference to the particular external connection point
280 This field should match /vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id/vnfd:connection-point/vnfd:name
289 grouping vdu-config-access {
291 container config-access {
294 "Indicates the way to access to the xNF or xDU for VCA configuration.
295 For the moment there is a single way (ssh-access).";
297 container ssh-access {
300 "If the xNF requires ssh and this parameter is set, SSH keys
301 will be injected so that VCA can configure the xNF or xDU via ssh.";
305 "whether ssh access is needed or not";
312 "Default user for ssh";
319 grouping vnfc-configuration {
321 "Common information in the descriptors for NS, VNF or VDU configuration.
322 Note: If the NS contains multiple instances of the
323 same VNF or VDU, each instance could have a different
326 uses common:configuration-method;
328 list config-primitive {
330 "List of config primitives supported by the
331 configuration agent for this VNF or VDU.";
336 "Name of the config primitive.";
340 leaf execution-environment-ref {
342 "Leaf reference to the particular execution environment";
344 path "../../execution-environment-list/id";
348 leaf execution-environment-primitive {
350 "Name of the primitive in the execution enviroment. If not explicit,
351 the leaf 'name' will be used as the name of the primitive.";
358 "List of parameters to the config primitive.";
360 uses primitive-parameter;
363 leaf user-defined-script {
365 "A user defined script. If user defined script is defined,
366 the script will be executed using bash";
371 list initial-config-primitive {
373 "Initial set of configuration primitives.";
377 "Sequence number for the configuration primitive.";
381 choice primitive-type {
382 case primitive-definition {
385 "Name of the configuration primitive.";
389 leaf execution-environment-ref {
391 "Leaf reference to the particular execution environment";
393 path "../../execution-environment-list/id";
397 uses primitive-parameter-value;
399 leaf user-defined-script {
401 "A user defined script.";
408 list terminate-config-primitive {
410 "Terminate set of configuration primitives.";
414 "Sequence number for the configuration primitive.";
419 "Name of the configuration primitive.";
423 leaf execution-environment-ref {
425 "Leaf reference to the particular execution environment";
427 path "../../execution-environment-list/id";
431 uses primitive-parameter-value;
433 leaf user-defined-script {
435 "A user defined script.";
439 uses common:vnfc-metrics;
442 typedef alarm-severity-type {
444 "An indication of the importance or urgency of the alarm";
452 typedef alarm-statistic-type {
454 "Statistic type to use to determine threshold crossing
465 typedef relational-operation-type {
467 "The relational operator used to define whether an alarm,
468 scaling event, etc. should be triggered in certain scenarios,
469 such as if the metric statistic goes above or below a specified
472 enum GE; // greater than or equal
473 enum LE; // less than or equal
474 enum GT; // greater than
475 enum LT; // less than
480 grouping alarm-properties {
483 "A human readable string to identify the alarm";
489 "A description of this alarm";
495 "The identifier of the VDUR that the alarm is associated with";
507 list insufficient-data {
524 "This flag indicates whether the alarm should be repeatedly emitted
525 while the associated threshold has been crossed.";
533 "This flag indicates whether the alarm has been enabled or
542 "A measure of the importance or urgency of the alarm";
543 type alarm-severity-type;
548 "The type of metric statistic that is tracked by this alarm";
549 type alarm-statistic-type;
554 "The relational operator used to define whether an alarm should be
555 triggered in certain scenarios, such as if the metric statistic
556 goes above or below a specified value.";
557 type relational-operation-type;
562 "This value defines the threshold that, if crossed, will trigger
571 "The period defines the length of time (seconds) that the metric
572 data are collected over in oreder to evaluate the chosen
579 "Defines the length of time (seconds) in which metric data are
580 collected in order to evaluate the chosen statistic.";
585 grouping virtual-interface {
586 container virtual-interface {
588 "Container for the virtual interface properties";
592 "Specifies the type of virtual interface
594 PARAVIRT : Use the default paravirtualized interface for the VIM (virtio, vmxnet3, etc.).
595 VIRTIO : Deprecated! Use the traditional VIRTIO interface.
596 PCI-PASSTHROUGH : Use PCI-PASSTHROUGH interface.
597 SR-IOV : Use SR-IOV interface.
598 E1000 : Emulate E1000 interface.
599 RTL8139 : Emulate RTL8139 interface.
600 PCNET : Emulate PCNET interface.
601 OM-MGMT : Deprecated! Use PARAVIRT instead and set the VNF management interface at vnfd:mgmt-interface:cp";
606 enum PCI-PASSTHROUGH;
618 "Specifies the virtual PCI address. Expressed in
619 the following format dddd:dd:dd.d. For example
620 0000:00:12.0. This information can be used to
621 pass as metadata during the VM creation.";
627 "Aggregate bandwidth of the NIC.";
633 grouping description {
639 typedef scaling-trigger {
650 enum post-scale-out {
656 typedef scaling-policy-type {
667 typedef scaling-criteria-operation {