Class: SoftLayer::NetworkMonitorQueryResult

Inherits:
Struct
  • Object
show all
Defined in:
lib/softlayer/NetworkMonitor.rb

Overview

This struct represents a network monitor query result that shows the last state of the network monitor

Constant Summary collapse

STATUS_DESCRIPTIONS =

This constant is a mapping of network monitor query result statuses to descriptions

{
  0 => "Down/Critical: Server is down and/or has passed the critical response threshold (extremely long ping response, abnormal behavior, etc.).",
  1 => "Warning - Server may be recovering from a previous down state, or may have taken too long to respond.",
  2 => "Up",
  3 => "Not used",
  4 => "Unknown - An unknown error has occurred. If the problem persists, contact support.",
  5 => "Unknown - An unknown error has occurred. If the problem persists, contact support."
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(query_result_data) ⇒ NetworkMonitorQueryResult

Returns a new instance of NetworkMonitorQueryResult.



34
35
36
37
38
# File 'lib/softlayer/NetworkMonitor.rb', line 34

def initialize(query_result_data)
  self.finished_at     = query_result_data['finishTime']
  self.responded_in    = query_result_data['responseTime']
  self.response_status = query_result_data['responseStatus']
end

Instance Attribute Details

#finished_atObject

Returns the value of attribute finished_at

Returns:

  • (Object)

    the current value of finished_at



22
23
24
# File 'lib/softlayer/NetworkMonitor.rb', line 22

def finished_at
  @finished_at
end

#responded_inObject

Returns the value of attribute responded_in

Returns:

  • (Object)

    the current value of responded_in



22
23
24
# File 'lib/softlayer/NetworkMonitor.rb', line 22

def responded_in
  @responded_in
end

#response_statusObject

Returns the value of attribute response_status

Returns:

  • (Object)

    the current value of response_status



22
23
24
# File 'lib/softlayer/NetworkMonitor.rb', line 22

def response_status
  @response_status
end