Commit 9d7e50ce authored by Mahesh Jethanandani's avatar Mahesh Jethanandani

Merge branch 'master' into 'bug#89'

# Conflicts:
#   example-data/nfv.xml
#   src/yang/etsi-nfv-common.yang
#   src/yang/etsi-nfv-ns.yang
#   src/yang/etsi-nfv-vnf.yang
parents d1fb2181 49e5dd50
Pipeline #829 failed with stage
in 0 seconds
......@@ -6,7 +6,7 @@
# https://forge.etsi.org/etsi-software-license
YANG_MODULES="yang/yang/*"
OUTPUT="etsi-nfv.html"
OUTPUT="etsi-nfv-descriptors.html"
IMG_NAME="sol006"
VERSION=latest
IMG="$IMG_NAME:$VERSION"
......
<nfv xmlns="urn:etsi:nfv:yang:etsi-nfv-descriptors">
<vnfd>
<id>complex-vnf</id>
<provider>My Company</provider>
<product-name>complex-vnf</product-name>
<software-version>1.0</software-version>
<version>1.0</version>
<vnfm-info>netconf</vnfm-info>
<vdu>
<id>control-plane-active</id>
<name>control-plane-active</name>
<int-cpd>
<id>internal</id>
<int-virtual-link-desc>internal-vl</int-virtual-link-desc>
<layer-protocol>ipv4</layer-protocol>
</int-cpd>
<int-cpd>
<id>mgmt</id>
<int-virtual-link-desc>mgmt</int-virtual-link-desc>
<layer-protocol>ipv4</layer-protocol>
</int-cpd>
<virtual-compute-desc>CP</virtual-compute-desc>
<virtual-storage-desc>root</virtual-storage-desc>
<sw-image-desc>CP</sw-image-desc>
</vdu>
<vdu>
<id>control-plane-standby</id>
<name>control-plane-standby</name>
<int-cpd>
<id>internal</id>
<int-virtual-link-desc>internal-vl</int-virtual-link-desc>
<layer-protocol>ipv4</layer-protocol>
</int-cpd>
<int-cpd>
<id>mgmt</id>
<int-virtual-link-desc>mgmt</int-virtual-link-desc>
<layer-protocol>ipv4</layer-protocol>
</int-cpd>
<virtual-compute-desc>CP</virtual-compute-desc>
<virtual-storage-desc>root</virtual-storage-desc>
<sw-image-desc>CP</sw-image-desc>
</vdu>
<vdu>
<id>data-plane</id>
<name>data-plane</name>
<int-cpd>
<id>in</id>
<layer-protocol>ipv4</layer-protocol>
</int-cpd>
<int-cpd>
<id>internal</id>
<int-virtual-link-desc>internal-vl</int-virtual-link-desc>
<layer-protocol>ipv4</layer-protocol>
</int-cpd>
<int-cpd>
<id>out</id>
<layer-protocol>ipv4</layer-protocol>
</int-cpd>
<virtual-compute-desc>DP</virtual-compute-desc>
<virtual-storage-desc>root</virtual-storage-desc>
<sw-image-desc>DP</sw-image-desc>
</vdu>
<virtual-compute-desc>
<id>CP</id>
<virtual-memory>
<size>16.0</size>
</virtual-memory>
<virtual-cpu>
<num-virtual-cpu>8</num-virtual-cpu>
</virtual-cpu>
</virtual-compute-desc>
<virtual-compute-desc>
<id>DP</id>
<virtual-memory>
<size>32.0</size>
</virtual-memory>
<virtual-cpu>
<num-virtual-cpu>16</num-virtual-cpu>
</virtual-cpu>
</virtual-compute-desc>
<virtual-storage-descriptor>
<id>root</id>
<type-of-storage>root-storage</type-of-storage>
<size-of-storage>10</size-of-storage>
</virtual-storage-descriptor>
<sw-image-desc>
<id>CP</id>
<name>CP</name>
<version>1.1</version>
<checksum>
<algorithm>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://mycompany.images.com/control-plane.qcow2</image>
</sw-image-desc>
<sw-image-desc>
<id>DP</id>
<name>DP</name>
<version>1.1</version>
<checksum>
<algorithm>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://mycompany.images.com/data-plane.qcow2</image>
</sw-image-desc>
<int-virtual-link-desc>
<id>internal-vl</id>
<connectivity-type>
<layer-protocol>
<protocol>ipv4</protocol>
</layer-protocol>
</connectivity-type>
</int-virtual-link-desc>
<int-virtual-link-desc>
<id>mgmt</id>
<connectivity-type>
<layer-protocol>
<protocol>ipv4</protocol>
</layer-protocol>
</connectivity-type>
</int-virtual-link-desc>
<ext-cpd>
<id>in</id>
<int-cpd>
<vdu-id>data-plane</vdu-id>
<cpd>in</cpd>
</int-cpd>
<layer-protocol>ipv4</layer-protocol>
</ext-cpd>
<ext-cpd>
<id>mgmt</id>
<int-virtual-link-desc>mgmt</int-virtual-link-desc>
<layer-protocol>ipv4</layer-protocol>
</ext-cpd>
<ext-cpd>
<id>out</id>
<int-cpd>
<vdu-id>data-plane</vdu-id>
<cpd>out</cpd>
</int-cpd>
<layer-protocol>ipv4</layer-protocol>
</ext-cpd>
<df>
<id>gold</id>
<vdu-profile>
<id>control-plane-active</id>
<min-number-of-instances>1</min-number-of-instances>
<max-number-of-instances>1</max-number-of-instances>
<affinity-or-anti-affinity-group>
<id>control-plane</id>
</affinity-or-anti-affinity-group>
</vdu-profile>
<vdu-profile>
<id>control-plane-standby</id>
<min-number-of-instances>1</min-number-of-instances>
<max-number-of-instances>1</max-number-of-instances>
<affinity-or-anti-affinity-group>
<id>control-plane</id>
</affinity-or-anti-affinity-group>
</vdu-profile>
<vdu-profile>
<id>data-plane</id>
<min-number-of-instances>2</min-number-of-instances>
<max-number-of-instances>8</max-number-of-instances>
</vdu-profile>
<instantiation-level>
<id>il-1</id>
<vdu-level>
<vdu-id>control-plane-active</vdu-id>
<number-of-instances>1</number-of-instances>
</vdu-level>
<vdu-level>
<vdu-id>control-plane-standby</vdu-id>
<number-of-instances>1</number-of-instances>
</vdu-level>
<vdu-level>
<vdu-id>data-plane</vdu-id>
<number-of-instances>2</number-of-instances>
</vdu-level>
</instantiation-level>
<instantiation-level>
<id>il-2</id>
<vdu-level>
<vdu-id>control-plane-active</vdu-id>
<number-of-instances>1</number-of-instances>
</vdu-level>
<vdu-level>
<vdu-id>control-plane-standby</vdu-id>
<number-of-instances>1</number-of-instances>
</vdu-level>
<vdu-level>
<vdu-id>data-plane</vdu-id>
<number-of-instances>4</number-of-instances>
</vdu-level>
</instantiation-level>
<default-instantiation-level>il-1</default-instantiation-level>
<affinity-or-anti-affinity-group>
<id>control-plane</id>
<type>anti-affinity</type>
<scope>nfvi-node</scope>
</affinity-or-anti-affinity-group>
</df>
<df>
<id>silver</id>
<vdu-profile>
<id>control-plane-active</id>
<min-number-of-instances>1</min-number-of-instances>
<max-number-of-instances>1</max-number-of-instances>
<affinity-or-anti-affinity-group>
<id>control-plane</id>
</affinity-or-anti-affinity-group>
</vdu-profile>
<vdu-profile>
<id>control-plane-standby</id>
<min-number-of-instances>1</min-number-of-instances>
<max-number-of-instances>1</max-number-of-instances>
<affinity-or-anti-affinity-group>
<id>control-plane</id>
</affinity-or-anti-affinity-group>
</vdu-profile>
<vdu-profile>
<id>data-plane</id>
<min-number-of-instances>1</min-number-of-instances>
<max-number-of-instances>4</max-number-of-instances>
</vdu-profile>
<instantiation-level>
<id>il-1</id>
<vdu-level>
<vdu-id>control-plane-active</vdu-id>
<number-of-instances>1</number-of-instances>
</vdu-level>
<vdu-level>
<vdu-id>control-plane-standby</vdu-id>
<number-of-instances>1</number-of-instances>
</vdu-level>
<vdu-level>
<vdu-id>data-plane</vdu-id>
<number-of-instances>1</number-of-instances>
</vdu-level>
</instantiation-level>
<instantiation-level>
<id>il-2</id>
<vdu-level>
<vdu-id>control-plane-active</vdu-id>
<number-of-instances>1</number-of-instances>
</vdu-level>
<vdu-level>
<vdu-id>control-plane-standby</vdu-id>
<number-of-instances>1</number-of-instances>
</vdu-level>
<vdu-level>
<vdu-id>data-plane</vdu-id>
<number-of-instances>2</number-of-instances>
</vdu-level>
</instantiation-level>
<default-instantiation-level>il-1</default-instantiation-level>
<affinity-or-anti-affinity-group>
<id>control-plane</id>
<type>anti-affinity</type>
<scope>nfvi-node</scope>
</affinity-or-anti-affinity-group>
</df>
</vnfd>
</nfv>
<nfv xmlns="urn:etsi:params:xml:ns:yang:etsi-nfv">
<nfv xmlns="urn:etsi:nfv:yang:etsi-nfv-descriptors">
<vnfd>
<id>ASA</id>
<provider>My Company</provider>
......@@ -11,21 +11,21 @@
<name>Firewall VDU</name>
<int-cpd>
<id>inside</id>
<layer-protocol>Ethernet</layer-protocol>
<layer-protocol>ethernet</layer-protocol>
</int-cpd>
<int-cpd>
<id>management</id>
<layer-protocol>Ethernet</layer-protocol>
<layer-protocol>ethernet</layer-protocol>
</int-cpd>
<int-cpd>
<id>outside</id>
<layer-protocol>Ethernet</layer-protocol>
<layer-protocol>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-descriptor>
<virtual-compute-desc>
<id>asa-vcd</id>
<virtual-memory>
<size>4.0</size>
......@@ -33,19 +33,26 @@
<virtual-cpu>
<num-virtual-cpu>2</num-virtual-cpu>
</virtual-cpu>
</virtual-compute-descriptor>
</virtual-compute-desc>
<virtual-storage-descriptor>
<id>asa-vsd</id>
<type-of-storage>root</type-of-storage>
<type-of-storage>root-storage</type-of-storage>
<size-of-storage>0</size-of-storage>
</virtual-storage-descriptor>
<sw-image-desc>
<id>asa-image</id>
<name>ASA image</name>
<version>1.1</version>
<checksum>
<algorithm>sha-224</algorithm>
<hash>deadbeef</hash>
</checksum>
<container-format>bare</container-format>
<disk-format>qcow2</disk-format>
<min-disk>1</min-disk>
<min-ram>2.0</min-ram>
<image>http://www.cisco.com/asa.qcow2</image>
<size>1</size>
<image>http://mycompany.images.com/asa.qcow2</image>
</sw-image-desc>
<ext-cpd>
<id>inside</id>
......@@ -53,7 +60,7 @@
<vdu-id>firewall</vdu-id>
<cpd>inside</cpd>
</int-cpd>
<layer-protocol>Ethernet</layer-protocol>
<layer-protocol>ethernet</layer-protocol>
</ext-cpd>
<ext-cpd>
<id>management</id>
......@@ -61,7 +68,7 @@
<vdu-id>firewall</vdu-id>
<cpd>management</cpd>
</int-cpd>
<layer-protocol>Ethernet</layer-protocol>
<layer-protocol>ethernet</layer-protocol>
</ext-cpd>
<ext-cpd>
<id>outside</id>
......@@ -69,7 +76,7 @@
<vdu-id>firewall</vdu-id>
<cpd>outside</cpd>
</int-cpd>
<layer-protocol>Ethernet</layer-protocol>
<layer-protocol>ethernet</layer-protocol>
</ext-cpd>
<df>
<id>normal</id>
......@@ -81,14 +88,14 @@
<instantiation-level>
<id>double</id>
<vdu-level>
<id>firewall</id>
<vdu-id>firewall</vdu-id>
<number-of-instances>2</number-of-instances>
</vdu-level>
</instantiation-level>
<instantiation-level>
<id>single</id>
<vdu-level>
<id>firewall</id>
<vdu-id>firewall</vdu-id>
<number-of-instances>1</number-of-instances>
</vdu-level>
</instantiation-level>
......@@ -118,21 +125,21 @@
<name>Router VDU</name>
<int-cpd>
<id>left</id>
<layer-protocol>Ethernet</layer-protocol>
<layer-protocol>ethernet</layer-protocol>
</int-cpd>
<int-cpd>
<id>management</id>
<layer-protocol>Ethernet</layer-protocol>
<layer-protocol>ethernet</layer-protocol>
</int-cpd>
<int-cpd>
<id>right</id>
<layer-protocol>Ethernet</layer-protocol>
<layer-protocol>ethernet</layer-protocol>
</int-cpd>
<virtual-compute-desc>csr-vcd</virtual-compute-desc>
<virtual-storage-desc>csr-vsd</virtual-storage-desc>
<sw-image-desc>csr-image</sw-image-desc>
</vdu>
<virtual-compute-descriptor>
<virtual-compute-desc>
<id>csr-vcd</id>
<virtual-memory>
<size>4.0</size>
......@@ -140,19 +147,26 @@
<virtual-cpu>
<num-virtual-cpu>2</num-virtual-cpu>
</virtual-cpu>
</virtual-compute-descriptor>
</virtual-compute-desc>
<virtual-storage-descriptor>
<id>csr-vsd</id>
<type-of-storage>root</type-of-storage>
<type-of-storage>root-storage</type-of-storage>
<size-of-storage>0</size-of-storage>
</virtual-storage-descriptor>
<sw-image-desc>
<id>csr-image</id>
<name>CSR image</name>
<version>1.1</version>
<checksum>
<algorithm>sha-224</algorithm>
<hash>deadbeef</hash>
</checksum>
<container-format>bare</container-format>
<disk-format>qcow2</disk-format>
<min-disk>1</min-disk>
<min-ram>2.0</min-ram>
<image>http://www.cisco.com/csr.qcow2</image>
<size>1</size>
<image>http://mycompany.images.com/csr.qcow2</image>
</sw-image-desc>
<ext-cpd>
<id>left</id>
......@@ -160,7 +174,7 @@
<vdu-id>router</vdu-id>
<cpd>left</cpd>
</int-cpd>
<layer-protocol>Ethernet</layer-protocol>
<layer-protocol>ethernet</layer-protocol>
</ext-cpd>
<ext-cpd>
<id>management</id>
......@@ -168,7 +182,7 @@
<vdu-id>router</vdu-id>
<cpd>management</cpd>
</int-cpd>
<layer-protocol>Ethernet</layer-protocol>
<layer-protocol>ethernet</layer-protocol>
</ext-cpd>
<ext-cpd>
<id>right</id>
......@@ -176,7 +190,7 @@
<vdu-id>router</vdu-id>
<cpd>right</cpd>
</int-cpd>
<layer-protocol>Ethernet</layer-protocol>
<layer-protocol>ethernet</layer-protocol>
</ext-cpd>
<df>
<id>normal</id>
......@@ -188,14 +202,14 @@
<instantiation-level>
<id>double</id>
<vdu-level>
<id>router</id>
<vdu-id>router</vdu-id>
<number-of-instances>2</number-of-instances>
</vdu-level>
</instantiation-level>
<instantiation-level>
<id>single</id>
<vdu-level>
<id>router</id>
<vdu-id>router</vdu-id>
<number-of-instances>1</number-of-instances>
</vdu-level>
</instantiation-level>
......@@ -267,7 +281,7 @@
<id>fw2dpi</id>
<connectivity-type>
<layer-protocol>
<protocol>Ethernet</protocol>
<protocol>ethernet</protocol>
</layer-protocol>
</connectivity-type>
<df>
......@@ -282,7 +296,7 @@
<id>mgmt</id>
<connectivity-type>
<layer-protocol>
<protocol>IPv4</protocol>
<protocol>ipv4</protocol>
</layer-protocol>
</connectivity-type>
<df>
......@@ -297,7 +311,7 @@
<id>r2fw</id>
<connectivity-type>
<layer-protocol>
<protocol>Ethernet</protocol>
<protocol>ethernet</protocol>
</layer-protocol>
</connectivity-type>
<df>
......@@ -522,7 +536,7 @@
<id>r2fw</id>
<connectivity-type>
<layer-protocol>
<protocol>Ethernet</protocol>
<protocol>ipv4</protocol>
</layer-protocol>
</connectivity-type>
<df>
......@@ -594,7 +608,7 @@
<version>1.0</version>
<ext-cpd>
<id>outside</id>
<layer-protocol>Ethernet</layer-protocol>
<layer-protocol>ethernet</layer-protocol>
</ext-cpd>
</pnfd>
</nfv>
......@@ -10,13 +10,15 @@ cd src
echo "Testing compilation"
CONFD_OPTS="--fail-on-warnings"
CONFD_OPTS=""
confdc -c $CONFD_OPTS -o /opt/confd/etc/confd/etsi-nfv.fxs etsi-nfv.yang
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 the simple example"
confd_load -l -m nfv.xml
echo "Loading data for the complex Vnfd example"
confd_load -l -m complex-vnfd.xml
# Don't do this in the actual test, just waste of cycles
# echo "Stopping ConfD"
......
submodule etsi-nfv-common {
yang-version 1.1;
belongs-to etsi-nfv {
belongs-to etsi-nfv-descriptors {
prefix nfv;
}
description
......@@ -20,22 +20,22 @@ submodule etsi-nfv-common {
*/
identity layer-protocol {
}
identity Ethernet {
identity ethernet {
base layer-protocol;
}
identity MPLS {
identity mpls {
base layer-protocol;
}
identity ODU2 {
identity odu2 {
base layer-protocol;
}
identity IPv4 {
identity ipv4 {
base layer-protocol;
}
identity IPv6 {
identity ipv6 {
base layer-protocol;
}
identity Pseudo-Wire {
identity pseudo-wire {
base layer-protocol;
}
......@@ -177,6 +177,69 @@ submodule etsi-nfv-common {
base cp-role;
}
identity checksum-algorithm {
description
"Identifies the algorithms supported for the purpose of
calculating the checksum.";
reference
"GS NFV IFA011: Section 7.1.6.10 Checksum information element.";
}
identity sha-224 {
base checksum-algorithm;
description
"SHA-224.";
reference
"GS NFV IFA011: Section 7.1.6.10 Checksum information element.";
}
identity sha-256 {
base checksum-algorithm;
description
"SHA-256.";
reference
"GS NFV IFA011: Section 7.1.6.10 Checksum information element.";
}
identity sha-384 {
base checksum-algorithm;
description
"SHA-384.";
reference
"GS NFV IFA011: Section 7.1.6.10 Checksum information element.";
}
identity sha-512 {
base checksum-algorithm;
description
"SHA-512.";
reference
"GS NFV IFA011: Section 7.1.6.10 Checksum information element.";
}
identity storage-type {
description
"Base type of storage that identities can derive from.";
}
identity root-storage {
base storage-type;
description
"Root type of storage.";
}
identity swap-storage {
base storage-type;
description
"Swap type of storage.";
}
identity ephemeral-storage {
base storage-type;
description
"Ephemeral type of storage.";
}
/*
* Typedefs
*/
......@@ -257,13 +320,13 @@ submodule etsi-nfv-common {
key "protocol";
leaf protocol {
type identityref {
base layer-protocol;
}
type identityref {
base layer-protocol;
}
}
description
"Identifies the protocol this VL gives access to (Ethernet,
MPLS, ODU2, IPV4, IPV6, Pseudo-Wire).The top layer
"Identifies the protocols that the VL uses (Ethernet,
MPLS, ODU2, IPV4, IPV6, Pseudo-Wire). The top layer
protocol of the VL protocol stack shall always be provided.
The lower layer protocols may be included when there are
specific requirements on these layers.";
......@@ -392,7 +455,7 @@ submodule etsi-nfv-common {
}
leaf-list layer-protocol {
default Ethernet;
default ethernet;
type identityref {
base layer-protocol;
}
......
module etsi-nfv {
module etsi-nfv-descriptors {
yang-version 1.1;
namespace "urn:etsi:params:xml:ns:yang:etsi-nfv";
namespace "urn:etsi:nfv:yang:etsi-nfv-descriptors";
prefix nfv;
include etsi-nfv-common;
......
submodule etsi-nfv-ns {
yang-version 1.1;
belongs-to etsi-nfv {
belongs-to etsi-nfv-descriptors {
prefix nfv;
}
......@@ -15,10 +15,10 @@ submodule etsi-nfv-ns {
description
"Initial revision
Common data structure to support NSD according to:
ETSI GS NFV-IFA 011 Ed261v252";
ETSI GS NFV-IFA 014 Ed261v252";
reference
"ETSI GS NFV-IFA 011 Ed261v252";
"ETSI GS NFV-IFA 014 Ed261v252";
}
grouping resource-handle {
......@@ -146,63 +146,66 @@ submodule etsi-nfv-ns {
"GS NFV IFA014: Section 6.2.3.2 Sapd information element";
}
leaf virtual-link-desc {
type leafref {
path "../../virtual-link-desc/id";
choice cpd-or-virtual-link {
leaf virtual-link-desc {
type leafref {
path "../../virtual-link-desc/id";
}
description
"References the descriptor of the NS VL instance to
which the SAP instantiated from this SAPD connects to.";
reference
"GS NFV IFA014: Section 6.2.3.2 Sapd information element";
}
description
"References the descriptor of the NS VL instance to
which the SAP instantiated from this SAPD connects to.";
reference
"GS NFV IFA014: Section 6.2.3.2 Sapd information element";
}
choice associated-cpd-id {
container vnf {
leaf vnfd-id {
mandatory true;
type leafref {
path "../../../../nfv:vnfd/nfv:id";
choice associated-cpd-id {
container vnf {
leaf vnfd-id {
mandatory true;
type leafref {
path "../../../../nfv:vnfd/nfv:id";
}
must "boolean(../../../vnfd-id[.=current()])";
}
must "boolean(../../../vnfd-id[.=current()])";
}
leaf ext-cpd-id {
mandatory true;
type leafref {
path "deref(../vnfd-id)/../nfv:ext-cpd/nfv:id";
leaf ext-cpd-id {
mandatory true;
type leafref {
path "deref(../vnfd-id)/../nfv:ext-cpd/nfv:id";
}
}
}
}
container pnf {
leaf pnfd-id {
mandatory true;
container pnf {
leaf pnfd-id {
mandatory true;