return quota
+ nonlocal indata
+
flavor_data = {
"disk": int(target_flavor["storage-gb"]),
"ram": int(target_flavor["memory-mb"]),
numa = {}
extended = {}
+ target_vdur = None
+ for vnf in indata.get("vnf", []):
+ for vdur in vnf.get("vdur", []):
+ if vdur.get("ns-flavor-id") == target_flavor["id"]:
+ target_vdur = vdur
+
+ for storage in target_vdur.get("virtual-storages", []):
+ if (
+ storage.get("type-of-storage")
+ == "etsi-nfv-descriptors:ephemeral-storage"
+ ):
+ flavor_data["ephemeral"] = int(
+ storage.get("size-of-storage", 0)
+ )
+
if target_flavor.get("guest-epa"):
extended = {}
epa_vcpu_set = False
# create flavor
new_flavor = self.nova.flavors.create(
- name,
- ram,
- vcpus,
- flavor_data.get("disk", 0),
+ name=name,
+ ram=ram,
+ vcpus=vcpus,
+ disk=flavor_data.get("disk", 0),
+ ephemeral=flavor_data.get("ephemeral", 0),
is_public=flavor_data.get("is_public", True),
)
# add metadata
--- /dev/null
+#######################################################################################
+# Copyright ETSI Contributors and Others.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#######################################################################################
+---
+fixes:
+ - |
+ Fixing bug 1797 - this fix allows for the creation of ephemeral
+ disks.