Commit 274080a4 authored by Mahesh Jethanandani's avatar Mahesh Jethanandani

The models finally compile.

parent 82f542ca
Pipeline #775 failed with stage
in 0 seconds
<pkg xmlns="urn:etsi:nfv:yang:etsi-nfv-pkg">
<id>ASA</id>
<provider>My Company</provider>
<product-name>My Company ASAv</product-name>
<software-version>9.8</software-version>
<version>9.8</version>
<vnfm-info>My Company Vnfm</vnfm-info>
<vdu>
<id>firewall</id>
<name>Firewall VDU</name>
<int-cpd>
<id>inside</id>
<layer-protocol xmlns:nfv="urn:etsi:nfv:yang:etsi-nfv-descriptors">nfv:ethernet</layer-protocol>
</int-cpd>
<int-cpd>
<id>management</id>
<layer-protocol xmlns:nfv="urn:etsi:nfv:yang:etsi-nfv-descriptors">nfv:ethernet</layer-protocol>
</int-cpd>
<int-cpd>
<id>outside</id>
<layer-protocol xmlns:nfv="urn:etsi:nfv:yang:etsi-nfv-descriptors">nfv:ethernet</layer-protocol>
</int-cpd>
<virtual-compute-desc>asa-vcd</virtual-compute-desc>
<virtual-storage-desc>asa-vsd</virtual-storage-desc>
<sw-image-desc>asa-image</sw-image-desc>
</vdu>
<virtual-compute-desc>
<id>asa-vcd</id>
<virtual-memory>
<size>4.0</size>
</virtual-memory>
<virtual-cpu>
<num-virtual-cpu>2</num-virtual-cpu>
</virtual-cpu>
</virtual-compute-desc>
<virtual-storage-desc>
<id>asa-vsd</id>
<type-of-storage xmlns:nfv="urn:etsi:nfv:yang:etsi-nfv-descriptors">nfv:root-storage</type-of-storage>
<size-of-storage>0</size-of-storage>
</virtual-storage-desc>
<sw-image-desc>
<id>asa-image</id>
<name>ASA image</name>
<version>1.1</version>
<checksum>
<algorithm xmlns:nfv="urn:etsi:nfv:yang:etsi-nfv-descriptors">nfv:sha-224</algorithm>
<hash>deadbeef</hash>
</checksum>
<container-format>bare</container-format>
<disk-format>qcow2</disk-format>
<min-ram>2.0</min-ram>
<size>1</size>
<image>http://www.cisco.com/asa.qcow2</image>
</sw-image-desc>
<ext-cpd>
<id>inside</id>
<layer-protocol xmlns:nfv="urn:etsi:nfv:yang:etsi-nfv-descriptors">nfv:ethernet</layer-protocol>
</ext-cpd>
<ext-cpd>
<id>management</id>
<layer-protocol xmlns:nfv="urn:etsi:nfv:yang:etsi-nfv-descriptors">nfv:ethernet</layer-protocol>
</ext-cpd>
<ext-cpd>
<id>outside</id>
<layer-protocol xmlns:nfv="urn:etsi:nfv:yang:etsi-nfv-descriptors">nfv:ethernet</layer-protocol>
</ext-cpd>
<df>
<id>normal</id>
<vdu-profile>
<id>firewall</id>
<min-number-of-instances>1</min-number-of-instances>
<max-number-of-instances>2</max-number-of-instances>
</vdu-profile>
<instantiation-level>
<id>double</id>
<vdu-level>
<vdu-id>firewall</vdu-id>
<number-of-instances>2</number-of-instances>
</vdu-level>
</instantiation-level>
<instantiation-level>
<id>single</id>
<vdu-level>
<vdu-id>firewall</vdu-id>
<number-of-instances>1</number-of-instances>
</vdu-level>
</instantiation-level>
<default-instantiation-level>single</default-instantiation-level>
</df>
</pkg>
......@@ -34,11 +34,11 @@
<num-virtual-cpu>2</num-virtual-cpu>
</virtual-cpu>
</virtual-compute-desc>
<virtual-storage-descriptor>
<virtual-storage-desc>
<id>asa-vsd</id>
<type-of-storage>root-storage</type-of-storage>
<size-of-storage>0</size-of-storage>
</virtual-storage-descriptor>
</virtual-storage-desc>
<sw-image-desc>
<id>asa-image</id>
<name>ASA image</name>
......@@ -136,11 +136,11 @@
<num-virtual-cpu>2</num-virtual-cpu>
</virtual-cpu>
</virtual-compute-desc>
<virtual-storage-descriptor>
<virtual-storage-desc>
<id>csr-vsd</id>
<type-of-storage>root-storage</type-of-storage>
<size-of-storage>0</size-of-storage>
</virtual-storage-descriptor>
</virtual-storage-desc>
<sw-image-desc>
<id>csr-image</id>
<name>CSR image</name>
......@@ -256,9 +256,7 @@
<virtual-link-desc>
<id>fw2dpi</id>
<connectivity-type>
<layer-protocol>
<protocol>ethernet</protocol>
</layer-protocol>
<layer-protocol>ethernet</layer-protocol>
</connectivity-type>
<df>
<id>normal</id>
......@@ -271,9 +269,7 @@
<virtual-link-desc>
<id>mgmt</id>
<connectivity-type>
<layer-protocol>
<protocol>ipv4</protocol>
</layer-protocol>
<layer-protocol>ipv4</layer-protocol>
</connectivity-type>
<df>
<id>normal</id>
......@@ -286,9 +282,7 @@
<virtual-link-desc>
<id>r2fw</id>
<connectivity-type>
<layer-protocol>
<protocol>ethernet</protocol>
</layer-protocol>
<layer-protocol>ethernet</layer-protocol>
</connectivity-type>
<df>
<id>normal</id>
......@@ -511,9 +505,7 @@
<virtual-link-desc>
<id>r2fw</id>
<connectivity-type>
<layer-protocol>
<protocol>ipv4</protocol>
</layer-protocol>
<layer-protocol>ipv4</layer-protocol>
</connectivity-type>
<df>
<id>r2fw</id>
......
......@@ -7,17 +7,24 @@ set -e
source /opt/confd/confdrc
cd src
echo "Testing compilation"
CONFD_OPTS="--fail-on-warnings"
CONFD_OPTS=""
echo "Testing compilations of pkg."
confdc -c $CONFD_OPTS -o /opt/confd/etc/confd/etsi-nfv-pkg.fxs etsi-nfv-pkg.yang
echo "Testing compilations of descriptors."
confdc -c $CONFD_OPTS -o /opt/confd/etc/confd/etsi-nfv-descriptors.fxs etsi-nfv-descriptors.yang
echo "Starting ConfD"
confd
echo "Loading Data"
echo "Loading Data for pkg"
confd_load -l -m nfv-vnf-pkg.xml
echo "Loading Data for descriptors"
confd_load -l -m nfv.xml
# Don't do this in the actual test, just waste of cycles
# echo "Stopping ConfD"
# confd --stop
......@@ -3,6 +3,9 @@ submodule etsi-nfv-common {
belongs-to etsi-nfv-descriptors {
prefix nfv;
}
organization
"European Telecommunications Standards Institute (ETSI)";
description
"Common data types for ETSI data models.";
......@@ -316,14 +319,10 @@ submodule etsi-nfv-common {
grouping connectivity-type {
container connectivity-type {
list layer-protocol {
key "protocol";
leaf protocol {
leaf-list layer-protocol {
type identityref {
base layer-protocol;
}
}
description
"Identifies the protocols that the VL uses (Ethernet,
MPLS, ODU2, IPV4, IPV6, Pseudo-Wire). The top layer
......@@ -634,17 +633,6 @@ submodule etsi-nfv-common {
reference
"GS NFV IFA011: Section 7.1.6.3 Cpd information element";
}
leaf security-group-rule-id {
type leafref {
path "/nfv/vnfd/security-group-rule/id";
}
description
"Reference of the security group rules bound to this
CPD.";
reference
"GS NFV IFA011: Section 7.1.6.3 Cpd information element";
}
}
grouping security-group-rule {
......
......@@ -22,7 +22,19 @@ module etsi-nfv-descriptors {
}
container nfv {
list vnfd {
key "id";
description
"A VNF Descriptor (VNFD) is a deployment template which
describes a VNF in terms of deployment and operational
behaviour requirements. It also contains connectivity,
interface and virtualised resource requirements";
reference
"GS NFV-IFA011: Section 7.1.2, VNFD information element";
uses vnfd;
}
uses nsd;
uses pnfd;
}
......
......@@ -86,35 +86,10 @@ submodule etsi-nfv-vnf {
"GS NFV-IFA011: Section 7.1.6.6,
VirtualNetworkInterfaceRequirements information element";
}
leaf nicio-requirements {
type leafref {
path "/nfv/vnfd/virtual-compute-desc/id";
}
description
"This references (couples) the CPD with any logical node I/O
requirements (for network devices) that may have been
created. Linking these attributes is necessary so that so
that I/O requirements that need to be articulated at the
logical node level can be associated with the network
interface requirements associated with the CPD.";
reference
"GS NFV-IFA011: Section 7.1.6.6,
VirtualNetworkInterfaceRequirements information element";
}
}
}
grouping vnfd {
list vnfd {
key "id";
description
"A VNF Descriptor (VNFD) is a deployment template which
describes a VNF in terms of deployment and operational
behaviour requirements. It also contains connectivity,
interface and virtualised resource requirements";
reference
"GS NFV-IFA011: Section 7.1.2, VNFD information element";
leaf id {
type string;
description
......@@ -124,6 +99,7 @@ submodule etsi-nfv-vnf {
reference
"GS NFV-IFA011: Section 7.1.2, VNFD information element";
}
leaf provider {
type string;
mandatory true;
......@@ -132,6 +108,7 @@ submodule etsi-nfv-vnf {
reference
"GS NFV-IFA011: Section 7.1.2, VNFD information element";
}
leaf product-name {
type string;
mandatory true;
......@@ -141,6 +118,7 @@ submodule etsi-nfv-vnf {
reference
"GS NFV-IFA011: Section 7.1.2, VNFD information element";
}
leaf software-version {
type string;
mandatory true;
......@@ -151,6 +129,7 @@ submodule etsi-nfv-vnf {
reference
"GS NFV-IFA011: Section 7.1.2, VNFD information element";
}
leaf version {
type string;
mandatory true;
......@@ -159,6 +138,7 @@ submodule etsi-nfv-vnf {
reference
"GS NFV-IFA011: Section 7.1.2, VNFD information element";
}
leaf product-info-name {
type string;
description
......@@ -167,6 +147,7 @@ submodule etsi-nfv-vnf {
reference
"GS NFV-IFA011: Section 7.1.2, VNFD information element";
}
leaf product-info-description {
type string;
description
......@@ -175,6 +156,7 @@ submodule etsi-nfv-vnf {
reference
"GS NFV-IFA011: Section 7.1.2, VNFD information element";
}
leaf-list vnfm-info {
type string;
min-elements 1;
......@@ -184,6 +166,7 @@ submodule etsi-nfv-vnf {
reference
"GS NFV-IFA011: Section 7.1.2, VNFD information element";
}
leaf localization-language {
type string;
description
......@@ -191,6 +174,7 @@ submodule etsi-nfv-vnf {
reference
"GS NFV-IFA011: Section 7.1.2, VNFD information element";
}
leaf default-localization-language {
when "../localization-language";
type string;
......@@ -213,6 +197,7 @@ submodule etsi-nfv-vnf {
components.";
reference
"GS NFV IFA011: Section 7.1.2, VNFD information element";
leaf id {
type string;
description
......@@ -220,6 +205,7 @@ submodule etsi-nfv-vnf {
reference
"GS NFV IFA011: Section 7.1.6.2, Vdu information element";
}
leaf name {
type string;
mandatory true;
......@@ -228,6 +214,7 @@ submodule etsi-nfv-vnf {
reference
"GS NFV IFA011: Section 7.1.6.2, Vdu information element";
}
leaf description {
type string;
description
......@@ -235,6 +222,7 @@ submodule etsi-nfv-vnf {
reference
"GS NFV IFA011: Section 7.1.6.2, Vdu information element";
}
list int-cpd {
key "id";
min-elements 1;
......@@ -248,7 +236,7 @@ submodule etsi-nfv-vnf {
leaf int-virtual-link-desc {
type leafref {
path "../../../nfv:int-virtual-link-desc/nfv:id";
path "../../../int-virtual-link-desc/id";
}
description
"Reference of the internal VLD which this internal CPD
......@@ -268,6 +256,23 @@ submodule etsi-nfv-vnf {
element.";
}
uses virtual-network-interface-requirements;
leaf nicio-requirements {
type leafref {
path "../../../virtual-compute-desc/id";
}
description
"This references (couples) the CPD with any logical node I/O
requirements (for network devices) that may have been
created. Linking these attributes is necessary so that so
that I/O requirements that need to be articulated at the
logical node level can be associated with the network
interface requirements associated with the CPD.";
reference
"GS NFV-IFA011: Section 7.1.6.6,
VirtualNetworkInterfaceRequirements information element";
}
leaf-list order {
type uint32;
description
......@@ -288,14 +293,26 @@ submodule etsi-nfv-vnf {
element.";
}
uses cpd;
leaf security-group-rule-id {
type leafref {
path "../../../security-group-rule/id";
}
description
"Reference of the security group rules bound to this
CPD.";
reference
"GS NFV IFA011: Section 7.1.6.3 Cpd information element";
}
}
leaf virtual-compute-desc {
type leafref {
path "../../nfv:virtual-compute-desc/nfv:id";
path "../../virtual-compute-desc/id";
}
must "../../nfv:virtual-compute-desc[id=current()]/" +
"nfv:virtual-memory/size >=" +
"../../nfv:sw-image-desc[id=current()/" +
must "../../virtual-compute-desc[id=current()]/" +
"virtual-memory/size >=" +
"../../sw-image-desc[id=current()/" +
"../sw-image-desc]/min-ram" {
}
description
......@@ -309,8 +326,7 @@ submodule etsi-nfv-vnf {
leaf-list virtual-storage-desc {
type leafref {
path "../../nfv:virtual-storage-descriptor/" +
"nfv:id";
path "../../virtual-storage-desc/id";
}
description
"Describes storage requirements for a VirtualStorage
......@@ -321,15 +337,18 @@ submodule etsi-nfv-vnf {
element, and Section 7.1.9.4, Information elements
related to Virtual Storage.";
}
list boot-order {
ordered-by user;
key "key";
leaf key {
type uint32;
}
leaf value {
type leafref {
path "../../nfv:virtual-storage-desc";
path "../../virtual-storage-desc";
}
}
description
......@@ -345,6 +364,7 @@ submodule etsi-nfv-vnf {
"GS NFV IFA011: Section 7.1.6.2, Vdu information
element.";
}
leaf sw-image-desc {
type leafref {
path "../../sw-image-desc/id";
......@@ -356,6 +376,7 @@ submodule etsi-nfv-vnf {
"GS NFV IFA011: Section 7.1.6.2, Vdu information
element.";
}
leaf-list nfvi-constraint {
type string;
description
......@@ -367,6 +388,7 @@ submodule etsi-nfv-vnf {
"GS NFV IFA011: Section 7.1.6.2, VDU Information
element.";
}
list monitoring-parameter {
key "id";
leaf id {
......@@ -379,6 +401,7 @@ submodule etsi-nfv-vnf {
}
uses monitoring-parameter;
}
list configurable-properties {
key "key";
leaf key {
......@@ -394,6 +417,7 @@ submodule etsi-nfv-vnf {
"GS NFV IFA011: Section 7.1.6.7,
VnfcConfigurableProperties Information element.";
}
leaf boot-data {
type string;
description
......@@ -441,6 +465,7 @@ submodule etsi-nfv-vnf {
leaf key {
type string;
}
leaf value {
type string;
}
......@@ -468,6 +493,7 @@ submodule etsi-nfv-vnf {
list request-additional-capability {
key "name";
leaf name {
type string;
description
......@@ -476,9 +502,9 @@ submodule etsi-nfv-vnf {
capabilities.";
reference
"GS NFV IFA011: Section 7.1.9.5,
RequestedAdditionalCapabilityData Information
element.";
RequestedAdditionalCapabilityData Information element.";
}
leaf support-mandatory {
type boolean;
description
......@@ -497,8 +523,7 @@ submodule etsi-nfv-vnf {
additional capability.";
reference
"GS NFV IFA011: Section 7.1.9.5,
RequestedAdditionalCapabilityData Information
element.";
RequestedAdditionalCapabilityData Information element.";
}
leaf preferred-version {
......@@ -508,14 +533,16 @@ submodule etsi-nfv-vnf {
additional capability.";
reference
"GS NFV IFA011: Section 7.1.9.5,
RequestedAdditionalCapabilityData Information
element.";
RequestedAdditionalCapabilityData Information element.";
}
list target-performance-parameters {
key "key";
leaf key {
type string;
}
leaf value {
type string;
}
......@@ -524,8 +551,7 @@ submodule etsi-nfv-vnf {
requested additional capability type.";
reference
"GS NFV IFA011: Section 7.1.9.5,
RequestedAdditionalCapabilityData Information
element.";
RequestedAdditionalCapabilityData Information element.";
}
}
......@@ -552,6 +578,7 @@ submodule etsi-nfv-vnf {
"GS NFV IFA011: Section 7.1.9.3, Information elements
related to Virtual Memory.";
}
leaf over-subscription-policy {
type string;
description
......@@ -563,11 +590,14 @@ submodule etsi-nfv-vnf {
"GS NFV IFA011: Section 7.1.9.3, Information elements
related to Virtual Memory.";
}
list vdu-mem-requirements {
key "key";
leaf key {
type string;
}
leaf value {
type string;
}
......@@ -596,6 +626,7 @@ submodule etsi-nfv-vnf {
"GS NFV IFA011: Section 7.1.9.2.2, VirtualComputeDesc
Information element.";
}
container virtual-cpu {
description
"The virtual CPU(s)of the virtualised compute.";
......@@ -613,6 +644,7 @@ submodule etsi-nfv-vnf {
"GS NFV IFA011: Section 7.1.9.2.3, VirtualCpuData
information elements.";
}
leaf num-virtual-cpu {
type uint16 {
range "1..max";
......@@ -624,6 +656,7 @@ submodule etsi-nfv-vnf {
"GS NFV IFA011: Section 7.1.9.2.3, VirtualCpuData
information elements.";
}
leaf clock {
type uint32;
units "MHz";
......@@ -635,6 +668,7 @@ submodule etsi-nfv-vnf {
"GS NFV IFA011: Section 7.1.9.2.3, VirtualCpuData
information elements.";
}
leaf oversubscription-policy {
type string;
description
......@@ -646,11 +680,14 @@ submodule etsi-nfv-vnf {
"GS NFV IFA011: Section 7.1.9.2.3, VirtualCpuData
information elements.";
}
list vdu-cpu-requirements {
key "key";
leaf key {
type string;
}
leaf value {
type string;
}
......@@ -661,8 +698,10 @@ submodule etsi-nfv-vnf {
"GS NFV IFA011: Section 7.1.9.3.2, VirtualCpuData
information element.";
}
container pinning {
presence "Set to specify CPU pinning.";
leaf policy {
default "dynamic";
type enumeration {
......@@ -684,8 +723,9 @@ submodule etsi-nfv-vnf {
}
list rule {
when "../nfv:policy = 'static'";
when "../policy = 'static'";
key "key";
leaf key {
type string;
}
......@@ -710,7 +750,7 @@ submodule etsi-nfv-vnf {
}
}
list virtual-storage-descriptor {
list virtual-storage-desc {
key "id";
description
"Storage requirements for a Virtual Storage instance
......@@ -727,7 +767,7 @@ submodule etsi-nfv-vnf {
leaf type-of-storage {
// Needed to be able to onboard images
default "root-storage";
default root-storage;
type identityref {
base storage-type;
}
......@@ -738,6 +778,7 @@ submodule etsi-nfv-vnf {
"GS NFV IFA011: Section 7.1.9.4, Information elements
related to Virtual Storage.";
}
leaf size-of-storage {
type uint64;
units "GB";
......@@ -749,11 +790,14 @@ submodule etsi-nfv-vnf {
"GS NFV IFA011: Section 7.1.9.4, Information elements
related to Virtual Storage.";
}
list vdu-storage-requirements {
key "key";
leaf key {
type string;
}
leaf value {
type string;
}
......@@ -764,6 +808,7 @@ submodule etsi-nfv-vnf {
"GS NFV IFA011: Section 7.1.9.4.2, VirtualStorageDesc
information element.";
}
leaf rdma-enabled {
type boolean;
description
......@@ -772,12 +817,13 @@ submodule etsi-nfv-vnf {
"GS NFV IFA011: Section 7.1.9.4, Information elements
related to Virtual Storage.";
}
leaf sw-image-desc {
type leafref {
path "../../sw-image-desc/id";
}
must "../nfv:size-of-storage >=" +
"../../nfv:sw-image-desc[id=current()]/min-disk" {
must "../size-of-storage >=" +
"../../sw-image-desc[id=current()]/min-disk" {
}
description
"Software image to be loaded on the VirtualStorage
......@@ -795,14 +841,16 @@ submodule etsi-nfv-vnf {
VNF.";
reference
"GS NFV IFA011: Section 7.1.2, VNFD Information element.";
leaf id {
type string;
description
"The identifier of this software image.";
reference
"GS NFV IFA011: Section 7.1.6.5, SwImageDesc
information element";
"GS NFV IFA011: Section 7.1.6.5, SwImageDesc information
element";
}
leaf name {
mandatory true;
type string;
......@@ -1043,6 +1091,7 @@ submodule etsi-nfv-vnf {
least one internal CP.";
reference
"GS NFV IFA011: Section 7.1.2, Vnfd information element.";
leaf id {
type string;
description
......@@ -1069,6 +1118,7 @@ submodule etsi-nfv-vnf {
"GS NFV IFA011: Section 7.1.8.5, VirtualLinkDescFlavour
information element.";
}
container qos {
presence "VL QoS parameters";
description
......@@ -1125,6 +1175,7 @@ submodule etsi-nfv-vnf {
"GS NFV IFA011: Section 7.1.7.2, VnfVirtualLinkDesc
information element.";
}
leaf description {
type string;
description
......@@ -1134,8 +1185,10 @@ submodule etsi-nfv-vnf {
"GS NFV IFA011: Section 7.1.7.2, VnfVirtualLinkDesc
information element.";
}
list monitoring-parameters {
key "id";
leaf id {
type string;
description
......@@ -1168,15 +1221,17 @@ submodule etsi-nfv-vnf {
Descriptor (CPD) connect. Either intVirtualLinkDesc or
intCpd shall be present.";
type leafref {
path "../../nfv:int-virtual-link-desc/nfv:id";
path "../../int-virtual-link-desc/id";
}
}
container int-cpd {
leaf vdu-id {
type leafref {
path "../../../vdu/id";
}
}