From c2aebb5149abfbcd47cee5c5d1bc35458a390f27 Mon Sep 17 00:00:00 2001 From: Mahesh Jethanandani Date: Fri, 4 Jan 2019 15:29:12 -0800 Subject: [PATCH 1/5] Fix for bug#89 --- src/yang/etsi-nfv-ns.yang | 1 + src/yang/etsi-nfv-vnf.yang | 1 + 2 files changed, 2 insertions(+) diff --git a/src/yang/etsi-nfv-ns.yang b/src/yang/etsi-nfv-ns.yang index 2795b7f..10c674a 100644 --- a/src/yang/etsi-nfv-ns.yang +++ b/src/yang/etsi-nfv-ns.yang @@ -253,6 +253,7 @@ submodule etsi-nfv-ns { } container qos { + presence "VL QoS parameters"; description "The QoS information element specifies quality of service parameters applicable to a VL."; diff --git a/src/yang/etsi-nfv-vnf.yang b/src/yang/etsi-nfv-vnf.yang index 1982789..3bf8d4b 100755 --- a/src/yang/etsi-nfv-vnf.yang +++ b/src/yang/etsi-nfv-vnf.yang @@ -1041,6 +1041,7 @@ submodule etsi-nfv-vnf { information element."; } container qos { + presence "VL QoS parameters"; description "QoS of the VL."; reference -- GitLab From 45a6233df997db764ce8b59bacb690893da0f0e3 Mon Sep 17 00:00:00 2001 From: Mahesh Jethanandani Date: Wed, 20 Feb 2019 04:07:02 +0800 Subject: [PATCH 2/5] Addressing issue with merge request --- example-data/nfv.xml | 6 ------ src/yang/etsi-nfv-ns.yang | 23 ++++++++++------------- 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/example-data/nfv.xml b/example-data/nfv.xml index 92db22d..ddf7807 100644 --- a/example-data/nfv.xml +++ b/example-data/nfv.xml @@ -11,17 +11,14 @@ Firewall VDU inside - inside Ethernet management - management Ethernet outside - outside Ethernet asa-vcd @@ -97,17 +94,14 @@ Router VDU left - left Ethernet management - management Ethernet right - right Ethernet csr-vcd diff --git a/src/yang/etsi-nfv-ns.yang b/src/yang/etsi-nfv-ns.yang index 10c674a..dc80416 100644 --- a/src/yang/etsi-nfv-ns.yang +++ b/src/yang/etsi-nfv-ns.yang @@ -4,10 +4,7 @@ submodule etsi-nfv-ns { prefix nfv; } - import etsi-nfv-common { - prefix common; - } - + include etsi-nfv-common; include etsi-nfv-vnf; include etsi-nfv-pnf; @@ -346,7 +343,7 @@ submodule etsi-nfv-ns { "GS NFV IFA014: Section 6.5.2.2 NsVirtualLinkDesc information element"; } - uses common:security-parameters; + uses security-parameters; } list vnffgd { @@ -777,7 +774,7 @@ submodule etsi-nfv-ns { element"; } - uses common:local-affinity-or-anti-affinity-rule; + uses local-affinity-or-anti-affinity-rule; list affinity-or-anti-affinity-group { key "id"; @@ -989,7 +986,7 @@ submodule etsi-nfv-ns { information element"; } - uses common:local-affinity-or-anti-affinity-rule; + uses local-affinity-or-anti-affinity-rule; list affinity-or-anti-affinity-group { key "id"; @@ -1016,7 +1013,7 @@ submodule etsi-nfv-ns { reference "GS NFV IFA014: Section 6.3.4.2 VirtualLinkProfile information element"; - uses common:link-bitrate-requirements; + uses link-bitrate-requirements; } container min-bitrate-requirements { description @@ -1025,7 +1022,7 @@ submodule etsi-nfv-ns { reference "GS NFV IFA014: Section 6.3.4.2 VirtualLinkProfile information element"; - uses common:link-bitrate-requirements; + uses link-bitrate-requirements; } } @@ -1105,7 +1102,7 @@ submodule etsi-nfv-ns { leaf affinity-type { mandatory true; - type common:affinity-type; + type affinity-type; description "Specifies the type of relationship that the members of the group have: 'affinity' or 'anti-affinity.'"; @@ -1116,7 +1113,7 @@ submodule etsi-nfv-ns { leaf affinity-scope { mandatory true; - type common:affinity-scope; + type affinity-scope; description "Specifies the scope of the affinity or anti-affinity relationship e.g. a NFVI node, an NFVI PoP, etc."; @@ -1213,7 +1210,7 @@ submodule etsi-nfv-ns { VirtualLinkToLevelMapping information element"; } - uses common:link-bitrate-requirements; + uses link-bitrate-requirements; } list ns-to-level-mapping { @@ -1568,7 +1565,7 @@ submodule etsi-nfv-ns { } } } - uses common:security-parameters; + uses security-parameters; } } } -- GitLab From 29b957e32654c7f3461f07b72749cf936e8b2c9f Mon Sep 17 00:00:00 2001 From: Mahesh Jethanandani Date: Wed, 20 Feb 2019 04:49:48 +0800 Subject: [PATCH 3/5] 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 From d1fb2181ee9572dbaa7c58def1b8312ba7a5cbd2 Mon Sep 17 00:00:00 2001 From: Mahesh Jethanandani Date: Thu, 11 Apr 2019 12:42:04 -0700 Subject: [PATCH 4/5] Address comments received in SOL#96 --- example-data/nfv.xml | 24 ++++++++++++++++++++++++ src/yang/etsi-nfv-common.yang | 6 +++--- src/yang/etsi-nfv-ns.yang | 13 +++++++------ src/yang/etsi-nfv-vnf.yang | 14 +++++++------- 4 files changed, 41 insertions(+), 16 deletions(-) diff --git a/example-data/nfv.xml b/example-data/nfv.xml index 7eb8ac8..3368af1 100644 --- a/example-data/nfv.xml +++ b/example-data/nfv.xml @@ -43,6 +43,7 @@ asa-image bare qcow2 + 1 2.0 http://www.cisco.com/asa.qcow2 @@ -92,6 +93,17 @@ single + + + true + + + 1 + + + 1 + + @@ -138,6 +150,7 @@ csr-image bare qcow2 + 1 2.0 http://www.cisco.com/csr.qcow2 @@ -187,6 +200,17 @@ single + + + true + + + 1 + + + 1 + + diff --git a/src/yang/etsi-nfv-common.yang b/src/yang/etsi-nfv-common.yang index b823788..8dabf7b 100644 --- a/src/yang/etsi-nfv-common.yang +++ b/src/yang/etsi-nfv-common.yang @@ -469,7 +469,7 @@ submodule etsi-nfv-common { when "../type='mac-address'"; leaf mac-address-assignment { type boolean; - default true; + mandatory true; description "Specify if the MAC address assignment is the responsibility of management and orchestration function @@ -495,7 +495,7 @@ submodule etsi-nfv-common { when "../type='ip-address'"; leaf ip-address-assignment { type boolean; - default "true"; + mandatory true; description "Specify if the address assignment is the responsibility of management and orchestration function or not. If it @@ -508,7 +508,7 @@ submodule etsi-nfv-common { leaf floating-ip-activated { type boolean; - default "true"; + mandatory true; description "Specify if the floating IP scheme is activated on the CP or not."; diff --git a/src/yang/etsi-nfv-ns.yang b/src/yang/etsi-nfv-ns.yang index 6b92820..de25c38 100644 --- a/src/yang/etsi-nfv-ns.yang +++ b/src/yang/etsi-nfv-ns.yang @@ -754,7 +754,7 @@ submodule etsi-nfv-ns { } leaf min-number-of-instances { - default 1; + mandatory true; type uint16; description "Minimum number of instances of the VNF based on this @@ -765,7 +765,7 @@ submodule etsi-nfv-ns { } leaf max-number-of-instances { - default 1; + mandatory true; type uint16; description "Maximum number of instances of the VNF based on this @@ -1178,7 +1178,7 @@ submodule etsi-nfv-ns { } leaf number-of-instances { - default 1; + mandatory true; type uint32; description "Specifies the number of VNF instances required for @@ -1238,7 +1238,7 @@ submodule etsi-nfv-ns { } leaf number-of-instances { - default 1; + mandatory true; type uint32; description "Specifies the number of nested NS instances required @@ -1342,9 +1342,10 @@ submodule etsi-nfv-ns { "GS NFV IFA014: Section 6.3.11.2 NsProfile information element"; } + leaf min-number-of-instances { type uint16; - default 1; + mandatory true; description "Minimum number of nested NS instances based on the referenced NSD that is permitted to exist for this @@ -1355,7 +1356,7 @@ submodule etsi-nfv-ns { } leaf max-number-of-instances { type uint16; - default 1; + mandatory true; 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-vnf.yang b/src/yang/etsi-nfv-vnf.yang index 05f5c1e..7f653da 100755 --- a/src/yang/etsi-nfv-vnf.yang +++ b/src/yang/etsi-nfv-vnf.yang @@ -551,7 +551,7 @@ submodule etsi-nfv-vnf { range "0..max"; } units "GB"; - default 1; + mandatory true; description "Amount of virtual memory in GB."; reference @@ -749,7 +749,7 @@ submodule etsi-nfv-vnf { leaf size-of-storage { type uint64; units "GB"; - default 0; + mandatory true; description "Size of virtualised storage resource (e.g. size of volume, in GB)"; @@ -936,7 +936,7 @@ submodule etsi-nfv-vnf { leaf min-disk { type uint64; units "GB"; - default 0; + mandatory true; description "The minimal disk size requirement for this software image. The value of the 'size of storage' attribute @@ -1466,7 +1466,7 @@ submodule etsi-nfv-vnf { enum ipv4; enum ipv6; } - default "ipv4"; + mandatory true; description "Specifies IP version of this L3 protocol. Value: @@ -1783,7 +1783,7 @@ submodule etsi-nfv-vnf { leaf arbitrary-target-levels-supported { type boolean; - default "false"; + mandatory true; description "Signals whether scaling according to the parameter 'scaleInfo' is supported by this VNF."; @@ -1837,7 +1837,7 @@ submodule etsi-nfv-vnf { leaf min-graceful-termination { type yang:timeticks; - default "1"; + mandatory true; description "Minimum timeout value for graceful termination of a VNF instance."; @@ -1889,7 +1889,7 @@ submodule etsi-nfv-vnf { leaf min-graceful-stop-timeout { type yang:timeticks; - default "1"; + mandatory true; description "Minimum timeout value for graceful stop of a VNF instance."; -- GitLab From 88e84f6f631e9ff0232a63a37e5c106d34f9614e Mon Sep 17 00:00:00 2001 From: Mahesh Jethanandani Date: Thu, 18 Apr 2019 16:44:31 -0700 Subject: [PATCH 5/5] Fix complex example --- example-data/complex-vnfd.xml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/example-data/complex-vnfd.xml b/example-data/complex-vnfd.xml index 53a50d0..b10ec9f 100644 --- a/example-data/complex-vnfd.xml +++ b/example-data/complex-vnfd.xml @@ -93,6 +93,7 @@ bare qcow2 + 1 2.0 1 http://mycompany.images.com/control-plane.qcow2 @@ -107,6 +108,7 @@ bare qcow2 + 1 2.0 1 http://mycompany.images.com/data-plane.qcow2 @@ -202,6 +204,17 @@ il-1 + + + true + + + 1 + + + 1 + + control-plane anti-affinity @@ -262,6 +275,17 @@ il-1 + + + true + + + 1 + + + 1 + + control-plane anti-affinity -- GitLab