From: velandy Date: Mon, 3 Apr 2017 11:46:21 +0000 (+0200) Subject: Merge "RIFT-14707 : Feedback on vnfd.yang comments" X-Git-Tag: v2.0.0~17 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=38aa3109c1ad0f1c10d239c9742c0b16f4202cd5;hp=27111f970f0b039e81efdddc8bc3bbe94edf41c8;p=osm%2FSO.git Merge "RIFT-14707 : Feedback on vnfd.yang comments" --- diff --git a/models/openmano/python/rift/openmano/rift2openmano.py b/models/openmano/python/rift/openmano/rift2openmano.py index 80436461..e7d2e359 100755 --- a/models/openmano/python/rift/openmano/rift2openmano.py +++ b/models/openmano/python/rift/openmano/rift2openmano.py @@ -499,12 +499,11 @@ def rift2openmano_vnfd(rift_vnfd, rift_nsd): if vdu.vm_flavor.has_field("vcpu_count"): vnfc["numas"][0]["cores"] = max(vdu.vm_flavor.vcpu_count, 1) - else: - if vdu.vm_flavor.has_field("vcpu_count") and vdu.vm_flavor.vcpu_count: - vnfc["vcpus"] = vdu.vm_flavor.vcpu_count + if vdu.vm_flavor.has_field("vcpu_count") and vdu.vm_flavor.vcpu_count: + vnfc["vcpus"] = vdu.vm_flavor.vcpu_count - if vdu.vm_flavor.has_field("memory_mb") and vdu.vm_flavor.memory_mb: - vnfc["ram"] = vdu.vm_flavor.memory_mb + if vdu.vm_flavor.has_field("memory_mb") and vdu.vm_flavor.memory_mb: + vnfc["ram"] = vdu.vm_flavor.memory_mb if vdu.has_field("hypervisor_epa"):