Skip to content

Commit

Permalink
F OpenNebula#1454: Checked if context exists (OpenNebula#1816)
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmont authored and Christian committed Mar 9, 2018
1 parent b4c9cd4 commit 3bfdefa
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/vmm_mad/remotes/one/opennebula_driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,11 @@ def deploy(id, host, xml_text, lcm_state, deploy_id)
deploy_id = "#{DEPLOY_ID_PREFIX}#{rc}"
vm = get_remote_vm(deploy_id)

new_context_update = "CONTEXT = [" << context_str <<"]"
new_context_update = new_context_update.gsub("\n", ",\n")
rc = vm.updateconf(new_context_update)
if !context_str.nil?
new_context_update = "CONTEXT = [" << context_str <<"]"
new_context_update = new_context_update.gsub("\n", ",\n")
rc = vm.updateconf(new_context_update)
end

if OpenNebula.is_error?(rc)
STDERR.puts(rc.to_str())
Expand Down

0 comments on commit 3bfdefa

Please sign in to comment.