Skip to content

Commit

Permalink
output connection_output and socket_output
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Moy committed Jun 15, 2017
1 parent 07d6f60 commit 29951f8
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions lib/resources/host.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,12 @@ def reachable?
ping.fetch(:success, false)
end

def output
ping[:output]
def connection_output
ping[:connection_output]
end

def socket_output
ping[:socket_output]
end

# returns all A records of the IP address, will return an array
Expand Down Expand Up @@ -156,7 +160,8 @@ def ping(hostname, port, protocol)

{
success: resp.exit_status.to_i.zero?,
output: resp.stdout,
connection_output: resp.stderr,
socket_output: resp.stdout
}
end

Expand Down Expand Up @@ -194,7 +199,8 @@ def ping(hostname, port, protocol)

{
success: resp.exit_status.to_i.zero?,
output: resp.stdout,
connection_output: resp.stderr,
socket_output: resp.stdout
}
end

Expand Down

0 comments on commit 29951f8

Please sign in to comment.