Commit ffa3a5cd authored by Mahesh Jethanandani's avatar Mahesh Jethanandani

Added module and test cases for PNFD and NSD

parent ad98fe5e
Pipeline #826 failed with stage
in 0 seconds
<nsd xmlns="urn:etsi:nfv:yang:etsi-nfv-nsd">
<nsd>
<id>firewall-nsd</id>
<vnfd-id>ASA</vnfd-id>
<sapd>
<id>inside</id>
</sapd>
<sapd>
<id>management</id>
</sapd>
<sapd>
<id>outside</id>
</sapd>
<df>
<id>firewall</id>
<vnf-profile>
<id>firewall</id>
<vnfd-id>ASA</vnfd-id>
<flavour-id>normal</flavour-id>
<instantiation-level>single</instantiation-level>
<min-number-of-instances>1</min-number-of-instances>
<max-number-of-instances>1</max-number-of-instances>
</vnf-profile>
<ns-instantiation-level>
<id>single</id>
<vnf-to-level-mapping>
<vnf-profile-id>firewall</vnf-profile-id>
<number-of-instances>1</number-of-instances>
</vnf-to-level-mapping>
</ns-instantiation-level>
</df>
</nsd>
</nsd>
<pnfd xmlns="urn:etsi:nfv:yang:etsi-nfv-pnfd">
<id>physical-dpi</id>
<version>1.0</version>
<ext-cpd>
<id>outside</id>
<layer-protocol xmlns:nfv="urn:etsi:nfv:yang:etsi-nfv-descriptors">nfv:ethernet</layer-protocol>
</ext-cpd>
</pnfd>
<nfv xmlns="urn:etsi:nfv:yang:etsi-nfv-descriptors">
<vnfds>
<vnfd>
<id>ASA</id>
<provider>My Company</provider>
<product-name>My Company ASAv</product-name>
......@@ -100,8 +100,8 @@
</instantiation-level>
<default-instantiation-level>single</default-instantiation-level>
</df>
</vnfds>
<vnfds>
</vnfd>
<vnfd>
<id>CSR</id>
<provider>My Company</provider>
<product-name>My Company CSR 1000v</product-name>
......@@ -202,8 +202,8 @@
</instantiation-level>
<default-instantiation-level>single</default-instantiation-level>
</df>
</vnfds>
<nsds>
</vnfd>
<nsd>
<id>firewall-nsd</id>
<vnfd-id>ASA</vnfd-id>
<sapd>
......@@ -233,8 +233,8 @@
</vnf-to-level-mapping>
</ns-instantiation-level>
</df>
</nsds>
<nsds>
</nsd>
<nsd>
<id>service-chain-1</id>
<vnfd-id>ASA</vnfd-id>
<vnfd-id>CSR</vnfd-id>
......@@ -483,8 +483,8 @@
</vnf-to-level-mapping>
</ns-instantiation-level>
</df>
</nsds>
<nsds>
</nsd>
<nsd>
<id>service-chain-2</id>
<nested-nsd-id>firewall-nsd</nested-nsd-id>
<vnfd-id>CSR</vnfd-id>
......@@ -570,13 +570,13 @@
</virtual-link-connectivity>
</ns-profile>
</df>
</nsds>
<pnfds>
</nsd>
<pnfd>
<id>physical-dpi</id>
<version>1.0</version>
<ext-cpd>
<id>outside</id>
<layer-protocol>ethernet</layer-protocol>
</ext-cpd>
</pnfds>
</pnfd>
</nfv>
......@@ -10,17 +10,27 @@ cd src
CONFD_OPTS="--fail-on-warnings"
CONFD_OPTS=""
echo "Testing compilations of pkg."
echo "Testing compilations of VNFD."
confdc -c $CONFD_OPTS -o /opt/confd/etc/confd/etsi-nfv-vnfd.fxs etsi-nfv-vnfd.yang
echo "Testing compilations of PNFD."
confdc -c $CONFD_OPTS -o /opt/confd/etc/confd/etsi-nfv-pnfd.fxs etsi-nfv-pnfd.yang
echo "Testing compilations of NSD."
confdc -c $CONFD_OPTS -o /opt/confd/etc/confd/etsi-nfv-nsd.fxs etsi-nfv-nsd.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 for pkg"
echo "Loading Data for VNFD"
confd_load -l -m nfv-vnfd.xml
echo "Loading Data for PNFD"
confd_load -l -m nfv-pnfd.xml
echo "Loading Data for NSD"
confd_load -l -m nfv-nsd.xml
echo "Loading Data for descriptors"
confd_load -l -m nfv.xml
......
......@@ -9,7 +9,7 @@ submodule etsi-nfv-common {
description
"Common data types for ETSI data models.";
revision 2019-03-18 {
revision 2019-04-25 {
description
"Initial revision
......
......@@ -14,7 +14,7 @@ module etsi-nfv-descriptors {
description
"Network Function Virtualization Descriptors";
revision 2019-03-18 {
revision 2019-04-25 {
description
"Initial revision.
NSD and PNFD according to ETSI GS NFV-IFA 014 Ed261v252
......@@ -22,7 +22,7 @@ module etsi-nfv-descriptors {
}
container nfv {
list vnfds {
list vnfd {
key "id";
description
"A VNF Descriptor (VNFD) is a deployment template which
......@@ -35,7 +35,7 @@ module etsi-nfv-descriptors {
uses vnfd;
}
list nsds {
list nsd {
key "id";
description
......@@ -49,7 +49,7 @@ module etsi-nfv-descriptors {
uses nsd;
}
list pnfds {
list pnfd {
key "id";
description
......
......@@ -11,7 +11,7 @@ submodule etsi-nfv-ns {
description
"Models for NS according to ETSI GS NFV-IFA 014.";
revision 2019-03-18 {
revision 2019-04-25 {
description
"Initial revision
Common data structure to support NSD according to:
......@@ -86,7 +86,7 @@ submodule etsi-nfv-ns {
leaf-list nested-nsd-id {
must ". != ../id";
type leafref {
path "../../nsds/id";
path "../../nsd/id";
}
description
"References the NSD of a constituent nested NS.";
......@@ -97,7 +97,7 @@ submodule etsi-nfv-ns {
leaf-list vnfd-id {
type leafref {
path "../../vnfds/id";
path "../../vnfd/id";
}
description
"References the VNFD of a constituent VNF.";
......@@ -108,7 +108,7 @@ submodule etsi-nfv-ns {
leaf-list pnfd-id {
type leafref {
path "../../pnfds/id";
path "../../pnfd/id";
}
description
"References the PNFD of a constituent PNF.";
......@@ -164,7 +164,7 @@ submodule etsi-nfv-ns {
leaf vnfd-id {
mandatory true;
type leafref {
path "../../../../nfv:vnfds/nfv:id";
path "../../../../vnfd/id";
}
must "boolean(../../../vnfd-id[.=current()])";
}
......@@ -172,7 +172,7 @@ submodule etsi-nfv-ns {
leaf ext-cpd-id {
mandatory true;
type leafref {
path "deref(../vnfd-id)/../nfv:ext-cpd/nfv:id";
path "deref(../vnfd-id)/../ext-cpd/id";
}
}
}
......@@ -181,7 +181,7 @@ submodule etsi-nfv-ns {
leaf pnfd-id {
mandatory true;
type leafref {
path "../../../../nfv:pnfds/nfv:id";
path "../../../../pnfd/id";
}
must "boolean(../pnfd-id[.=current()])";
}
......@@ -189,7 +189,7 @@ submodule etsi-nfv-ns {
leaf ext-cpd-id {
mandatory true;
type leafref {
path "deref(../pnfd-id)/../nfv:ext-cpd/nfv:id";
path "deref(../pnfd-id)/../ext-cpd/id";
}
}
}
......@@ -197,7 +197,7 @@ submodule etsi-nfv-ns {
leaf nsd-id {
mandatory true;
type leafref {
path "../../../../nfv:nsds/nfv:id";
path "../../../../nsd/id";
}
must "boolean(../nsd-id[.=current()])";
}
......@@ -205,7 +205,7 @@ submodule etsi-nfv-ns {
leaf ext-cpd-id {
mandatory true;
type leafref {
path "deref(../nsd-id)/../nfv:sapd/nfv:id";
path "deref(../nsd-id)/../sapd/id";
}
}
}
......@@ -437,7 +437,7 @@ submodule etsi-nfv-ns {
must ". = deref(../../vnfd-profile-id)" {
}
type leafref {
path "/nfv/nsds/df/vnf-profile/id";
path "../../../../../nsd/df/vnf-profile/id";
}
}
}
......@@ -446,7 +446,7 @@ submodule etsi-nfv-ns {
must ". = deref(../../pnfd-profile-id)" {
}
type leafref {
path "/nfv/nsds/df/pnf-profile/id";
path "../../../../../nsd/df/pnf-profile/id";
}
}
}
......@@ -455,7 +455,7 @@ submodule etsi-nfv-ns {
must ". = deref(../../ns-profile-id)" {
}
type leafref {
path "/nfv/nsds/df/ns-profile/id";
path "../../../../../nsd/df/ns-profile/id";
}
}
}
......@@ -472,12 +472,12 @@ submodule etsi-nfv-ns {
must ". = deref(../../vnfd-profile-id)/../vnfd-id" {
}
type leafref {
path "/nfv/vnfds/id";
path "../../../../../vnfd/id";
}
}
leaf cpd-id {
type leafref {
path "deref(../vnfd-id)/../nfv:ext-cpd/nfv:id";
path "deref(../vnfd-id)/../ext-cpd/id";
}
}
}
......@@ -486,12 +486,12 @@ submodule etsi-nfv-ns {
must ". = deref(../../pnfd-profile-id)/../pnfd-id" {
}
type leafref {
path "/nfv/pnfds/id";
path "../../../../../pnfd/id";
}
}
leaf pnf-cpd-id {
type leafref {
path "deref(../pnfd-id)/../nfv:ext-cpd/nfv:id";
path "deref(../pnfd-id)/../ext-cpd/id";
}
}
}
......@@ -502,12 +502,12 @@ submodule etsi-nfv-ns {
}
type leafref {
path "/nfv/nsds/id";
path "../../../../../nsd/id";
}
}
leaf sap-cpd-id {
type leafref {
path "deref(../nsd-id)/../nfv:sapd/nfv:id";
path "deref(../nsd-id)/../sapd/id";
}
}
}
......@@ -721,7 +721,7 @@ submodule etsi-nfv-ns {
leaf vnfd-id {
mandatory true;
type leafref {
path "/nfv/vnfds/id";
path "../../../../vnfd/id";
}
description
"References a VNFD.";
......@@ -845,7 +845,7 @@ submodule etsi-nfv-ns {
leaf constituent-cpd-id {
type leafref {
path "deref(../../../vnfd-id)/../nfv:ext-cpd/nfv:id";
path "deref(../../../vnfd-id)/../ext-cpd/id";
}
description
"A reference to the descriptor of a connection point
......@@ -879,7 +879,7 @@ submodule etsi-nfv-ns {
leaf pnfd-id {
type leafref {
path "/nfv/pnfds/id";
path "../../../../pnfd/id";
}
description
"References a PNFD.";
......@@ -935,7 +935,7 @@ submodule etsi-nfv-ns {
leaf constituent-cpd-id {
type leafref {
path "deref(../../../pnfd-id)/../nfv:ext-cpd/nfv:id";
path "deref(../../../pnfd-id)/../ext-cpd/id";
}
description
"A reference to the descriptor of a connection point
......@@ -1314,7 +1314,7 @@ submodule etsi-nfv-ns {
leaf nsd-id {
mandatory true;
type leafref {
path "/nfv/nsds/id";
path "../../../../nsd/id";
}
description
"Identifies the NSD applicable to NS instantiated
......@@ -1432,7 +1432,7 @@ submodule etsi-nfv-ns {
leaf constituent-cpd-id {
type leafref {
path "deref(../../../nsd-id)/../nfv:sapd/nfv:id";
path "deref(../../../nsd-id)/../sapd/id";
}
description
"A reference to the descriptor of a connection point
......@@ -1506,7 +1506,7 @@ submodule etsi-nfv-ns {
container vnf-indicator-info {
leaf vnfd-id {
type leafref {
path "/nfv/vnfds/id";
path "../../../../../vnfd/id";
}
description
"Identifies a VNFD.";
......
module etsi-nfv-nsd {
yang-version 1.1;
namespace "urn:etsi:nfv:yang:etsi-nfv-nsd";
prefix nsd;
import etsi-nfv-descriptors {
prefix vnf;
}
organization
"European Telecommunications Standards Institute (ETSI)";
description
"Network Services Descriptors";
revision 2019-04-25 {
description
"Initial revision.
NSD according to ETSI GS NFV-IFA 014 Ed261v252.";
}
container nsd {
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 vnf:vnfd;
}
list nsd {
key "id";
max-elements 1;
uses vnf:nsd;
}
list pnfd {
key "id";
description
"The Pnfd information element is a deployment template
enabling on-boarding PNFs and referencing them from an
NSD. It focuses on connectivity aspects only.";
reference
"GS NFV-IFA014: Section 6.6.2, Pnfd information element.";
uses vnf:pnfd;
}
}
}
......@@ -12,7 +12,7 @@ submodule etsi-nfv-pnf {
description
"Models for PNFD according to GS NFV-IFA 014.";
revision 2019-03-18 {
revision 2019-04-25 {
description
"Initial revision.
......
module etsi-nfv-pnfd {
yang-version 1.1;
namespace "urn:etsi:nfv:yang:etsi-nfv-pnfd";
prefix pnfd;
import etsi-nfv-descriptors {
prefix vnf;
}
organization
"European Telecommunications Standards Institute (ETSI)";
description
"Physcial Network Function Descriptor.";
revision 2019-04-25 {
description
"Initial revision.
NSD according to ETSI GS NFV-IFA 014 Ed261v252.";
}
container pnfd {
presence "PNFD container.";
uses vnf:pnfd;
}
}
module etsi-nfv-vnfd {
yang-version 1.1;
namespace "urn:etsi:nfv:yang:etsi-nfv-vnfd";
prefix pkg;
prefix vnfd;
import etsi-nfv-descriptors {
prefix vnf;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment