Method: Exec::ServiceInfo#exec

Defined in:
lib/exec/service_info.rb

#execObject

The execution of the command.



49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/exec/service_info.rb', line 49

def exec
  Color::print_log("NONE", "getting service list...", @stdout)
  confs = Command::AmbariServiceConfLs.new(@values["cluster"]).exec()
  Color::echo_ok(@stdout)
  @stdout.print "\nCLUSTER #{@values["cluster"]}\n"
  @stdout.print "desired configs: \n"
  confs.each do |conf|
    if conf["active"]
      @stdout.print("  " + "  " + conf["type"] + " " + conf["tag"]+ "\n")
    end
  end
  if @values["service"].nil?
    msg = info_all_services()
  else
    msg = info_service()
  end
  @stdout.print msg
end