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

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.";
......@@ -239,7 +242,7 @@ submodule etsi-nfv-common {
description
"Ephemeral type of storage.";
}
/*
* Typedefs
*/
......@@ -316,14 +319,10 @@ submodule etsi-nfv-common {
grouping connectivity-type {
container connectivity-type {
list layer-protocol {
key "protocol";
leaf protocol {
type identityref {
base layer-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 {
uses 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";
uses vnfd;
}
uses nsd;
uses pnfd;
}
......
......@@ -1097,7 +1097,7 @@ submodule etsi-nfv-ns {
leaf id {
type string;
description
"Identifier of Identifier of this
"Identifier of Identifier of this
AffinityOrAntiAffinityGroup information element.";
reference
"GS NFV IFA014: Section 6.3.5.2 AffinityOrAntiAffinity
......@@ -1567,7 +1567,7 @@ submodule etsi-nfv-ns {
information element";
}
}
}
}
}
uses security-parameters;
}
......
......@@ -86,568 +86,646 @@ 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";
leaf id {
type string;
description
"Identifier of this VNFD information element. This attribute
shall be globally unique. The format will be defined in the
data model specification phase.";
reference
"GS NFV-IFA011: Section 7.1.2, VNFD information element";
}
leaf provider {
type string;
mandatory true;
description
"Provider of the VNF and of the VNFD";
reference
"GS NFV-IFA011: Section 7.1.2, VNFD information element";
}
leaf product-name {
type string;
mandatory true;
description
"Name to identify the VNF Product. Invariant for the VNF
Product lifetime.";
reference
"GS NFV-IFA011: Section 7.1.2, VNFD information element";
}
leaf software-version {
type string;
mandatory true;
description
"Software version of the VNF. This is changed when there is
any change to the software that is included in the VNF
Package";
reference
"GS NFV-IFA011: Section 7.1.2, VNFD information element";
}
leaf version {
type string;
mandatory true;
description
"Identifies the version of the VNFD";
reference
"GS NFV-IFA011: Section 7.1.2, VNFD information element";
}
leaf product-info-name {
type string;
description
"Human readable name of the VNFD. Can change
during the VNF Product lifetime.";
reference
"GS NFV-IFA011: Section 7.1.2, VNFD information element";
}
leaf product-info-description {
type string;
description
"Human readable description of the VNFD. Can change during
the VNF Product lifetime.";
reference
"GS NFV-IFA011: Section 7.1.2, VNFD information element";
}
leaf-list vnfm-info {
type string;
min-elements 1;
description
"Identifies VNFM(s) compatible with the VNF described in
this version of the VNFD.";
reference
"GS NFV-IFA011: Section 7.1.2, VNFD information element";
}
leaf localization-language {
type string;
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";
"Information about the language of the VNF.";
reference
"GS NFV-IFA011: Section 7.1.2, VNFD information element";
}
leaf default-localization-language {
when "../localization-language";
type string;
description
"Default localization language that is instantiated if no
information about selected localization language is
available. Shall be present if 'localization-language'
is present and shall be absent otherwise.";
reference
"GS NFV-IFA011: Section 7.1.2, VNFD information element";
}
list vdu {
key "id";
min-elements 1;
description
"The Virtualisation Deployment Unit (VDU) is a construct supporting
the description of the deployment and operational behaviour of a
VNF component, or the entire VNF if it was not componentized in
components.";
reference
"GS NFV IFA011: Section 7.1.2, VNFD information element";
leaf id {
type string;
description
"Identifier of this VNFD information element. This attribute
shall be globally unique. The format will be defined in the
data model specification phase.";
reference
"GS NFV-IFA011: Section 7.1.2, VNFD information element";
}
leaf provider {
type string;
mandatory true;
description
"Provider of the VNF and of the VNFD";
"Unique identifier of this VDU in VNFD.";
reference
"GS NFV-IFA011: Section 7.1.2, VNFD information element";
"GS NFV IFA011: Section 7.1.6.2, Vdu information element";
}
leaf product-name {
leaf name {
type string;
mandatory true;
description
"Name to identify the VNF Product. Invariant for the VNF
Product lifetime.";
"Human readable name of the VDU.";
reference
"GS NFV-IFA011: Section 7.1.2, VNFD information element";
"GS NFV IFA011: Section 7.1.6.2, Vdu information element";
}
leaf software-version {
leaf description {
type string;
mandatory true;
description
"Software version of the VNF. This is changed when there is
any change to the software that is included in the VNF
Package";
"Human readable description of the VDU.";
reference
"GS NFV-IFA011: Section 7.1.2, VNFD information element";
"GS NFV IFA011: Section 7.1.6.2, Vdu information element";
}
leaf version {
type string;
mandatory true;
list int-cpd {
key "id";
min-elements 1;
description
"Identifies the version of the VNFD";
"A internal-connection-point element is a type of
connection point and describes network connectivity
between a VDU instance and an internal Virtual Link or
an external connection point.";
reference
"GS NFV-IFA011: Section 7.1.2, VNFD information element";
"GS NFV IFA011: Section 7.1.6.2, Vdu information element";
leaf int-virtual-link-desc {
type leafref {
path "../../../int-virtual-link-desc/id";
}
description
"Reference of the internal VLD which this internal CPD
connects to.";
reference
"GS NFV IFA011: Section 7.1.6.4, VduCpd information
element";
}
leaf bitrate-requirement {
type uint64;
units "Mbps";
description
"Bitrate requirement on this CP.";
reference
"GS NFV IFA011: Section 7.1.6.4, VduCpd information
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
"The order of the NIC to be assigned on the compute
instance (e.g. 2 for eth2).
Note: when binding more than one port to a single
compute (aka multi vNICs) and ordering is desired, it
is mandatory that all ports will be set with an order
value. The order values shall represent a positive,
arithmetic progression that starts with 0 (i.e. 0, 1,
2,..., n).
If the property is not present, it shall be left to the
VIM to assign a value when creating the instance.";
reference
"GS NFV IFA011: Section 7.1.6.4, VduCpd information
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 product-info-name {
type string;
leaf virtual-compute-desc {
type leafref {
path "../../virtual-compute-desc/id";
}
must "../../virtual-compute-desc[id=current()]/" +
"virtual-memory/size >=" +
"../../sw-image-desc[id=current()/" +
"../sw-image-desc]/min-ram" {
}
description
"Human readable name of the VNFD. Can change
during the VNF Product lifetime.";
"Describes CPU, Memory and acceleration requirements of
the Virtualisation Container realizing this VDU.";
reference
"GS NFV-IFA011: Section 7.1.2, VNFD information element";
"GS NFV IFA011: Section 7.1.6.2, VDU information
element, and Section 7.1.9.2.2, VirtualComputeDesc
information element.";
}
leaf product-info-description {
type string;
leaf-list virtual-storage-desc {
type leafref {
path "../../virtual-storage-desc/id";
}
description
"Human readable description of the VNFD. Can change during
the VNF Product lifetime.";
"Describes storage requirements for a VirtualStorage
instance attached to the virtualisation container
created from virtualComputeDesc defined for this VDU.";
reference
"GS NFV-IFA011: Section 7.1.2, VNFD information element";
"GS NFV IFA011: Section 7.1.6.2, VDU information
element, and Section 7.1.9.4, Information elements
related to Virtual Storage.";
}
leaf-list vnfm-info {
type string;
min-elements 1;
list boot-order {
ordered-by user;
key "key";
leaf key {
type uint32;
}
leaf value {
type leafref {
path "../../virtual-storage-desc";
}
}
description
"Identifies VNFM(s) compatible with the VNF described in
this version of the VNFD.";
"The key indicates the boot index (lowest index defines
highest boot priority). The Value references a descriptor
from which a valid boot device is created e.g.
VirtualStorageDesc from which a VirtualStorage instance
is created.
Editor's note: The boot-order node requires further
study.";
reference
"GS NFV-IFA011: Section 7.1.2, VNFD information element";
"GS NFV IFA011: Section 7.1.6.2, Vdu information
element.";
}