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"> <nfv xmlns="urn:etsi:nfv:yang:etsi-nfv-descriptors">
<vnfds> <vnfd>
<id>ASA</id> <id>ASA</id>
<provider>My Company</provider> <provider>My Company</provider>
<product-name>My Company ASAv</product-name> <product-name>My Company ASAv</product-name>
...@@ -100,8 +100,8 @@ ...@@ -100,8 +100,8 @@
</instantiation-level> </instantiation-level>
<default-instantiation-level>single</default-instantiation-level> <default-instantiation-level>single</default-instantiation-level>
</df> </df>
</vnfds> </vnfd>
<vnfds> <vnfd>
<id>CSR</id> <id>CSR</id>
<provider>My Company</provider> <provider>My Company</provider>
<product-name>My Company CSR 1000v</product-name> <product-name>My Company CSR 1000v</product-name>
...@@ -202,8 +202,8 @@ ...@@ -202,8 +202,8 @@
</instantiation-level> </instantiation-level>
<default-instantiation-level>single</default-instantiation-level> <default-instantiation-level>single</default-instantiation-level>
</df> </df>
</vnfds> </vnfd>
<nsds> <nsd>
<id>firewall-nsd</id> <id>firewall-nsd</id>
<vnfd-id>ASA</vnfd-id> <vnfd-id>ASA</vnfd-id>
<sapd> <sapd>
...@@ -233,8 +233,8 @@ ...@@ -233,8 +233,8 @@
</vnf-to-level-mapping> </vnf-to-level-mapping>
</ns-instantiation-level> </ns-instantiation-level>
</df> </df>
</nsds> </nsd>
<nsds> <nsd>
<id>service-chain-1</id> <id>service-chain-1</id>
<vnfd-id>ASA</vnfd-id> <vnfd-id>ASA</vnfd-id>
<vnfd-id>CSR</vnfd-id> <vnfd-id>CSR</vnfd-id>
...@@ -483,8 +483,8 @@ ...@@ -483,8 +483,8 @@
</vnf-to-level-mapping> </vnf-to-level-mapping>
</ns-instantiation-level> </ns-instantiation-level>
</df> </df>
</nsds> </nsd>
<nsds> <nsd>
<id>service-chain-2</id> <id>service-chain-2</id>
<nested-nsd-id>firewall-nsd</nested-nsd-id> <nested-nsd-id>firewall-nsd</nested-nsd-id>
<vnfd-id>CSR</vnfd-id> <vnfd-id>CSR</vnfd-id>
...@@ -570,13 +570,13 @@ ...@@ -570,13 +570,13 @@
</virtual-link-connectivity> </virtual-link-connectivity>
</ns-profile> </ns-profile>
</df> </df>
</nsds> </nsd>
<pnfds> <pnfd>
<id>physical-dpi</id> <id>physical-dpi</id>
<version>1.0</version> <version>1.0</version>
<ext-cpd> <ext-cpd>
<id>outside</id> <id>outside</id>
<layer-protocol>ethernet</layer-protocol> <layer-protocol>ethernet</layer-protocol>
</ext-cpd> </ext-cpd>
</pnfds> </pnfd>
</nfv> </nfv>
...@@ -10,17 +10,27 @@ cd src ...@@ -10,17 +10,27 @@ cd src
CONFD_OPTS="--fail-on-warnings" CONFD_OPTS="--fail-on-warnings"
CONFD_OPTS="" 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 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." echo "Testing compilations of descriptors."
confdc -c $CONFD_OPTS -o /opt/confd/etc/confd/etsi-nfv-descriptors.fxs etsi-nfv-descriptors.yang confdc -c $CONFD_OPTS -o /opt/confd/etc/confd/etsi-nfv-descriptors.fxs etsi-nfv-descriptors.yang
echo "Starting ConfD" echo "Starting ConfD"
confd confd
echo "Loading Data for pkg" echo "Loading Data for VNFD"
confd_load -l -m nfv-vnfd.xml 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" echo "Loading Data for descriptors"
confd_load -l -m nfv.xml confd_load -l -m nfv.xml
......
...@@ -9,7 +9,7 @@ submodule etsi-nfv-common { ...@@ -9,7 +9,7 @@ submodule etsi-nfv-common {
description description
"Common data types for ETSI data models."; "Common data types for ETSI data models.";
revision 2019-03-18 { revision 2019-04-25 {
description description
"Initial revision "Initial revision
......
...@@ -14,7 +14,7 @@ module etsi-nfv-descriptors { ...@@ -14,7 +14,7 @@ module etsi-nfv-descriptors {
description description
"Network Function Virtualization Descriptors"; "Network Function Virtualization Descriptors";
revision 2019-03-18 { revision 2019-04-25 {
description description
"Initial revision. "Initial revision.
NSD and PNFD according to ETSI GS NFV-IFA 014 Ed261v252 NSD and PNFD according to ETSI GS NFV-IFA 014 Ed261v252
...@@ -22,7 +22,7 @@ module etsi-nfv-descriptors { ...@@ -22,7 +22,7 @@ module etsi-nfv-descriptors {
} }
container nfv { container nfv {
list vnfds { list vnfd {
key "id"; key "id";
description description
"A VNF Descriptor (VNFD) is a deployment template which "A VNF Descriptor (VNFD) is a deployment template which
...@@ -35,7 +35,7 @@ module etsi-nfv-descriptors { ...@@ -35,7 +35,7 @@ module etsi-nfv-descriptors {
uses vnfd; uses vnfd;
} }
list nsds { list nsd {
key "id"; key "id";
description description
...@@ -49,7 +49,7 @@ module etsi-nfv-descriptors { ...@@ -49,7 +49,7 @@ module etsi-nfv-descriptors {
uses nsd; uses nsd;
} }
list pnfds { list pnfd {
key "id"; key "id";
description description
......
...@@ -11,7 +11,7 @@ submodule etsi-nfv-ns { ...@@ -11,7 +11,7 @@ submodule etsi-nfv-ns {
description description
"Models for NS according to ETSI GS NFV-IFA 014."; "Models for NS according to ETSI GS NFV-IFA 014.";
revision 2019-03-18 { revision 2019-04-25 {
description description
"Initial revision "Initial revision
Common data structure to support NSD according to: Common data structure to support NSD according to:
...@@ -86,7 +86,7 @@ submodule etsi-nfv-ns { ...@@ -86,7 +86,7 @@ submodule etsi-nfv-ns {
leaf-list nested-nsd-id { leaf-list nested-nsd-id {
must ". != ../id"; must ". != ../id";
type leafref { type leafref {
path "../../nsds/id"; path "../../nsd/id";
} }
description description
"References the NSD of a constituent nested NS."; "References the NSD of a constituent nested NS.";
...@@ -97,7 +97,7 @@ submodule etsi-nfv-ns { ...@@ -97,7 +97,7 @@ submodule etsi-nfv-ns {
leaf-list vnfd-id { leaf-list vnfd-id {
type leafref { type leafref {
path "../../vnfds/id"; path "../../vnfd/id";
} }
description description
"References the VNFD of a constituent VNF."; "References the VNFD of a constituent VNF.";
...@@ -108,7 +108,7 @@ submodule etsi-nfv-ns { ...@@ -108,7 +108,7 @@ submodule etsi-nfv-ns {
leaf-list pnfd-id { leaf-list pnfd-id {
type leafref { type leafref {
path "../../pnfds/id"; path "../../pnfd/id";
} }
description description
"References the PNFD of a constituent PNF."; "References the PNFD of a constituent PNF.";
...@@ -164,7 +164,7 @@ submodule etsi-nfv-ns { ...@@ -164,7 +164,7 @@ submodule etsi-nfv-ns {
leaf vnfd-id { leaf vnfd-id {
mandatory true; mandatory true;
type leafref { type leafref {
path "../../../../nfv:vnfds/nfv:id"; path "../../../../vnfd/id";
} }
must "boolean(../../../vnfd-id[.=current()])"; must "boolean(../../../vnfd-id[.=current()])";
} }
...@@ -172,7 +172,7 @@ submodule etsi-nfv-ns { ...@@ -172,7 +172,7 @@ submodule etsi-nfv-ns {
leaf ext-cpd-id { leaf ext-cpd-id {
mandatory true; mandatory true;
type leafref { 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 { ...@@ -181,7 +181,7 @@ submodule etsi-nfv-ns {
leaf pnfd-id { leaf pnfd-id {
mandatory true; mandatory true;
type leafref { type leafref {
path "../../../../nfv:pnfds/nfv:id"; path "../../../../pnfd/id";
} }
must "boolean(../pnfd-id[.=current()])"; must "boolean(../pnfd-id[.=current()])";
} }
...@@ -189,7 +189,7 @@ submodule etsi-nfv-ns { ...@@ -189,7 +189,7 @@ submodule etsi-nfv-ns {
leaf ext-cpd-id { leaf ext-cpd-id {
mandatory true; mandatory true;
type leafref { 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 { ...@@ -197,7 +197,7 @@ submodule etsi-nfv-ns {
leaf nsd-id { leaf nsd-id {
mandatory true; mandatory true;
type leafref { type leafref {
path "../../../../nfv:nsds/nfv:id"; path "../../../../nsd/id";
} }
must "boolean(../nsd-id[.=current()])"; must "boolean(../nsd-id[.=current()])";
} }
...@@ -205,7 +205,7 @@ submodule etsi-nfv-ns { ...@@ -205,7 +205,7 @@ submodule etsi-nfv-ns {
leaf ext-cpd-id { leaf ext-cpd-id {
mandatory true; mandatory true;
type leafref { type leafref {
path "deref(../nsd-id)/../nfv:sapd/nfv:id"; path "deref(../nsd-id)/../sapd/id";
} }
} }
} }
...@@ -437,7 +437,7 @@ submodule etsi-nfv-ns { ...@@ -437,7 +437,7 @@ submodule etsi-nfv-ns {
must ". = deref(../../vnfd-profile-id)" { must ". = deref(../../vnfd-profile-id)" {
} }
type leafref { type leafref {
path "/nfv/nsds/df/vnf-profile/id"; path "../../../../../nsd/df/vnf-profile/id";
} }
} }
} }
...@@ -446,7 +446,7 @@ submodule etsi-nfv-ns { ...@@ -446,7 +446,7 @@ submodule etsi-nfv-ns {
must ". = deref(../../pnfd-profile-id)" { must ". = deref(../../pnfd-profile-id)" {
} }
type leafref { type leafref {
path "/nfv/nsds/df/pnf-profile/id"; path "../../../../../nsd/df/pnf-profile/id";
} }
} }
} }
...@@ -455,7 +455,7 @@ submodule etsi-nfv-ns { ...@@ -455,7 +455,7 @@ submodule etsi-nfv-ns {
must ". = deref(../../ns-profile-id)" { must ". = deref(../../ns-profile-id)" {
} }
type leafref { type leafref {
path "/nfv/nsds/df/ns-profile/id"; path "../../../../../nsd/df/ns-profile/id";
} }
} }
} }
...@@ -472,12 +472,12 @@ submodule etsi-nfv-ns { ...@@ -472,12 +472,12 @@ submodule etsi-nfv-ns {
must ". = deref(../../vnfd-profile-id)/../vnfd-id" { must ". = deref(../../vnfd-profile-id)/../vnfd-id" {
} }
type leafref { type leafref {
path "/nfv/vnfds/id"; path "../../../../../vnfd/id";
} }
} }
leaf cpd-id { leaf cpd-id {
type leafref { 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 { ...@@ -486,12 +486,12 @@ submodule etsi-nfv-ns {
must ". = deref(../../pnfd-profile-id)/../pnfd-id" { must ". = deref(../../pnfd-profile-id)/../pnfd-id" {
} }
type leafref { type leafref {
path "/nfv/pnfds/id"; path "../../../../../pnfd/id";
} }
} }
leaf pnf-cpd-id { leaf pnf-cpd-id {
type leafref { 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 { ...@@ -502,12 +502,12 @@ submodule etsi-nfv-ns {
} }
type leafref { type leafref {
path "/nfv/nsds/id"; path "../../../../../nsd/id";
} }
} }
leaf sap-cpd-id { leaf sap-cpd-id {
type leafref { type leafref {
path "deref(../nsd-id)/../nfv:sapd/nfv:id"; path "deref(../nsd-id)/../sapd/id";
} }
} }
} }
...@@ -721,7 +721,7 @@ submodule etsi-nfv-ns { ...@@ -721,7 +721,7 @@ submodule etsi-nfv-ns {
leaf vnfd-id { leaf vnfd-id {
mandatory true; mandatory true;
type leafref { type leafref {
path "/nfv/vnfds/id"; path "../../../../vnfd/id";
} }
description description
"References a VNFD."; "References a VNFD.";
...@@ -845,7 +845,7 @@ submodule etsi-nfv-ns { ...@@ -845,7 +845,7 @@ submodule etsi-nfv-ns {
leaf constituent-cpd-id { leaf constituent-cpd-id {
type leafref { type leafref {
path "deref(../../../vnfd-id)/../nfv:ext-cpd/nfv:id"; path "deref(../../../vnfd-id)/../ext-cpd/id";
} }
description description
"A reference to the descriptor of a connection point "A reference to the descriptor of a connection point
...@@ -879,7 +879,7 @@ submodule etsi-nfv-ns { ...@@ -879,7 +879,7 @@ submodule etsi-nfv-ns {
leaf pnfd-id { leaf pnfd-id {
type leafref { type leafref {
path "/nfv/pnfds/id"; path "../../../../pnfd/id";
} }
description description
"References a PNFD."; "References a PNFD.";
...@@ -935,7 +935,7 @@ submodule etsi-nfv-ns { ...@@ -935,7 +935,7 @@ submodule etsi-nfv-ns {
leaf constituent-cpd-id { leaf constituent-cpd-id {
type leafref { type leafref {
path "deref(../../../pnfd-id)/../nfv:ext-cpd/nfv:id"; path "deref(../../../pnfd-id)/../ext-cpd/id";
} }
description description
"A reference to the descriptor of a connection point "A reference to the descriptor of a connection point
...@@ -1314,7 +1314,7 @@ submodule etsi-nfv-ns { ...@@ -1314,7 +1314,7 @@ submodule etsi-nfv-ns {
leaf nsd-id { leaf nsd-id {
mandatory true; mandatory true;
type leafref { type leafref {
path "/nfv/nsds/id"; path "../../../../nsd/id";
} }
description description
"Identifies the NSD applicable to NS instantiated "Identifies the NSD applicable to NS instantiated
...@@ -1432,7 +1432,7 @@ submodule etsi-nfv-ns { ...@@ -1432,7 +1432,7 @@ submodule etsi-nfv-ns {
leaf constituent-cpd-id { leaf constituent-cpd-id {
type leafref { type leafref {
path "deref(../../../nsd-id)/../nfv:sapd/nfv:id"; path "deref(../../../nsd-id)/../sapd/id";
} }
description description
"A reference to the descriptor of a connection point "A reference to the descriptor of a connection point
...@@ -1506,7 +1506,7 @@ submodule etsi-nfv-ns { ...@@ -1506,7 +1506,7 @@ submodule etsi-nfv-ns {
container vnf-indicator-info { container vnf-indicator-info {
leaf vnfd-id { leaf vnfd-id {
type leafref { type leafref {
path "/nfv/vnfds/id"; path "../../../../../vnfd/id";
} }
description description
"Identifies a VNFD."; "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 { ...@@ -12,7 +12,7 @@ submodule etsi-nfv-pnf {
description description
"Models for PNFD according to GS NFV-IFA 014."; "Models for PNFD according to GS NFV-IFA 014.";
revision 2019-03-18 { revision 2019-04-25 {
description description
"Initial revision. "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 { module etsi-nfv-vnfd {
yang-version 1.1; yang-version 1.1;
namespace "urn:etsi:nfv:yang:etsi-nfv-vnfd"; namespace "urn:etsi:nfv:yang:etsi-nfv-vnfd";
prefix pkg; prefix vnfd;
import etsi-nfv-descriptors { import etsi-nfv-descriptors {
prefix vnf; 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