mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
B #6370: Fix return code when importing market service
The import function is expected to return an array [rc, [images], [templates]]. The commit fix that when there is an error importing the service app. (cherry picked from commit 9c0877d30de62f95053af52282b6e308c2acd3f2)
This commit is contained in:
parent
5f0d555d07
commit
0532f2f5d0
@ -450,9 +450,7 @@ module OpenNebula::MarketPlaceAppExt
|
||||
ds = OpenNebula::Datastore.new_with_id(dsid, @client)
|
||||
rc = ds.info
|
||||
|
||||
is_vcenter =
|
||||
!OpenNebula.is_error?(rc) &&
|
||||
(ds['TEMPLATE/DRIVER'] == 'vcenter')
|
||||
is_vcenter = !OpenNebula.is_error?(rc) && ds['TEMPLATE/DRIVER'] == 'vcenter'
|
||||
|
||||
if is_vcenter
|
||||
if options[:template].nil?
|
||||
@ -592,7 +590,7 @@ module OpenNebula::MarketPlaceAppExt
|
||||
pool = OpenNebula::MarketPlaceAppPool.new(@client)
|
||||
rc = pool.info_all
|
||||
|
||||
return rc if OpenNebula.is_error?(rc)
|
||||
return [rc, [], []] if OpenNebula.is_error?(rc)
|
||||
|
||||
# Apps that have been already exported
|
||||
#
|
||||
@ -676,9 +674,7 @@ module OpenNebula::MarketPlaceAppExt
|
||||
end
|
||||
|
||||
if OpenNebula.is_error?(rc)
|
||||
rc_rbck = rollback_export(exported, xpath != '//DISK')
|
||||
|
||||
return rc_rbck if OpenNebula.is_error?(rc_rbck)
|
||||
rollback_export(exported, xpath != '//DISK')
|
||||
end
|
||||
|
||||
[rc, images, templates]
|
||||
|
Loading…
x
Reference in New Issue
Block a user