From 4aae900bf8497d7896e74f4ca7889346878b4aee Mon Sep 17 00:00:00 2001 From: Mahesh Jethanandani Date: Wed, 20 Feb 2019 15:19:16 +0800 Subject: [PATCH 1/2] Fixed build issues. --- example-data/nfv.xml | 22 ++++++++------ src/yang/etsi-nfv-common.yang | 24 +++++++++------ src/yang/etsi-nfv-ns.yang | 57 +++++++++++++++++------------------ src/yang/etsi-nfv-pnf.yang | 6 ++-- src/yang/etsi-nfv-vnf.yang | 24 +++++++++------ 5 files changed, 72 insertions(+), 61 deletions(-) diff --git a/example-data/nfv.xml b/example-data/nfv.xml index 92db22d..12f6668 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 @@ -224,7 +218,9 @@ fw2dpi - Ethernet + + Ethernet + normal @@ -237,7 +233,9 @@ mgmt - IPv4 + + IPv4 + normal @@ -250,7 +248,9 @@ r2fw - Ethernet + + Ethernet + normal @@ -473,7 +473,9 @@ r2fw - IPv4 + + IPv4 + r2fw diff --git a/src/yang/etsi-nfv-common.yang b/src/yang/etsi-nfv-common.yang index 09ff7ee..b4a33ec 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)."; + "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."; 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 2795b7f..a570c69 100644 --- a/src/yang/etsi-nfv-ns.yang +++ b/src/yang/etsi-nfv-ns.yang @@ -4,24 +4,21 @@ submodule etsi-nfv-ns { prefix nfv; } - import etsi-nfv-common { - prefix common; - } - + include etsi-nfv-common; include etsi-nfv-vnf; include etsi-nfv-pnf; 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 014 Ed261v252"; reference - "ETSI GS NFV-IFA 011 Ed251v243"; + "ETSI GS NFV-IFA 011 Ed261v252"; } grouping resource-handle { @@ -253,6 +250,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."; @@ -345,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 { @@ -495,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 { @@ -755,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 @@ -766,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 @@ -776,7 +775,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"; @@ -846,8 +845,8 @@ submodule etsi-nfv-ns { } description "A reference to the descriptor of a connection point - attached to one of the constituent VNFs and PNFs or to - the descriptor of a NS SAP."; + attached to one of the constituent VNFs and PNFs or + to the descriptor of a NS SAP."; reference "GS NFV IFA014: Section 6.4.4.2 CpdPool information element"; @@ -903,8 +902,8 @@ submodule etsi-nfv-ns { description "Reference an NS VL profile."; reference - "GS NFV IFA014: Section 6.3.7.2, NsVirutalLinkConnectivity - information element."; + "GS NFV IFA014: Section 6.3.7.2, + NsVirutalLinkConnectivity information element."; } list constituent-cpd-id { @@ -936,8 +935,8 @@ submodule etsi-nfv-ns { } description "A reference to the descriptor of a connection point - attached to one of the constituent VNFs and PNFs or to - the descriptor of a NS SAP."; + attached to one of the constituent VNFs and PNFs or + to the descriptor of a NS SAP."; reference "GS NFV IFA014: Section 6.4.4.2 CpdPool information element"; @@ -988,7 +987,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"; @@ -1015,7 +1014,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 @@ -1024,7 +1023,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; } } @@ -1104,7 +1103,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.'"; @@ -1115,7 +1114,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."; @@ -1179,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 @@ -1212,7 +1211,7 @@ submodule etsi-nfv-ns { VirtualLinkToLevelMapping information element"; } - uses common:link-bitrate-requirements; + uses link-bitrate-requirements; } list ns-to-level-mapping { @@ -1239,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 @@ -1345,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 @@ -1356,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 @@ -1567,7 +1566,7 @@ submodule etsi-nfv-ns { } } } - uses common:security-parameters; + uses security-parameters; } } } 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 1982789..eafebce 100755 --- a/src/yang/etsi-nfv-vnf.yang +++ b/src/yang/etsi-nfv-vnf.yang @@ -16,15 +16,15 @@ submodule etsi-nfv-vnf { description "Models for VNFD according to GS NFV-IFA 011."; - revision 2018-06-19 { + revision 2019-03-18 { description "Initial revision. Common data structure to support VNFD according to: - VNFD according to ETSI GS NFV-IFA 011 Ed251v243"; + VNFD according to ETSI GS NFV-IFA 011 Ed261v254"; reference - "ETSI GS NFV-IFA 011 Ed251v243"; + "ETSI GS NFV-IFA 011 Ed261v254"; } grouping virtual-network-interface-requirements { @@ -56,7 +56,7 @@ submodule etsi-nfv-vnf { } leaf support-mandatory { - mandatory true; + default "false"; type boolean; description "Indicates whether fulfilling the constraint is @@ -623,7 +623,7 @@ submodule etsi-nfv-vnf { type uint16 { range "1..max"; } - mandatory true; + default "1"; description "Number of virtual CPUs."; reference @@ -738,7 +738,7 @@ submodule etsi-nfv-vnf { enum "swap"; enum "ephemeral"; } - mandatory true; + default "root"; description "Type of virtualised storage resource (e.g. volume, object)."; @@ -827,6 +827,7 @@ submodule etsi-nfv-vnf { "GS NFV IFA011: Section 7.1.6.5 SwImageDesc information element."; } + leaf checksum { type string; description @@ -836,7 +837,7 @@ submodule etsi-nfv-vnf { information element."; } leaf container-format { - mandatory true; + default "bare"; type enumeration { enum "aki" { description @@ -876,7 +877,7 @@ submodule etsi-nfv-vnf { information element."; } leaf disk-format { - mandatory true; + default "qcow2"; type enumeration { enum "aki" { description @@ -974,7 +975,7 @@ submodule etsi-nfv-vnf { information element."; } leaf image { - mandatory true; + default "."; type inet:uri; description "This is a reference to the actual software image. @@ -1041,6 +1042,7 @@ submodule etsi-nfv-vnf { information element."; } container qos { + presence "VL QoS parameters."; description "QoS of the VL."; reference @@ -1148,7 +1150,9 @@ submodule etsi-nfv-vnf { } } leaf cpd { - path "deref(../vdu-id)/../int-cpd/id"; + type leafref { + path "deref(../vdu-id)/../int-cpd/id"; + } } } } -- GitLab From a5e27cbdf9362f50b0854cadc977cedf73edcf96 Mon Sep 17 00:00:00 2001 From: Mahesh Jethanandani Date: Wed, 20 Feb 2019 15:56:40 +0800 Subject: [PATCH 2/2] networkInterfaceRequirements now has a cardinaility of 1 --- src/yang/etsi-nfv-vnf.yang | 1 + 1 file changed, 1 insertion(+) diff --git a/src/yang/etsi-nfv-vnf.yang b/src/yang/etsi-nfv-vnf.yang index eafebce..79b9af5 100755 --- a/src/yang/etsi-nfv-vnf.yang +++ b/src/yang/etsi-nfv-vnf.yang @@ -70,6 +70,7 @@ submodule etsi-nfv-vnf { list network-interface-requirements { key "key"; min-elements "1"; + max-elements "1"; leaf key { type string; -- GitLab