Class: BBGAPI::LB_Easy
- Inherits:
-
Object
- Object
- BBGAPI::LB_Easy
- Defined in:
- lib/bbgapi/lb_easy.rb
Class Method Summary collapse
- .haproxy_login ⇒ Object
- .machines_in_pool ⇒ Object
- .menulist(config) ⇒ Object
- .remove_machine_in_pool ⇒ Object
Class Method Details
.haproxy_login ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/bbgapi/lb_easy.rb', line 20 def self.haproxy_login haproxy = BBGAPI::LB_Services. puts "-----Needs improvement but should work for now" haproxy.each {|x| puts "#{x["name"]} - URL: #{x["status_url"]} #{x["status_username"]}:#{x["status_password"]} " } puts "------------------" end |
.machines_in_pool ⇒ Object
29 30 31 32 33 34 |
# File 'lib/bbgapi/lb_easy.rb', line 29 def self.machines_in_pool nodes = BBGAPI::LB_Backends.raw puts "\nNodes in Pool:\n" nodes.first["lb_machines"].each {|x| puts "#{x["hostname"]}"} puts "\n" end |
.menulist(config) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/bbgapi/lb_easy.rb', line 4 def self.(config) @@config = config #["bluebox_customer_id"] puts BBGAPI.dnssuffix choose do || puts "Load Balancer Easy Functions" puts "----------------------------------------" .prompt = "Which Action?" .choices(:get_haproxy_login) {self.haproxy_login} .choices(:find_machines_in_pool) {self.machines_in_pool} .choices(:remove_machine_in_pool) {self.remove_machine_in_pool} end end |
.remove_machine_in_pool ⇒ Object
36 37 38 |
# File 'lib/bbgapi/lb_easy.rb', line 36 def self.remove_machine_in_pool puts "Not yet implemented." end |