Class: HammerCLIKatello::PingCommand
- Defined in:
- lib/hammer_cli_katello/ping.rb
Instance Method Summary collapse
-
#execute ⇒ Object
output do.
- #send_request ⇒ Object
Methods included from ResolverCommons
Instance Method Details
#execute ⇒ Object
output do
44 45 46 47 48 49 50 51 52 53 |
# File 'lib/hammer_cli_katello/ping.rb', line 44 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 |
#send_request ⇒ Object
55 56 57 58 59 60 61 |
# File 'lib/hammer_cli_katello/ping.rb', line 55 def send_request super.tap do |data| data['services'].each do |_, service| service['_response'] = get_server_response(service) end end end |