projects
/
osm
/
SO.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Implement scaling RPCs using REST rather than netconf"
[osm/SO.git]
/
models
/
openmano
/
python
/
rift
/
openmano
/
rift2openmano.py
diff --git
a/models/openmano/python/rift/openmano/rift2openmano.py
b/models/openmano/python/rift/openmano/rift2openmano.py
index
2ce17c0
..
e7d2e35
100755
(executable)
--- 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)
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"):
if vdu.has_field("hypervisor_epa"):
@@
-542,7
+541,9
@@
def rift2openmano_vnfd(rift_vnfd, rift_nsd):
# Add Openmano devices
device = {}
device["type"] = volume.device_type
# Add Openmano devices
device = {}
device["type"] = volume.device_type
- device["image"] = volume.image
+ device["image name"] = volume.image
+ if volume.has_field("image_checksum"):
+ device["image checksum"] = volume.image_checksum
vnfc["devices"].append(device)
vnfc_boot_data_init = False
vnfc["devices"].append(device)
vnfc_boot_data_init = False