From d174e8e1728a8721acfdcf29f838a879160f8c6d Mon Sep 17 00:00:00 2001 From: Preethika Date: Wed, 11 May 2022 08:20:03 +0000 Subject: [PATCH 1/2] issue #51 Cloud-Native VNFs OSContainerDesc and minor changes. Signed-off-by: Preethika --- src/yang/etsi-nfv-vnf.yang | 217 ++++++++++++++++++++++++++++++++++++- 1 file changed, 213 insertions(+), 4 deletions(-) diff --git a/src/yang/etsi-nfv-vnf.yang b/src/yang/etsi-nfv-vnf.yang index 37214e2..2dda5f9 100755 --- a/src/yang/etsi-nfv-vnf.yang +++ b/src/yang/etsi-nfv-vnf.yang @@ -370,7 +370,6 @@ submodule etsi-nfv-vnf { list int-cpd { key "id"; - min-elements 1; description "A internal-connection-point element is a type of connection point and describes network connectivity @@ -491,14 +490,29 @@ submodule etsi-nfv-vnf { information element."; } + leaf-list os-container-desc { + type leafref { + path "../../os-container-desc/id"; + } + description + "Describes CPU, memory requirements and limits, and + software images of the OS Containers realizing this + Vdu corresponding to OS Containers sharing the same + host and same network namespace. Each unique identifier + is referenced only once within one VDU."; + reference + "GS NFV IFA011: Section 7.1.6.2, VDU information + element. "; + } leaf-list virtual-storage-desc { type leafref { path "../../virtual-storage-desc/id"; } description "Describes storage requirements for a VirtualStorage - instance attached to the virtualisation container - created from virtualComputeDesc defined for this VDU."; + instance attached to the virtualisation container(s) + created from virtualComputeDesc or osContainerDesc + defined for this VDU."; reference "GS NFV IFA011: Section 7.1.6.2, VDU information element, and Section 7.1.9.4, Information elements @@ -682,7 +696,8 @@ submodule etsi-nfv-vnf { key "id"; description "Defines descriptors of virtual compute resources to be - used by the VNF."; + used by the VNF when each of the VNFC instances of the + VNF is intended to be deployed in a single VM."; leaf id { type string; description @@ -1134,6 +1149,190 @@ submodule etsi-nfv-vnf { } } + list os-container-desc { + key "id"; + description + "Defines descriptors of container compute resources to be used + by the VNF when the VDUs of the VNF are realized by a set of + OS Containers sharing the same host and same networking namespace."; + reference + "GS NFV IFA011: Section 7.1.2, VNFD Information element."; + + leaf id { + type string; + description + "Unique identifier of this OsContainerDesc in the VNFD."; + reference + "GS NFV IFA011: Section 7.1.6.13, OsContainerDesc + information element."; + } + + leaf name { + type string; + description + "Human readable name of this OS container."; + reference + "GS NFV IFA011: Section 7.1.6.13, OsContainerDesc + information element."; + } + + leaf description { + type string; + description + "Human readable description of this OS container."; + reference + "GS NFV IFA011: Section 7.1.6.13, OsContainerDesc + information element."; + } + + leaf requested-cpu-resources { + type uint32; + description + "Number of CPU resources requested for the container + (e.g. in milli-CPU-s)."; + reference + "GS NFV IFA011: Section 7.1.6.13, OsContainerDesc + information element."; + } + + leaf requested-memory-resources { + type uint64; + description + "Amount of memory resources requested for the container + (e.g. in MB)."; + reference + "GS NFV IFA011: Section 7.1.6.13, OsContainerDesc + information element."; + } + + leaf requested-ephemeral-storage-resources { + type uint64; + units "GB"; + description + "Size of ephemeral storage resources requested for the container + (e.g. in GB)."; + reference + "GS NFV IFA011: Section 7.1.6.13, OsContainerDesc + information element."; + } + + list extended-resource-requests { + key "key"; + + leaf key { + type string; + } + leaf value { + type string; + } + description + "An array of key-value pairs of extended resources + required by the container."; + reference + "GS NFV IFA011: Section 7.1.6.13, OsContainerDesc + information element."; + } + + leaf cpu-resource-limit { + type uint32; + description + "Number of CPU resources the container can maximally use + (e.g. in milli-CPU)."; + reference + "GS NFV IFA011: Section 7.1.6.13, OsContainerDesc + information element."; + } + + leaf memory-resource-limit { + type uint64; + description + "Amount of memory resources the container can maximally + use(e.g. in MB)."; + reference + "GS NFV IFA011: Section 7.1.6.13, OsContainerDesc + information element."; + } + + leaf ephemeral-storage-resource-limit { + type uint64; + units "GB"; + description + "Size of ephemeral storage resources the container can + maximally use(e.g. in GB)."; + reference + "GS NFV IFA011: Section 7.1.6.13, OsContainerDesc + information element."; + } + + list huge-page-resources { + key "key"; + max-elements "1"; + leaf key { + type string; + } + leaf value { + type string; + } + description + "An array of key-value pairs of HugePages resources + requested for the container, which the container + can maximally use (e.g., \"hugepages-2Mi: 100Mi\")."; + reference + "GS NFV IFA011: Section 7.1.6.13, OsContainerDesc + information element."; + } + + leaf sw-image-desc { + type leafref { + path "../../sw-image-desc/id"; + } + description + "Describes the software image realizing this OS container."; + reference + "GS NFV IFA011: Section 7.1.6.13, OsContainerDesc + information element."; + } + + list boot-data { + key "key"; + max-elements "1"; + leaf key { + type string; + } + leaf value { + type string; + } + description + "Contains a string or a URL to a file contained in the VNF + package used to customize a container resource at boot time. + The bootData may contain variable parts that are replaced + by deployment specific values before being sent."; + reference + "GS NFV IFA011: Section 7.1.6.13, OsContainerDesc + information element."; + } + + list monitoring-parameter { + key "id"; + leaf id { + type string; + description + "Unique identifier of the monitoring parameter."; + reference + "GS NFV IFA011: Section 7.1.11.3, MonitoringParameter + information element."; + } + uses monitoring-parameter; + description + "Specifies the virtualised resource related performance + metrics on the OsContainerDesc level to be tracked by + the VNFM."; + reference + "GS NFV IFA011: Section 7.1.6.13, OsContainerDesc + information element."; + } + } + list sw-image-desc { key "id"; description @@ -4036,5 +4235,15 @@ submodule etsi-nfv-vnf { reference "GS NFV IFA011: Section 7.1.2 VNFD information element"; } + + leaf-list mciop-id { + type string; + description + "Identifies the MCIOP(s) in the VNF package, used in + containerized workload management, when the VNF is + realized by a set of OS containers."; + reference + "GS NFV IFA011: Section 7.1.2, VNFD Information element."; + } } } -- GitLab From 069f6530df5c6aebc1a04928effcd4688bb08e95 Mon Sep 17 00:00:00 2001 From: Preethika Date: Wed, 1 Jun 2022 06:35:12 +0000 Subject: [PATCH 2/2] issue #51 Cloud-Native VNFs OSContainerDesc and minor changes. --- src/yang/etsi-nfv-common.yang | 14 +++++++++++ src/yang/etsi-nfv-vnf.yang | 45 +++++++++++++++++++++-------------- 2 files changed, 41 insertions(+), 18 deletions(-) diff --git a/src/yang/etsi-nfv-common.yang b/src/yang/etsi-nfv-common.yang index 8088299..bc6b585 100644 --- a/src/yang/etsi-nfv-common.yang +++ b/src/yang/etsi-nfv-common.yang @@ -459,6 +459,20 @@ submodule etsi-nfv-common { } } + typedef scaler-units-size { + type enumeration { + enum "B"; + enum "kB"; + enum "KiB"; + enum "MB"; + enum "MiB"; + enum "GB"; + enum "GiB"; + enum "TB"; + enum "TiB"; + } + } + grouping nfvi-maintenance-info { container nfvi-maintenance-info { diff --git a/src/yang/etsi-nfv-vnf.yang b/src/yang/etsi-nfv-vnf.yang index 2dda5f9..f994bfc 100755 --- a/src/yang/etsi-nfv-vnf.yang +++ b/src/yang/etsi-nfv-vnf.yang @@ -1217,13 +1217,17 @@ submodule etsi-nfv-vnf { } list extended-resource-requests { - key "key"; + key "extended-resource amount"; - leaf key { + leaf extended-resource{ type string; + description + "The hardware platform specific extended resource."; } - leaf value { - type string; + leaf amount { + type uint32; + description + "Requested amount of the indicated extended resource."; } description "An array of key-value pairs of extended resources @@ -1265,14 +1269,26 @@ submodule etsi-nfv-vnf { } list huge-page-resources { - key "key"; + key "hugepage-size"; max-elements "1"; - leaf key { - type string; + + leaf hugepage-size{ + type uint32; + description + "Specifies the size of the hugepage."; } - leaf value { - type string; + leaf requested-size { + type uint32; + description + "Specifies the total size required for all the + hugepages of the size indicated by hugepage-size."; } + leaf size-unit { + type scaler-units-size; + description + "Specifies the unit used for both hugepage-size + and requested-size"; + } description "An array of key-value pairs of HugePages resources requested for the container, which the container @@ -1293,15 +1309,8 @@ submodule etsi-nfv-vnf { information element."; } - list boot-data { - key "key"; - max-elements "1"; - leaf key { - type string; - } - leaf value { - type string; - } + leaf boot-data { + type string; description "Contains a string or a URL to a file contained in the VNF package used to customize a container resource at boot time. -- GitLab