Method: KnifeCloudstack::CsStackCreate#http_request

Defined in:
lib/chef/knife/cs_stack_create.rb

#http_request(url) ⇒ Object



233
234
235
236
237
238
239
240
241
242
243
244
# File 'lib/chef/knife/cs_stack_create.rb', line 233

def http_request(url)
  match_data = /\$\{([a-zA-Z0-9-]+)\}/.match url
  if match_data
    server_name = match_data[1]
    ip = public_ip_for_host(server_name)
    url = url.sub(/\$\{#{server_name}\}/, ip)
  end


  puts "HTTP Request: #{url}"
  puts `curl -s -m 5 #{url}`
end