From 2290e1c90ea3d8cdf008d8f9e52e91a7936a089d Mon Sep 17 00:00:00 2001 From: Mahesh Jethanandani Date: Wed, 2 Jan 2019 16:45:25 -0800 Subject: [PATCH 1/4] Fix for bug#92 --- src/yang/etsi-nfv-vnf.yang | 57 +++++++++++++++++++++++++++++++++++--- 1 file changed, 53 insertions(+), 4 deletions(-) diff --git a/src/yang/etsi-nfv-vnf.yang b/src/yang/etsi-nfv-vnf.yang index 1982789..dcc09c5 100755 --- a/src/yang/etsi-nfv-vnf.yang +++ b/src/yang/etsi-nfv-vnf.yang @@ -827,8 +827,26 @@ submodule etsi-nfv-vnf { "GS NFV IFA011: Section 7.1.6.5 SwImageDesc information element."; } - leaf checksum { - type string; + container checksum { + leaf algorithm { + type string; + description + "Species the algorithm used to obtain the checksum + value."; + reference + "GS NFV IFA011: Section 7.1.6.10 ChecksumData + information element."; + } + leaf hash { + type string; + description + "Contains the result of applying the algorithm + indicated by the algorithm attribute to the data to + which this ChecksumData refers."; + reference + "GS NFV IFA011: Section 7.1.6.10 ChecksumData + information element."; + } description "The checksum of the software image file."; reference @@ -2304,7 +2322,23 @@ submodule etsi-nfv-vnf { leaf-list extension { type string; description - "'Extension' attributes of VnfInfo that are writeable."; + "Additional VNF-specific attributes of VnfInfo that + affect the lifecycle management of a VNF instance and + that are writeable. + + For each VNF instance, these attributes are stored + persistently by the VNFM and can be queried and + modified through the VNFM. + + These attributes are intended to be consumed by the + VNFM or by the lifecycle management scripts during the + execution of VNF lifecycle management operations. + + Modifying these values has no direct effect on the VNF + instance; however, modified values can be considered + during subsequent VNF lifecycle management operations, + which means that the modified values can indirectly + affect the configuration of the VNF instance."; reference "GS NFV IFA011: Section 7.1.14 VnfInfoModifiableAttributes information element"; @@ -2312,7 +2346,22 @@ submodule etsi-nfv-vnf { leaf-list metadata { type string; description - "'Metadata' attributes of VnfInfo that are writeable."; + "Additional VNF-specific attributes of VnfInfo that are + writeable and that provide metadata describing the VNF + instance. + + For each VNF instance, these attributes are stored + persistently by the VNFM and can be queried and modified + through the VNFM. + + These attributes are intended to provide information to + functional blocks external to the VNFM and will not be + used by the VNFM or the VNF lifecycle management + scripts when executing lifecycle management operations. + + Modifying these attributes has no effect on the VNF + instance. It only affects the attribute values stored by + the VNFM."; reference "GS NFV IFA011: Section 7.1.14 VnfInfoModifiableAttributes information element"; -- GitLab From 2145ff7f65b87cce65592bde27e39e33a1118bf9 Mon Sep 17 00:00:00 2001 From: Mahesh Jethanandani Date: Tue, 19 Feb 2019 21:20:18 +0800 Subject: [PATCH 2/4] Fix issues with recreating merge request --- example-data/nfv.xml | 6 ------ src/yang/etsi-nfv-ns.yang | 23 ++++++++++------------- src/yang/etsi-nfv-vnf.yang | 4 +++- 3 files changed, 13 insertions(+), 20 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 2795b7f..4a8ccab 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; @@ -345,7 +342,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 { @@ -776,7 +773,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"; @@ -988,7 +985,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 +1012,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 +1021,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 +1101,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 +1112,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."; @@ -1212,7 +1209,7 @@ submodule etsi-nfv-ns { VirtualLinkToLevelMapping information element"; } - uses common:link-bitrate-requirements; + uses link-bitrate-requirements; } list ns-to-level-mapping { @@ -1567,7 +1564,7 @@ submodule etsi-nfv-ns { } } } - uses common:security-parameters; + uses security-parameters; } } } diff --git a/src/yang/etsi-nfv-vnf.yang b/src/yang/etsi-nfv-vnf.yang index dcc09c5..2c59585 100755 --- a/src/yang/etsi-nfv-vnf.yang +++ b/src/yang/etsi-nfv-vnf.yang @@ -1166,7 +1166,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 5d78e62f2ffaee6f55f7850f7d9e39c23d7999b0 Mon Sep 17 00:00:00 2001 From: Mahesh Jethanandani Date: Thu, 21 Feb 2019 13:47:27 +0800 Subject: [PATCH 3/4] Bug#92: checksum algorithm is now a identity. --- src/yang/etsi-nfv-common.yang | 36 +++++++++++++++++++++++++++++++++++ src/yang/etsi-nfv-vnf.yang | 4 +++- 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/src/yang/etsi-nfv-common.yang b/src/yang/etsi-nfv-common.yang index 09ff7ee..85d7789 100644 --- a/src/yang/etsi-nfv-common.yang +++ b/src/yang/etsi-nfv-common.yang @@ -177,6 +177,42 @@ submodule etsi-nfv-common { base cp-role; } + identity checksum-algorithm { + description + "Identifies the algorithms supported for the purpose of + calculating the checksum."; + reference + "GS NFV IFA011: Section 7.1.6.10 Checksum information element."; + } + + identity sha-224 { + base checksum-algorithm; + description + "SHA-224."; + reference + "GS NFV IFA011: Section 7.1.6.10 Checksum information element."; + } + + identity sha-256 { + base checksum-algorithm; + description + "SHA-256."; + reference + "GS NFV IFA011: Section 7.1.6.10 Checksum information element."; + } + + identity sha-384 { + base checksum-algorithm; + description + "SHA-384."; + } + + identity sha-512 { + base checksum-algorithm; + description + "SHA-512."; + } + /* * Typedefs */ diff --git a/src/yang/etsi-nfv-vnf.yang b/src/yang/etsi-nfv-vnf.yang index 2c59585..4bffa9c 100755 --- a/src/yang/etsi-nfv-vnf.yang +++ b/src/yang/etsi-nfv-vnf.yang @@ -829,7 +829,9 @@ submodule etsi-nfv-vnf { } container checksum { leaf algorithm { - type string; + type identityref { + base checksum-algorithm; + } description "Species the algorithm used to obtain the checksum value."; -- GitLab From 3c1facd52aad82a9291e3a56b13d904456f541cb Mon Sep 17 00:00:00 2001 From: Mahesh Jethanandani Date: Thu, 21 Feb 2019 13:50:10 +0800 Subject: [PATCH 4/4] Bug#92: Add reference statement. --- src/yang/etsi-nfv-common.yang | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/yang/etsi-nfv-common.yang b/src/yang/etsi-nfv-common.yang index 85d7789..2ee0447 100644 --- a/src/yang/etsi-nfv-common.yang +++ b/src/yang/etsi-nfv-common.yang @@ -205,12 +205,16 @@ submodule etsi-nfv-common { base checksum-algorithm; description "SHA-384."; + reference + "GS NFV IFA011: Section 7.1.6.10 Checksum information element."; } identity sha-512 { base checksum-algorithm; description "SHA-512."; + reference + "GS NFV IFA011: Section 7.1.6.10 Checksum information element."; } /* -- GitLab