1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

B #2262 make the code more robust

This commit is contained in:
joseangelgm 2018-07-23 17:58:14 +02:00 committed by Tino Vázquez
parent 3a56574261
commit faf3b763a8
2 changed files with 7 additions and 2 deletions

View File

@ -47,8 +47,12 @@ class VIClient
end
def load_vcenter_configuration
vcenter_conf = YAML::load(File.open("#{ETC_LOCATION}/vcenter_driver.conf"))
vcenter_conf
begin
vcenter_conf = YAML::load(File.open("#{ETC_LOCATION}/vcenter_driver.conf"))
vcenter_conf
rescue
Hash.new
end
end
def get_property_vcenter_conf(key)

View File

@ -1488,6 +1488,7 @@ class VirtualMachine < Template
# process that uses this method
def wait_deploy_timeout
timeout_deploy = @vi_client.get_property_vcenter_conf(:vm_poweron_wait_default)
timeout_deploy = 300 if timeout_deploy.nil?
time_start = Time.now
begin
time_running = Time.now - time_start