Commit 6bf709ac authored by Mahesh Jethanandani's avatar Mahesh Jethanandani
Browse files

Merge branch 'issue#2' into 'dev-v2.8.1'

Issue#2 - Implement IFA011Ed251 CR NFVIFA(18)000381r1 - Enhance the virtual storage modeling in VNFD

See merge request !57
parents 6e35b43c 6415915d
Pipeline #2125 passed with stage
in 0 seconds
...@@ -80,8 +80,12 @@ ...@@ -80,8 +80,12 @@
</virtual-compute-desc> </virtual-compute-desc>
<virtual-storage-desc> <virtual-storage-desc>
<id>root</id> <id>root</id>
<type-of-storage>root-storage</type-of-storage> <type-of-storage>block</type-of-storage>
<size-of-storage>10</size-of-storage> <block-storage-data>
<size-of-storage>10</size-of-storage>
<rdma-enabled>true</rdma-enabled>
<sw-image-desc>CP</sw-image-desc>
</block-storage-data>
</virtual-storage-desc> </virtual-storage-desc>
<sw-image-desc> <sw-image-desc>
<id>CP</id> <id>CP</id>
......
...@@ -37,8 +37,10 @@ ...@@ -37,8 +37,10 @@
</virtual-compute-desc> </virtual-compute-desc>
<virtual-storage-desc> <virtual-storage-desc>
<id>asa-vsd</id> <id>asa-vsd</id>
<type-of-storage xmlns:nfv="urn:etsi:nfv:yang:etsi-nfv-descriptors">nfv:root-storage</type-of-storage> <type-of-storage xmlns:nfv="urn:etsi:nfv:yang:etsi-nfv-descriptors">nfv:block</type-of-storage>
<size-of-storage>0</size-of-storage> <block-storage-data>
<size-of-storage>0</size-of-storage>
</block-storage-data>
</virtual-storage-desc> </virtual-storage-desc>
<sw-image-desc> <sw-image-desc>
<id>asa-image</id> <id>asa-image</id>
...@@ -50,7 +52,7 @@ ...@@ -50,7 +52,7 @@
</checksum> </checksum>
<container-format>bare</container-format> <container-format>bare</container-format>
<disk-format>qcow2</disk-format> <disk-format>qcow2</disk-format>
<min-disk>20</min-disk> <min-disk>0</min-disk>
<min-ram>2.0</min-ram> <min-ram>2.0</min-ram>
<size>1</size> <size>1</size>
<image>http://www.mycompany.com/asa.qcow2</image> <image>http://www.mycompany.com/asa.qcow2</image>
......
...@@ -35,8 +35,11 @@ ...@@ -35,8 +35,11 @@
</virtual-compute-desc> </virtual-compute-desc>
<virtual-storage-desc> <virtual-storage-desc>
<id>asa-vsd</id> <id>asa-vsd</id>
<type-of-storage xmlns:nfv="urn:etsi:nfv:yang:etsi-nfv-descriptors">nfv:root-storage</type-of-storage> <type-of-storage xmlns:nfv="urn:etsi:nfv:yang:etsi-nfv-descriptors">nfv:file</type-of-storage>
<size-of-storage>0</size-of-storage> <file-storage-data>
<size-of-storage>0</size-of-storage>
<int-virtual-link-desc>asa-image</int-virtual-link-desc>
</file-storage-data>
</virtual-storage-desc> </virtual-storage-desc>
<sw-image-desc> <sw-image-desc>
<id>asa-image</id> <id>asa-image</id>
...@@ -48,7 +51,7 @@ ...@@ -48,7 +51,7 @@
</checksum> </checksum>
<container-format>bare</container-format> <container-format>bare</container-format>
<disk-format>qcow2</disk-format> <disk-format>qcow2</disk-format>
<min-disk>20</min-disk> <min-disk>0</min-disk>
<min-ram>2.0</min-ram> <min-ram>2.0</min-ram>
<size>1</size> <size>1</size>
<image>http://www.mycompany.com/asa.qcow2</image> <image>http://www.mycompany.com/asa.qcow2</image>
......
...@@ -36,8 +36,12 @@ ...@@ -36,8 +36,12 @@
</virtual-compute-desc> </virtual-compute-desc>
<virtual-storage-desc> <virtual-storage-desc>
<id>asa-vsd</id> <id>asa-vsd</id>
<type-of-storage>root-storage</type-of-storage> <type-of-storage>block</type-of-storage>
<size-of-storage>0</size-of-storage> <block-storage-data>
<size-of-storage>1</size-of-storage>
<rdma-enabled>true</rdma-enabled>
<sw-image-desc>asa-image</sw-image-desc>
</block-storage-data>
</virtual-storage-desc> </virtual-storage-desc>
<sw-image-desc> <sw-image-desc>
<id>asa-image</id> <id>asa-image</id>
...@@ -181,8 +185,11 @@ ...@@ -181,8 +185,11 @@
</virtual-compute-desc> </virtual-compute-desc>
<virtual-storage-desc> <virtual-storage-desc>
<id>csr-vsd</id> <id>csr-vsd</id>
<type-of-storage>root-storage</type-of-storage> <type-of-storage>file</type-of-storage>
<size-of-storage>0</size-of-storage> <file-storage-data>
<size-of-storage>1</size-of-storage>
<int-virtual-link-desc>csr-image</int-virtual-link-desc>
</file-storage-data>
</virtual-storage-desc> </virtual-storage-desc>
<sw-image-desc> <sw-image-desc>
<id>csr-image</id> <id>csr-image</id>
......
...@@ -233,22 +233,22 @@ submodule etsi-nfv-common { ...@@ -233,22 +233,22 @@ submodule etsi-nfv-common {
"Base type of storage that identities can derive from."; "Base type of storage that identities can derive from.";
} }
identity root-storage { identity block {
base storage-type; base storage-type;
description description
"Root type of storage."; "Block type of storage.";
} }
identity swap-storage { identity object {
base storage-type; base storage-type;
description description
"Swap type of storage."; "Object type of storage.";
} }
identity ephemeral-storage { identity file {
base storage-type; base storage-type;
description description
"Ephemeral type of storage."; "File type of storage.";
} }
identity forwarding-behaviour { identity forwarding-behaviour {
......
...@@ -115,6 +115,62 @@ submodule etsi-nfv-vnf { ...@@ -115,6 +115,62 @@ submodule etsi-nfv-vnf {
} }
} }
grouping block-storage-data {
leaf size-of-storage {
type uint64;
units "GB";
default 0;
description
"Size of virtualized storage resource in GB.";
reference
"GS NFV IFA011: Section 7.1.9.4.3, BlockStorageData
Information element.";
}
list vdu-storage-requirements {
key "key";
leaf key {
type string;
}
leaf value {
type string;
}
description
"An array of key-value pairs that articulate
the storage deployment requirements.";
reference
"GS NFV IFA011: Section 7.1.9.4.3, BlockStorageData
Information element.";
}
leaf rdma-enabled {
type boolean;
description
"Indicate if the storage support RDMA.";
reference
"GS NFV IFA011: Section 7.1.9.4.3, BlockStorageData
Information element.";
}
leaf sw-image-desc {
type leafref {
path "../../../sw-image-desc/id";
}
must "../size-of-storage >=" +
"../../../sw-image-desc[id=current()]/min-disk" {
}
description
"Software image to be loaded on the VirtualStorage
resource created based on this VirtualStorageDesc.
Shall be absent when used for virtual disks.";
reference
"GS NFV IFA011: Section 7.1.9.4.3, BlockStorageData
Information element.";
}
}
grouping vnfd { grouping vnfd {
leaf id { leaf id {
type string; type string;
...@@ -796,6 +852,24 @@ submodule etsi-nfv-vnf { ...@@ -796,6 +852,24 @@ submodule etsi-nfv-vnf {
VirtualCpuData information element."; VirtualCpuData information element.";
} }
} }
list virtual-disk {
key "id";
description
"The local or ephemeral disk(s) of the virtualised compute.";
reference
"GS NFV IFA011: Section 7.1.9.2.2, VirtualComputeDesc
Information element.";
leaf id {
type string;
description
"Unique identifier for the list of virtual disks.";
}
uses block-storage-data;
}
} }
list virtual-storage-desc { list virtual-storage-desc {
...@@ -815,70 +889,99 @@ submodule etsi-nfv-vnf { ...@@ -815,70 +889,99 @@ submodule etsi-nfv-vnf {
leaf type-of-storage { leaf type-of-storage {
// Needed to be able to onboard images // Needed to be able to onboard images
default root-storage;
type identityref { type identityref {
base storage-type; base storage-type;
} }
default "nfv:block";
description description
"Type of virtualised storage resource (e.g. volume, "Type of virtualised storage resource (BLOCK, OBJECT,
object)."; FILE).";
reference reference
"GS NFV IFA011: Section 7.1.9.4, Information elements "GS NFV IFA011: Section 7.1.9.4, Information elements
related to Virtual Storage."; related to Virtual Storage.";
} }
leaf size-of-storage { choice storage {
type uint64; container block-storage-data {
units "GB"; when '../type-of-storage = "nfv:block"';
default 0; description
description "Specifies the details of block storage. It shall
"Size of virtualised storage resource (e.g. size of be present when the 'typeOfStorage' attribute is set to
volume, in GB)"; 'BLOCK'. It shall be absent otherwise.";
reference reference
"GS NFV IFA011: Section 7.1.9.4, Information elements "GS NFV IFA011: Section 7.1.9.4, Information elements
related to Virtual Storage."; related to Virtual Storage.";
}
uses block-storage-data;
list vdu-storage-requirements { }
key "key";
leaf key { container object-storage-data {
type string; when '../type-of-storage = "nfv:object"';
} description
"Specifies the details of object storage. It shall be
present when the 'typeOfStorage' attribute is set to
'OBJECT'. It shall be absent otherwise.";
reference
"GS NFV IFA011: Section 7.1.9.4, Information elements
related to Virtual Storage.";
leaf max-size-of-storage {
type uint64;
units "GB";
default 0;
description
"Max size of virtualised storage resource in GB.";
reference
"GS NFV IFA011: Section 7.1.9.4.4, ObjectStorage Information
element.";
}
}
leaf value { container file-storage-data {
type string; when '../type-of-storage = "nfv:file"';
} description
description "Specifies the details of file storage. It shall be present
"Array of key-value pairs that articulate the storage when the 'typeOfStorage' attribute is set to 'FILE'. It
deployment requirements."; shall be absent otherwise.";
reference reference
"GS NFV IFA011: Section 7.1.9.4.2, VirtualStorageDesc "GS NFV IFA011: Section 7.1.9.4, Information elements
information element."; related to Virtual Storage.";
}
leaf size-of-storage {
type uint64;
units "GB";
default 0;
description
"Size of virtualised storage resource in GB.";
reference
"GS NFV IFA011: Section 7.1.9.4.5, FileStorageData
Information element.";
}
leaf rdma-enabled { leaf file-system-protocol {
type boolean; type string;
description default "cifs";
"Indicate if the storage support RDMA."; description
reference "The shared file system protocol (e.g. NFS, CIFS).";
"GS NFV IFA011: Section 7.1.9.4, Information elements reference
related to Virtual Storage."; "GS NFV IFA011: Section 7.1.9.4.5, FileStorageData
} Information element.";
}
leaf sw-image-desc { leaf int-virtual-link-desc {
type leafref { type leafref {
path "../../sw-image-desc/id"; path "../../../sw-image-desc/id";
} }
must "../size-of-storage >=" + mandatory true;
"../../sw-image-desc[id=current()]/min-disk" { description
} "Reference of the internal VLD which this file storage
description connects to. The attached VDUs shall connect to the
"Software image to be loaded on the VirtualStorage same internal VLD.";
resource created based on this VirtualStorageDesc."; reference
reference "GS NFV IFA011: Section 7.1.9.4.5, FileStorageData
"GS NFV IFA011: Section 7.1.9.4, Information elements Information element.";
related to Virtual Storage."; }
}
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment