From 29b957e32654c7f3461f07b72749cf936e8b2c9f Mon Sep 17 00:00:00 2001 From: Mahesh Jethanandani Date: Wed, 20 Feb 2019 04:49:48 +0800 Subject: [PATCH] Fix default values --- example-data/nfv.xml | 40 +++++++++++++++++++++++++++++++---- src/yang/etsi-nfv-common.yang | 24 +++++++++++++-------- src/yang/etsi-nfv-ns.yang | 21 +++++++++--------- src/yang/etsi-nfv-pnf.yang | 6 +++--- src/yang/etsi-nfv-vnf.yang | 4 +++- src/yang/etsi-nfv.yang | 6 +++--- 6 files changed, 71 insertions(+), 30 deletions(-) diff --git a/example-data/nfv.xml b/example-data/nfv.xml index ddf7807..7eb8ac8 100644 --- a/example-data/nfv.xml +++ b/example-data/nfv.xml @@ -48,14 +48,26 @@ inside + + firewall + inside + Ethernet management + + firewall + management + Ethernet outside + + firewall + outside + Ethernet @@ -131,14 +143,26 @@ left + + router + left + Ethernet management + + router + management + Ethernet right + + router + right + Ethernet @@ -218,7 +242,9 @@ fw2dpi - Ethernet + + Ethernet + normal @@ -231,7 +257,9 @@ mgmt - IPv4 + + IPv4 + normal @@ -244,7 +272,9 @@ r2fw - Ethernet + + Ethernet + normal @@ -467,7 +497,9 @@ r2fw - IPv4 + + Ethernet + r2fw diff --git a/src/yang/etsi-nfv-common.yang b/src/yang/etsi-nfv-common.yang index 09ff7ee..b823788 100644 --- a/src/yang/etsi-nfv-common.yang +++ b/src/yang/etsi-nfv-common.yang @@ -6,13 +6,13 @@ submodule etsi-nfv-common { description "Common data types for ETSI data models."; - revision 2018-06-19 { + revision 2019-03-18 { description "Initial revision Common data structures to support VNFD and NSD according to: - ETSI GS NFV-IFA 014 Ed251v244 - ETSI GS NFV-IFA 011 Ed251v243"; + ETSI GS NFV-IFA 014 Ed261v252 + ETSI GS NFV-IFA 011 Ed261v254"; } /* @@ -253,14 +253,20 @@ submodule etsi-nfv-common { grouping connectivity-type { container connectivity-type { - leaf layer-protocol { - mandatory true; - type identityref { - base layer-protocol; - } + list layer-protocol { + key "protocol"; + + leaf protocol { + type identityref { + base layer-protocol; + } + } description "Identifies the protocol this VL gives access to (Ethernet, - MPLS, ODU2, IPV4, IPV6, Pseudo-Wire)."; + 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."; reference "GS NFV IFA011: Section 7.1.7.3, ConnectivityType information element."; diff --git a/src/yang/etsi-nfv-ns.yang b/src/yang/etsi-nfv-ns.yang index dc80416..6b92820 100644 --- a/src/yang/etsi-nfv-ns.yang +++ b/src/yang/etsi-nfv-ns.yang @@ -11,14 +11,14 @@ submodule etsi-nfv-ns { description "Models for NS according to ETSI GS NFV-IFA 014."; - revision 2017-01-20 { + revision 2019-03-18 { description "Initial revision Common data structure to support NSD according to: - ETSI GS NFV-IFA 011 Ed251v243"; + ETSI GS NFV-IFA 011 Ed261v252"; reference - "ETSI GS NFV-IFA 011 Ed251v243"; + "ETSI GS NFV-IFA 011 Ed261v252"; } grouping resource-handle { @@ -493,7 +493,8 @@ submodule etsi-nfv-ns { } container ns { leaf nsd-id { - must ". = deref(../../ns-profile-id)/../nsd-id" { + must ". = deref(../../nested-ns-profile-id)/" + + "../nsd-id" { } type leafref { @@ -753,7 +754,7 @@ submodule etsi-nfv-ns { } leaf min-number-of-instances { - mandatory true; + default 1; type uint16; description "Minimum number of instances of the VNF based on this @@ -764,7 +765,7 @@ submodule etsi-nfv-ns { } leaf max-number-of-instances { - mandatory true; + default 1; type uint16; description "Maximum number of instances of the VNF based on this @@ -1177,7 +1178,7 @@ submodule etsi-nfv-ns { } leaf number-of-instances { - mandatory true; + default 1; type uint32; description "Specifies the number of VNF instances required for @@ -1237,7 +1238,7 @@ submodule etsi-nfv-ns { } leaf number-of-instances { - mandatory true; + default 1; type uint32; description "Specifies the number of nested NS instances required @@ -1343,7 +1344,7 @@ submodule etsi-nfv-ns { } leaf min-number-of-instances { type uint16; - mandatory true; + default 1; description "Minimum number of nested NS instances based on the referenced NSD that is permitted to exist for this @@ -1354,7 +1355,7 @@ submodule etsi-nfv-ns { } leaf max-number-of-instances { type uint16; - mandatory true; + default 1; description "Maximum number of nested NS instances based on the referenced NSD that is permitted to exist for this diff --git a/src/yang/etsi-nfv-pnf.yang b/src/yang/etsi-nfv-pnf.yang index 69450ee..ae7ef81 100644 --- a/src/yang/etsi-nfv-pnf.yang +++ b/src/yang/etsi-nfv-pnf.yang @@ -12,15 +12,15 @@ submodule etsi-nfv-pnf { description "Models for PNFD according to GS NFV-IFA 014."; - revision 2018-06-25 { + revision 2019-03-18 { description "Initial revision. Common data structure to support VNFD according to: - ETSI GS NFV-IFA 014 Ed251v244"; + ETSI GS NFV-IFA 014 Ed261v252"; reference - "ETSI GS NFV-IFA 014 Ed251v244"; + "ETSI GS NFV-IFA 014 Ed261v252"; } grouping pnfd { diff --git a/src/yang/etsi-nfv-vnf.yang b/src/yang/etsi-nfv-vnf.yang index 3bf8d4b..05f5c1e 100755 --- a/src/yang/etsi-nfv-vnf.yang +++ b/src/yang/etsi-nfv-vnf.yang @@ -1149,7 +1149,9 @@ submodule etsi-nfv-vnf { } } leaf cpd { - path "deref(../vdu-id)/../int-cpd/id"; + type leafref { + path "deref(../vdu-id)/../int-cpd/id"; + } } } } diff --git a/src/yang/etsi-nfv.yang b/src/yang/etsi-nfv.yang index a209fc3..96d0db1 100644 --- a/src/yang/etsi-nfv.yang +++ b/src/yang/etsi-nfv.yang @@ -14,11 +14,11 @@ module etsi-nfv { description "Network Function Virtualization Descriptors"; - revision 2018-06-13 { + revision 2019-03-18 { description "Initial revision. - NSD and PNFD according to ETSI GS NFV-IFA 014 Ed251v244 - VNFD according to ETSI GS NFV-IFA 011 Ed251v243"; + NSD and PNFD according to ETSI GS NFV-IFA 014 Ed261v252 + VNFD according to ETSI GS NFV-IFA 011 Ed261v254"; } container nfv { -- GitLab