Method: BBGAPI::LB_Applications.create

Defined in:
lib/bbgapi/lb_applications.rb

.createObject



35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/bbgapi/lb_applications.rb', line 35

def self.create
  app_name = ask("Specify a name for the new app:  ")
  options = { :body => {
    :name => app_name
    } }
  partial = '/api/lb_applications'
  api_response = BBGAPI::Client.posturl(partial,options)
  puts "App Created!"
  puts "Name:        #{api_response["name"]}"
  puts "ID:          #{api_response["id"]}"
  puts "External IP: #{api_response["ip_v4"]}"
  puts "Internal IP: #{api_response["source_ip"]}"
end