Class: HammerCLIKatello::PingCommand
- Defined in:
- lib/hammer_cli_katello/ping.rb
Instance Method Summary collapse
Methods included from ResolverCommons
Instance Method Details
#execute ⇒ Object
output do
62 63 64 65 66 67 68 69 70 71 |
# File 'lib/hammer_cli_katello/ping.rb', line 62 def execute d = send_request print_data d service_statuses = d['services'].values.map { |v| v['status'] } if d['status'] == _("FAIL") || service_statuses.include?(_("FAIL")) 1 else HammerCLI::EX_OK end end |
#request_options ⇒ Object
83 84 85 |
# File 'lib/hammer_cli_katello/ping.rb', line 83 def { with_authentication: false } end |
#send_request ⇒ Object
73 74 75 76 77 78 79 80 81 |
# File 'lib/hammer_cli_katello/ping.rb', line 73 def send_request super.tap do |data| data['services'] ||= {} data['services'].each do |_, service| service['_response'] = HammerCLIKatello::CommandExtensions::Ping.get_server_response(service) end end end |