Skip to content

Commit

Permalink
Added support for running an external command to determine how to rea…
Browse files Browse the repository at this point in the history
…ch a given compute node on a given port for a given zone
  • Loading branch information
Roy Keene committed Dec 19, 2016
1 parent 2d0a7f2 commit 270875c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/sunstone/OpenNebulaVNC.rb
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,13 @@ def proxy(vm_resource, vm_zone_id)
host = vm_resource['MONITORING/ESX_HOST']
end

# Update host and port to point to a proxy
begin
vnc_proxy_info = `aurae-zones-vnc-proxy '#{host}' '#{vnc_port}' '#{vm_zone_id}'`
host, vnc_port = vnc_proxy_info.chomp().split(":")
rescue Exception => e
end

# Generate token random_str: host:port
random_str = rand(36**20).to_s(36) #random string a-z0-9 length 20
token = "#{random_str}: #{host}:#{vnc_port}"
Expand Down

0 comments on commit 270875c

Please sign in to comment.