@@ -20,6 +20,17 @@ def initialize(monitor_levels_data)
2020 # This struct represents a network monitor query result that shows the last
2121 # state of the network monitor
2222 class NetworkMonitorQueryResult < Struct . new ( :finished_at , :responded_in , :response_status )
23+ ##
24+ # This constant is a mapping of network monitor query result statuses to descriptions
25+ QUERY_RESULT_STATUS_DESCRIPTIONS = {
26+ 0 => "Down/Critical: Server is down and/or has passed the critical response threshold (extremely long ping response, abnormal behavior, etc.)." ,
27+ 1 => "Warning - Server may be recovering from a previous down state, or may have taken too long to respond." ,
28+ 2 => "Up" ,
29+ 3 => "Not used" ,
30+ 4 => "Unknown - An unknown error has occurred. If the problem persists, contact support." ,
31+ 5 => "Unknown - An unknown error has occurred. If the problem persists, contact support."
32+ }
33+
2334 def initialize ( query_result_data )
2435 self . finished_at = query_result_data [ 'finishTime' ]
2536 self . responded_in = query_result_data [ 'responseTime' ]
@@ -60,15 +71,6 @@ def initialize(response_type_data)
6071 class NetworkMonitor < ModelBase
6172 include ::SoftLayer ::DynamicAttribute
6273
63- QUERY_RESULT_DESCRIPTIONS = {
64- 0 => "Down/Critical: Server is down and/or has passed the critical response threshold (extremely long ping response, abnormal behavior, etc.)." ,
65- 1 => "Warning - Server may be recovering from a previous down state, or may have taken too long to respond." ,
66- 2 => "Up" ,
67- 3 => "Not used" ,
68- 4 => "Unknown - An unknown error has occurred. If the problem persists, contact support." ,
69- 5 => "Unknown - An unknown error has occurred. If the problem persists, contact support."
70- }
71-
7274 @@available_query_types = nil
7375 @@available_response_types = nil
7476
0 commit comments