mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-11 05:17:41 +03:00
B #2262 make the code more robust
(cherry picked from commit faf3b763a8
)
This commit is contained in:
parent
2945fc1a20
commit
5ebb05affd
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user