1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-11 05:17:41 +03:00

F #5818: Check if info operation was successful

This commit is contained in:
Tino Vazquez 2022-07-11 11:53:45 +02:00
parent 3de71881ce
commit db35b0764a

View File

@ -629,9 +629,11 @@ module OpenNebula::MarketPlaceAppExt
obj.extend(MarketPlaceAppExt)
# Fix name if duplcates exist
# Fix name if duplicates exist
imgp = OpenNebula::ImagePool.new(@client)
imgp.info
rc = imgp.info
break rc if OpenNebula.is_error?(rc)
img_names = imgp.retrieve_elements('/IMAGE_POOL/IMAGE/NAME')
opt_name = options[:name]
@ -653,9 +655,9 @@ module OpenNebula::MarketPlaceAppExt
)
image = rc[:image].first if rc[:image]
vmtemplate = rc[:vmtemplate].first if rc[:vmtemplate]
break image if OpenNebula.is_error?(image)
vmtemplate = rc[:vmtemplate].first if rc[:vmtemplate]
break vmtemplate if OpenNebula.is_error?(vmtemplate)
idx += 1