-
/*
*
* Copyright 2017 RIFT.IO Inc
+ * Copyright 2018-2020 ETSI
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
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 {
type boolean;
default true;
}
+
+ leaf port-security-disable-strategy {
+ description "Strategy to disable port security, either Enables the port security for the port.
+ full : disable port security in the whole port
+ allow-address-pairs : allow address pairs for virtual IP (any virtual IP can be configured)";
+ type enumeration {
+ enum full;
+ enum allow-address-pairs;
+ }
+ default full;
+ }
}
typedef interface-type {
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;
enum RTL8139;
enum PCNET;
}
- default "VIRTIO";
+ default "PARAVIRT";
}
leaf vpci {
container vnf-configuration {
uses manotypes:vca-configuration;
+ uses manotypes:vca-relations;
+ uses manotypes:vca-config-access;
}
leaf operational-status {
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;
container vdu-configuration {
uses manotypes:vca-configuration;
+ uses manotypes:vca-config-access;
}
list monitoring-param {
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";
leaf mac-address {
description
- "MAC address of the interface.
- Some VNFs require a specific MAC address to be configured
- in the interface. While this is not recommended at all in
- NFV environments, this parameter exists to allow those
- scenarios.
- This parameter will be likely deprecated in the future.";
+ "MAC address of the interface.
+ Some VNFs require a specific MAC address to be configured
+ in the interface. While this is not recommended at all in
+ NFV environments, this parameter exists to allow those
+ scenarios.
+ This parameter will be likely deprecated in the future.";
type string;
}
case internal {
leaf internal-connection-point-ref {
description
- "Leaf Ref to the particular internal connection point";
+ "Leaf Ref to the particular internal connection point";
type leafref {
- path "../../internal-connection-point/id";
- }
+ path "../../internal-connection-point/id";
+ }
}
}
case external {
leaf external-connection-point-ref {
description
- "Leaf Ref to the particular external connection point";
+ "Leaf Ref to the particular external connection point";
type leafref {
- path "../../../connection-point/name";
- }
+ path "../../../connection-point/name";
+ }
}
}
}
}
}
+ list kdu {
+ description "List of K8s Deployment Units";
+ key "name";
+
+ leaf name {
+ description "Unique name for the KDU";
+ type string;
+ }
+
+ leaf description {
+ description "Description of the KDU.";
+ type string;
+ }
+
+ container kdu-configuration {
+ uses manotypes:vca-configuration;
+ uses manotypes:vca-config-access;
+
+ leaf-list blacklist-config-primitive {
+ description
+ "List of blacklisted config primitives from the list of
+ default kdu config primitives";
+
+ type enumeration {
+ enum upgrade;
+ enum rollback;
+ }
+
+ }
+
+ }
+
+ choice kdu-model {
+ description
+ "Indicates the KDU model, either as a helm-chart or as a juju-bundle.";
+
+ case helm-chart {
+ leaf helm-chart {
+ description
+ "Helm chart that models the KDU, in any of the following ways:
+ - <helm-repo>/<helm-chart>
+ - <helm-chart folder under k8s_models folder in the package>
+ - <helm-chart tgz file (w/ or w/o extension) under k8s_models folder in the package>
+ - <URL_where_to_fetch_chart>
+ ";
+ type string;
+ }
+ leaf helm-version {
+ description
+ "Helm version to use for this helm-chart, v3 by default";
+ type enumeration {
+ enum v2;
+ enum v3;
+ }
+ default v3;
+ }
+ }
+
+ case juju-bundle {
+ leaf juju-bundle {
+ description
+ "Juju bundle that models the KDU, in any of the following ways:
+ - <juju-repo>/<juju-bundle>
+ - <juju-bundle folder under k8s_models folder in the package>
+ - <juju-bundle tgz file (w/ or w/o extension) under k8s_models folder in the package>
+ - <URL_where_to_fetch_juju_bundle>
+ ";
+ type string;
+ }
+ }
+ }
+
+ list service {
+ description
+ "List of Kubernetes services exposed by the KDU.
+ If empty, all services are assumed to be exposed in the CP associated to the first network
+ in k8s-cluster.nets.";
+ key name;
+
+ leaf name {
+ description "Name of the Kubernetes service exposed by he KDU model";
+ type string;
+ }
+
+ leaf mgmt-service {
+ description
+ "Flag to indicate that this Kubernetes service is a mgmt service
+ to be used for KDU configuration. Defaults to false (if no present).
+ All services with mgmt-service set to true will be passed to the execution
+ environment in charge of the KDU configuration.";
+ type boolean;
+ default false;
+ }
+
+ leaf external-connection-point-ref {
+ description
+ "Leaf Ref to the particular external connection point";
+ type leafref {
+ path "../../../connection-point/name";
+ }
+ }
+
+ }
+
+ }
+
+ container k8s-cluster {
+ leaf-list version {
+ description
+ "List of supported K8s versions.
+ The cluster where the KDUs will be deployed will have to match
+ one of these versions.";
+
+ type string;
+ }
+
+ leaf-list cni {
+ description
+ "List of supported CNI plugins.
+ The cluster where the KDUs will be deployed will have to use
+ one of these CNI plugins.";
+
+ type enumeration {
+ enum calico;
+ enum flannel;
+ enum multus;
+ }
+ }
+
+ list nets {
+ description
+ "List of required networks in the K8s cluster.
+ The cluster where the KDUs will be deployed will have to use
+ one of these CNI plugins.";
+
+ key "id";
+
+ leaf id {
+ description "Internal identifier for the K8s cluster network in this VNF";
+ type string;
+ }
+
+ leaf external-connection-point-ref {
+ description
+ "Leaf Ref to the particular external connection point";
+ type leafref {
+ path "../../../connection-point/name";
+ }
+ }
+
+ }
+ }
+
list vdu-dependency {
description
"List of VDU dependencies.";
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 {
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 {
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";
+ }
}
}
}