mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Update one_vm.py (#43349)
OpenNebula 5.5.8 expects int in DISK_SIZE field when you create a vm, not a float. For example, "42 GB" should be sent to OpenNebula API as "43088", not as "43088.0". MEMORY you cast to int explicitly, but DISK_SIZE not.
This commit is contained in:
parent
49f34fec13
commit
fe85d85ba6
1 changed files with 1 additions and 1 deletions
|
@ -815,7 +815,7 @@ def create_disk_str(module, client, template_id, disk_size_str):
|
|||
disk[child.tag] = child.text
|
||||
|
||||
result = 'DISK = [' + ','.join('{key}="{val}"'.format(key=key, val=val) for key, val in disk.items() if key != 'SIZE')
|
||||
result += ', SIZE=' + str(get_size_in_MB(module, disk_size_str)) + ']\n'
|
||||
result += ', SIZE=' + str(int(get_size_in_MB(module, disk_size_str))) + ']\n'
|
||||
|
||||
return result
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue