Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def display_menu_server_info
- @cluster = get_cluster
- @hostname = get_hostname
- puts "Production/Mirror: " + get_prod_or_mir(@cluster)
- puts "Server Name: " + @hostname#Hostname
- puts "Member of: " + @cluster#Cluster name
- puts "Scripts Currently Running: "
- end
- def connect
- @con = ActiveRecord::Base.establish_connection(:adapter => "mysql",
- :host => "bleh",
- :database => "podstatus",
- :username => "root",
- :password => "bleh" )
- end
- def get_prod_or_mir(cluster)
- @con = connect
- @servers = PodStatus.find_by_sql("select * from vw_max_added_with_current_statuses where pod=\"#{@cluster}\";")
- return "N/A Yet"
- end
Add Comment
Please, Sign In to add comment