diff --git a/.jenkins.sh b/.jenkins.sh index 3193dce78a4f8e22765fb624a5f507078b631f1d..2292aca1aee0aae15922015646a649b6e8bf94f9 100644 --- a/.jenkins.sh +++ b/.jenkins.sh @@ -6,7 +6,7 @@ # https://forge.etsi.org/etsi-software-license YANG_MODULES="yang/yang/*" -OUTPUT="etsi-nfv.html" +OUTPUT="etsi-nfv-descriptors.html" IMG_NAME="sol006" VERSION=latest IMG="$IMG_NAME:$VERSION" diff --git a/example-data/nfv.xml b/example-data/nfv.xml index ddf78072a078ef78a2bb07a6439747e389353b4b..b29a39616e3bb354bf3665b70a47a164fc929499 100644 --- a/example-data/nfv.xml +++ b/example-data/nfv.xml @@ -1,4 +1,4 @@ - + ASA My Company @@ -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 + + IPv4 + r2fw diff --git a/run-test.sh b/run-test.sh index 36bc6ec0a2dcc6e991c125f4ff3fd8cfc96a66ae..13601993ccb8ed386d62cb8b72f374ed9848fce7 100755 --- a/run-test.sh +++ b/run-test.sh @@ -10,7 +10,7 @@ cd src echo "Testing compilation" CONFD_OPTS="--fail-on-warnings" CONFD_OPTS="" -confdc -c $CONFD_OPTS -o /opt/confd/etc/confd/etsi-nfv.fxs etsi-nfv.yang +confdc -c $CONFD_OPTS -o /opt/confd/etc/confd/etsi-nfv-descriptors.fxs etsi-nfv-descriptors.yang echo "Starting ConfD" confd diff --git a/src/yang/etsi-nfv-common.yang b/src/yang/etsi-nfv-common.yang index 09ff7ee9045cc9ce4c13fb58c17a32f503afe982..7916efae463a8b9fff4386b4abcd85ea5c13983c 100644 --- a/src/yang/etsi-nfv-common.yang +++ b/src/yang/etsi-nfv-common.yang @@ -1,18 +1,18 @@ submodule etsi-nfv-common { yang-version 1.1; - belongs-to etsi-nfv { + belongs-to etsi-nfv-descriptors { prefix nfv; } 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"; } /* @@ -177,6 +177,46 @@ 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."; + 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."; + } + /* * Typedefs */ @@ -253,14 +293,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.yang b/src/yang/etsi-nfv-descriptors.yang similarity index 63% rename from src/yang/etsi-nfv.yang rename to src/yang/etsi-nfv-descriptors.yang index a209fc30f22d3c0a1cbe136c512ca4ec9be6ac12..d6421299979a409fc26e768e82e031d1ff957132 100644 --- a/src/yang/etsi-nfv.yang +++ b/src/yang/etsi-nfv-descriptors.yang @@ -1,6 +1,6 @@ -module etsi-nfv { +module etsi-nfv-descriptors { yang-version 1.1; - namespace "urn:etsi:params:xml:ns:yang:etsi-nfv"; + namespace "urn:etsi:nfv:yang:etsi-nfv-descriptors"; prefix nfv; include etsi-nfv-common; @@ -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 { diff --git a/src/yang/etsi-nfv-ns.yang b/src/yang/etsi-nfv-ns.yang index 4a8ccabeb8a18576a2e3bd6d9d45433308325555..9856e4c2fb659d9a5f3cd218d5e7f5cc31486aa4 100644 --- a/src/yang/etsi-nfv-ns.yang +++ b/src/yang/etsi-nfv-ns.yang @@ -1,6 +1,6 @@ submodule etsi-nfv-ns { yang-version 1.1; - belongs-to etsi-nfv { + belongs-to etsi-nfv-descriptors { prefix nfv; } @@ -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 014 Ed261v252"; reference - "ETSI GS NFV-IFA 011 Ed251v243"; + "ETSI GS NFV-IFA 014 Ed261v252"; } grouping resource-handle { @@ -146,63 +146,66 @@ submodule etsi-nfv-ns { "GS NFV IFA014: Section 6.2.3.2 Sapd information element"; } - leaf virtual-link-desc { - type leafref { - path "../../virtual-link-desc/id"; + choice cpd-or-virtual-link { + leaf virtual-link-desc { + type leafref { + path "../../virtual-link-desc/id"; + } + description + "References the descriptor of the NS VL instance to + which the SAP instantiated from this SAPD connects to."; + reference + "GS NFV IFA014: Section 6.2.3.2 Sapd information element"; } - description - "References the descriptor of the NS VL instance to - which the SAP instantiated from this SAPD connects to."; - reference - "GS NFV IFA014: Section 6.2.3.2 Sapd information element"; - } - choice associated-cpd-id { - container vnf { - leaf vnfd-id { - mandatory true; - type leafref { - path "../../../../nfv:vnfd/nfv:id"; + choice associated-cpd-id { + container vnf { + leaf vnfd-id { + mandatory true; + type leafref { + path "../../../../nfv:vnfd/nfv:id"; + } + must "boolean(../../../vnfd-id[.=current()])"; } - must "boolean(../../../vnfd-id[.=current()])"; - } - leaf ext-cpd-id { - mandatory true; - type leafref { - path "deref(../vnfd-id)/../nfv:ext-cpd/nfv:id"; + leaf ext-cpd-id { + mandatory true; + type leafref { + path "deref(../vnfd-id)/../nfv:ext-cpd/nfv:id"; + } } } - } - container pnf { - leaf pnfd-id { - mandatory true; + + container pnf { + leaf pnfd-id { + mandatory true; type leafref { - path "../../../../nfv:pnfd/nfv:id"; + path "../../../../nfv:pnfd/nfv:id"; + } + must "boolean(../pnfd-id[.=current()])"; } - must "boolean(../pnfd-id[.=current()])"; - } - leaf ext-cpd-id { - mandatory true; - type leafref { - path "deref(../pnfd-id)/../nfv:ext-cpd/nfv:id"; + leaf ext-cpd-id { + mandatory true; + type leafref { + path "deref(../pnfd-id)/../nfv:ext-cpd/nfv:id"; + } } } - } - container ns { - leaf nsd-id { - mandatory true; - type leafref { - path "../../../../nfv:nsd/nfv:id"; + container ns { + leaf nsd-id { + mandatory true; + type leafref { + path "../../../../nfv:nsd/nfv:id"; + } + must "boolean(../nsd-id[.=current()])"; } - must "boolean(../nsd-id[.=current()])"; - } - leaf ext-cpd-id { - mandatory true; - type leafref { - path "deref(../nsd-id)/../nfv:sapd/nfv:id"; + leaf ext-cpd-id { + mandatory true; + type leafref { + path "deref(../nsd-id)/../nfv:sapd/nfv:id"; + } } } } @@ -250,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."; @@ -492,7 +496,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 { @@ -752,7 +757,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 @@ -763,7 +768,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 @@ -1176,7 +1181,7 @@ submodule etsi-nfv-ns { } leaf number-of-instances { - mandatory true; + default 1; type uint32; description "Specifies the number of VNF instances required for @@ -1236,7 +1241,7 @@ submodule etsi-nfv-ns { } leaf number-of-instances { - mandatory true; + default 1; type uint32; description "Specifies the number of nested NS instances required @@ -1342,7 +1347,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 @@ -1353,7 +1358,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 69450eefe4d02aad851f72f57894cf43a00c056e..48499039c3757431b4ed89d5a83bccc246d73d3e 100644 --- a/src/yang/etsi-nfv-pnf.yang +++ b/src/yang/etsi-nfv-pnf.yang @@ -1,6 +1,6 @@ submodule etsi-nfv-pnf { yang-version 1.1; - belongs-to etsi-nfv { + belongs-to etsi-nfv-descriptors { prefix nfv; } @@ -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 0c2a29f8c90b6e98f6a55c4938c42c10d97da3d2..e24924a24fc3e8f38958c46c3025152ac562ec32 100755 --- a/src/yang/etsi-nfv-vnf.yang +++ b/src/yang/etsi-nfv-vnf.yang @@ -1,6 +1,6 @@ submodule etsi-nfv-vnf { yang-version 1.1; - belongs-to etsi-nfv { + belongs-to etsi-nfv-descriptors { prefix nfv; } @@ -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 @@ -624,7 +624,7 @@ submodule etsi-nfv-vnf { type uint16 { range "1..max"; } - mandatory true; + default 1; description "Number of virtual CPUs."; reference @@ -739,7 +739,7 @@ submodule etsi-nfv-vnf { enum "swap"; enum "ephemeral"; } - mandatory true; + default "root"; description "Type of virtualised storage resource (e.g. volume, object)."; @@ -828,8 +828,28 @@ submodule etsi-nfv-vnf { "GS NFV IFA011: Section 7.1.6.5 SwImageDesc information element."; } - leaf checksum { - type string; + container checksum { + leaf algorithm { + type identityref { + base checksum-algorithm; + } + 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 @@ -837,7 +857,7 @@ submodule etsi-nfv-vnf { information element."; } leaf container-format { - mandatory true; + default "bare"; type enumeration { enum "aki" { description @@ -877,7 +897,7 @@ submodule etsi-nfv-vnf { information element."; } leaf disk-format { - mandatory true; + default "qcow2"; type enumeration { enum "aki" { description @@ -975,7 +995,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. @@ -1042,6 +1062,7 @@ submodule etsi-nfv-vnf { information element."; } container qos { + presence "VL QoS parameters"; description "QoS of the VL."; reference @@ -1149,9 +1170,9 @@ submodule etsi-nfv-vnf { } } leaf cpd { - type leafref { - path "deref(../vdu-id)/../int-cpd/id"; - } + type leafref { + path "deref(../vdu-id)/../int-cpd/id"; + } } } } @@ -1204,7 +1225,7 @@ submodule etsi-nfv-vnf { } leaf min-number-of-instances { type uint16; - mandatory true; + default 1; description "Minimum number of instances of the VNFC based on this VDU that is permitted to exist for this flavour."; @@ -1214,15 +1235,17 @@ submodule etsi-nfv-vnf { } leaf max-number-of-instances { type uint16; - mandatory true; + default 1; must ". >= ../nfv:min-number-of-instances"; reference "GS NFV IFA011: Section 7.1.8.3, VduProfile information element."; } uses local-affinity-or-anti-affinity-rule; + list affinity-or-anti-affinity-group { key "id"; + description "Identifier(s) of the affinity or anti-affinity group(s) the VDU belongs to."; @@ -1242,29 +1265,9 @@ submodule etsi-nfv-vnf { "GS NFV IFA011: Section 7.1.8.12, AffinityOrAntiAffinity information element."; } - leaf type { - type enumeration { - enum affinity; - enum anti-affinity; - } - description - "Specifies whether the rule is an affinity rule or an - anti-affinity rule."; - reference - "GS NFV IFA011: Section 7.1.8.12, AffinityOrAntiAffinity - information element."; - } - leaf scope { - type affinity-scope; - description - "Specifies the scope of the rule, possible values are - 'NFVI-PoP', 'Zone', 'ZoneGroup', 'NFVI-node'"; - reference - "GS NFV IFA011: Section 7.1.8.12, AffinityOrAntiAffinity - information element."; - } } } + list virtual-link-profile { key "id flavour"; description @@ -1618,7 +1621,7 @@ submodule etsi-nfv-vnf { must ". >= ../../../../nfv:df/" + "nfv:vdu-profile[id=current()/../nfv:id]/" + "nfv:min-number-of-instances"; - mandatory true; + default 1; description "Number of instances of VNFC based on this VDU to deploy for this level."; @@ -1803,6 +1806,7 @@ submodule etsi-nfv-vnf { list parameter { key "key"; + leaf key { type string; } @@ -2037,6 +2041,118 @@ submodule etsi-nfv-vnf { AffinityOrAntiAffinityGroup information element"; } } + + list indicator { + key "id"; + + leaf id { + type string; + description + "Unique identifier."; + reference + "GS NFV IFA011: Section 7.1.11.2 VnfIndicator + information element"; + } + + leaf name { + type string; + description + "The human readable name of the VnfIndicator."; + reference + "GS NFV IFA011: Section 7.1.11.2 VnfIndicator + information element"; + } + + leaf indicator-value { + type string; + description + "Defines the allowed values or value ranges of this + indicator."; + reference + "GS NFV IFA011: Section 7.1.11.2 VnfIndicator + information element"; + } + + leaf source { + type enumeration { + enum vnf; + enum em; + enum both; + } + description + "Describe the source of the indicator. The possible + values are: + • VNF. + • EM. + • Both. + + This tells the consumer where to send the subscription + request."; + reference + "GS NFV IFA011: Section 7.1.11.2 VnfIndicator + information element"; + } + + description + "Declares the VNF indicators that are supported by this + VNF (specific to this DF)."; + reference + "GS NFV IFA011: Section 7.1.8.2 VnfDf information + element"; + } + + list supported-vnf-interfaces { + key "name"; + + leaf name { + type enumeration { + enum vnf-configuration; + enum vnf-indicator; + } + description + "Identifies an interface produced by the VNF. Valid + values: + - VNF_CONFIGURATION + - VNF_INDICATOR"; + reference + "GS NFV IFA011: Section 7.1.8.16 VnfInterfaceDetails + information element"; + } + + leaf-list cpd-id { + type leafref { + path "../../../ext-cpd/id"; + } + description + "References one or more CPDs from which to instantiate + external CPs through which interface endpoints on the + VNF side can be reached by the VNFM."; + reference + "GS NFV IFA011: Section 7.1.8.16 VnfInterfaceDetails + information element"; + } + + list interface-details { + key "key"; + + leaf key { + type string; + } + + leaf value { + type string; + } + } + + description + "Indicates which interfaces the VNF produces and provides + additional details on how to access the interface + endpoints."; + reference + "GS NFV IFA011: Section 7.1.8.2 VnfDf information + element"; + } + list monitoring-parameter { key "id"; @@ -2307,7 +2423,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"; @@ -2315,7 +2447,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";