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
70 71 72 73 74 75 76 77 78 79 |
# File 'lib/hammer_cli_katello/ping.rb', line 70 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
91 92 93 |
# File 'lib/hammer_cli_katello/ping.rb', line 91 def { with_authentication: false } end |
#send_request ⇒ Object
81 82 83 84 85 86 87 88 89 |
# File 'lib/hammer_cli_katello/ping.rb', line 81 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 |