Class: Fuey::Inspections::RFCPing

Inherits:
Inspection show all
Defined in:
lib/fuey_client/fuey/inspections/rfc_ping.rb

Instance Attribute Summary collapse

Attributes inherited from Inspection

#name, #state

Instance Method Summary collapse

Methods inherited from Inspection

#failed?, #notify, #passed?, #status

Methods included from ModelInitializer

#initialize

Instance Attribute Details

#ashostObject

Returns the value of attribute ashost.



6
7
8
# File 'lib/fuey_client/fuey/inspections/rfc_ping.rb', line 6

def ashost
  @ashost
end

#clientObject

Returns the value of attribute client.



6
7
8
# File 'lib/fuey_client/fuey/inspections/rfc_ping.rb', line 6

def client
  @client
end

#langObject

Returns the value of attribute lang.



6
7
8
# File 'lib/fuey_client/fuey/inspections/rfc_ping.rb', line 6

def lang
  @lang
end

#passwdObject

Returns the value of attribute passwd.



6
7
8
# File 'lib/fuey_client/fuey/inspections/rfc_ping.rb', line 6

def passwd
  @passwd
end

#responseObject

Returns the value of attribute response.



6
7
8
# File 'lib/fuey_client/fuey/inspections/rfc_ping.rb', line 6

def response
  @response
end

#sysnrObject

Returns the value of attribute sysnr.



6
7
8
# File 'lib/fuey_client/fuey/inspections/rfc_ping.rb', line 6

def sysnr
  @sysnr
end

#userObject

Returns the value of attribute user.



6
7
8
# File 'lib/fuey_client/fuey/inspections/rfc_ping.rb', line 6

def user
  @user
end

Instance Method Details

#_executeObject



8
9
10
11
12
13
14
15
# File 'lib/fuey_client/fuey/inspections/rfc_ping.rb', line 8

def _execute
  result, @response = Support::SAP.new(config).ping
  if result
    self.pass
  else
    self.fail
  end
end

#settingsObject



26
27
28
# File 'lib/fuey_client/fuey/inspections/rfc_ping.rb', line 26

def settings
  config.reject{|k,v| k == 'passwd'}
end

#status_messageObject



21
22
23
24
# File 'lib/fuey_client/fuey/inspections/rfc_ping.rb', line 21

def status_message
  return %(RFCPing #{state} for #{ashost}. #{@response}) if failed?
  %(RFCPing #{state} for #{ashost}.)
end

#to_sObject



17
18
19
# File 'lib/fuey_client/fuey/inspections/rfc_ping.rb', line 17

def to_s
  %(RFCPing #{ashost} with user #{user})
end