Class: IControl::LocalLB::Monitor
- Inherits:
-
Base
- Object
- Base
- IControl::LocalLB::Monitor
- Defined in:
- lib/icontrol/local_lb/monitor.rb,
lib/icontrol/local_lb.rb
Overview
The Monitor interface enables you to manipulate a local load balancer’s monitor templates and instances. For example, use the Monitor interface to enable or disable a monitor instance, or to create a monitor template, or to get and set different attributes of a monitor template.
Defined Under Namespace
Classes: CommonAttributes, CommonAttributesSequence, IntPropertyType, IntPropertyTypeSequence, IntegerValue, IntegerValueSequence, MonitorTemplate, MonitorTemplateSequence, StrPropertyType, StrPropertyTypeSequence, StringValue, StringValueSequence, TemplateType, TemplateTypeSequence, UserDefinedStringValue, UserDefinedStringValueSequence
Instance Method Summary collapse
-
#create_template(opts) ⇒ Object
Creates monitor template with some basic attributes.
-
#delete_all_templates ⇒ Object
Deletes all user-defined (non-root) monitor template.
-
#delete_template ⇒ Object
Deletes this monitor template.
-
#instance_state(opts) ⇒ MonitorInstanceState
Gets the enabled/disabled states of the monitor instances.
-
#is_template_directly_usable ⇒ boolean
Determines if this monitor template can be used directly, or a user-defined monitor based on each monitor must be created first before it can be used.
-
#is_template_read_only ⇒ boolean
Determines if this monitor template are read-only.
-
#is_template_root ⇒ boolean
Determines if this monitor template are of the base monitor template.
-
#manual_resume_state ⇒ EnabledState
Gets the monitor template’ manual resume states.
-
#parent_template ⇒ String
Gets the parent monitor template from which this monitor template are derived.
-
#set_instance_state(opts) ⇒ Object
Sets the enabled/disabled states of the monitor instances.
-
#set_manual_resume_state(opts) ⇒ Object
Sets the monitor template’ manual resume states.
-
#set_template_destination(opts) ⇒ Object
Sets the destination IP:port values for this template.
-
#set_template_integer_property(opts) ⇒ Object
Sets an integer property values of this monitor template.
-
#set_template_reverse_mode(opts) ⇒ Object
Sets the reverse mode states of this monitor template.
-
#set_template_state(opts) ⇒ Object
Sets the monitor template’ enabled/disabled states.
-
#set_template_string_property(opts) ⇒ Object
Sets a string property values of this monitor template.
-
#set_template_transparent_mode(opts) ⇒ Object
Sets the transparent mode states of this monitor template.
-
#set_template_user_defined_string_property(opts) ⇒ Object
Sets the user-defined string property values of this monitor template.
-
#template_address_type ⇒ AddressType
Gets the destination address types of the monitor template.
-
#template_destination ⇒ MonitorIPPort
Gets the destination IP:port values of this monitor template.
-
#template_integer_property(opts) ⇒ IntegerValue
Gets the integer property values of this monitor template.
-
#template_list ⇒ MonitorTemplate
Gets the list of monitor template.
-
#template_reverse_mode ⇒ boolean
Gets the reverse mode states of this monitor template.
-
#template_state ⇒ EnabledState
Gets the enabled/disabled states of this monitor template.
-
#template_string_property(opts) ⇒ StringValue
Gets a string property values of this monitor template.
-
#template_transparent_mode ⇒ boolean
Gets the transparent mode states of this monitor template.
-
#template_type ⇒ TemplateType
Gets the template types of this monitor template.
-
#template_user_defined_string_property(opts) ⇒ UserDefinedStringValue
Gets the string property values of this monitor template.
-
#version ⇒ String
Gets the version information for this interface.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class IControl::Base
Instance Method Details
#create_template(opts) ⇒ Object
Creates monitor template with some basic attributes. If the "parent_template“ attribute in "template_attributes” is empty, then the new template is based on the template type field given in "template“. If the "parent_template” attribute in "template_attributes“ is specified, then the new template is derived from the "parent_template”, and template type field in "template“ is ignored. If "parent_template” is empty, and the template type field in "template“ is not specified, then the new template is a root template.
44 45 46 47 |
# File 'lib/icontrol/local_lb/monitor.rb', line 44 def create_template(opts) opts = check_params(opts,[:templates,:template_attributes]) super(opts) end |
#delete_all_templates ⇒ Object
Deletes all user-defined (non-root) monitor template.
55 56 57 |
# File 'lib/icontrol/local_lb/monitor.rb', line 55 def delete_all_templates super end |
#delete_template ⇒ Object
Deletes this monitor template.
65 66 67 |
# File 'lib/icontrol/local_lb/monitor.rb', line 65 def delete_template super end |
#instance_state(opts) ⇒ MonitorInstanceState
Gets the enabled/disabled states of the monitor instances.
78 79 80 81 |
# File 'lib/icontrol/local_lb/monitor.rb', line 78 def instance_state(opts) opts = check_params(opts,[:instances]) super(opts) end |
#is_template_directly_usable ⇒ boolean
Determines if this monitor template can be used directly, or a user-defined monitor based on each monitor must be created first before it can be used.
245 246 247 |
# File 'lib/icontrol/local_lb/monitor.rb', line 245 def is_template_directly_usable super end |
#is_template_read_only ⇒ boolean
Determines if this monitor template are read-only. The user can only modify properties for read/write monitor template.
257 258 259 |
# File 'lib/icontrol/local_lb/monitor.rb', line 257 def is_template_read_only super end |
#is_template_root ⇒ boolean
Determines if this monitor template are of the base monitor template.
268 269 270 |
# File 'lib/icontrol/local_lb/monitor.rb', line 268 def is_template_root super end |
#manual_resume_state ⇒ EnabledState
Gets the monitor template’ manual resume states. When enabled and a monitor has marked an object down, that object will not be marked up by the monitor, i.e. the object will be manually marked up.
92 93 94 |
# File 'lib/icontrol/local_lb/monitor.rb', line 92 def manual_resume_state super end |
#parent_template ⇒ String
Gets the parent monitor template from which this monitor template are derived. A user-defined monitor template will get its defaults from its parent monitor template.
104 105 106 |
# File 'lib/icontrol/local_lb/monitor.rb', line 104 def parent_template super end |
#set_instance_state(opts) ⇒ Object
Sets the enabled/disabled states of the monitor instances.
280 281 282 283 |
# File 'lib/icontrol/local_lb/monitor.rb', line 280 def set_instance_state(opts) opts = check_params(opts,[:instance_states]) super(opts) end |
#set_manual_resume_state(opts) ⇒ Object
Sets the monitor template’ manual resume states. When enabled and a monitor has marked an object down, that object will not be marked up by the monitor, i.e. the object will be manually marked up.
295 296 297 298 |
# File 'lib/icontrol/local_lb/monitor.rb', line 295 def set_manual_resume_state(opts) opts = check_params(opts,[:states]) super(opts) end |
#set_template_destination(opts) ⇒ Object
Sets the destination IP:port values for this template. NOTE: This should only be done when the monitor template in "template_names“ have NOT been associated to any node addresses or pool members.
310 311 312 313 |
# File 'lib/icontrol/local_lb/monitor.rb', line 310 def set_template_destination(opts) opts = check_params(opts,[:destinations]) super(opts) end |
#set_template_integer_property(opts) ⇒ Object
Sets an integer property values of this monitor template.
323 324 325 326 |
# File 'lib/icontrol/local_lb/monitor.rb', line 323 def set_template_integer_property(opts) opts = check_params(opts,[:values]) super(opts) end |
#set_template_reverse_mode(opts) ⇒ Object
Sets the reverse mode states of this monitor template. When in reverse mode, a successful test marks the node down instead of up.
337 338 339 340 |
# File 'lib/icontrol/local_lb/monitor.rb', line 337 def set_template_reverse_mode(opts) opts = check_params(opts,[:reverse_modes]) super(opts) end |
#set_template_state(opts) ⇒ Object
Sets the monitor template’ enabled/disabled states. This will enable/disable all instances that use this template. This serves as a quick and convenient method to enable/disable all instances, but if you want only to enable/disable a specific instance, use set_instance_enabled.
353 354 355 356 |
# File 'lib/icontrol/local_lb/monitor.rb', line 353 def set_template_state(opts) opts = check_params(opts,[:states]) super(opts) end |
#set_template_string_property(opts) ⇒ Object
Sets a string property values of this monitor template.
366 367 368 369 |
# File 'lib/icontrol/local_lb/monitor.rb', line 366 def set_template_string_property(opts) opts = check_params(opts,[:values]) super(opts) end |
#set_template_transparent_mode(opts) ⇒ Object
Sets the transparent mode states of this monitor template. Transparent mode is used when a user has to go through a firewall to do monitoring.
380 381 382 383 |
# File 'lib/icontrol/local_lb/monitor.rb', line 380 def set_template_transparent_mode(opts) opts = check_params(opts,[:transparent_modes]) super(opts) end |
#set_template_user_defined_string_property(opts) ⇒ Object
Sets the user-defined string property values of this monitor template.
393 394 395 396 |
# File 'lib/icontrol/local_lb/monitor.rb', line 393 def set_template_user_defined_string_property(opts) opts = check_params(opts,[:values]) super(opts) end |
#template_address_type ⇒ AddressType
Gets the destination address types of the monitor template. This allows the user to determine what node IP:port can be associated with this monitor when creating a monitor instance.
117 118 119 |
# File 'lib/icontrol/local_lb/monitor.rb', line 117 def template_address_type super end |
#template_destination ⇒ MonitorIPPort
Gets the destination IP:port values of this monitor template.
128 129 130 |
# File 'lib/icontrol/local_lb/monitor.rb', line 128 def template_destination super end |
#template_integer_property(opts) ⇒ IntegerValue
Gets the integer property values of this monitor template.
141 142 143 144 |
# File 'lib/icontrol/local_lb/monitor.rb', line 141 def template_integer_property(opts) opts = check_params(opts,[:property_types]) super(opts) end |
#template_list ⇒ MonitorTemplate
Gets the list of monitor template.
153 154 155 |
# File 'lib/icontrol/local_lb/monitor.rb', line 153 def template_list super end |
#template_reverse_mode ⇒ boolean
Gets the reverse mode states of this monitor template.
164 165 166 |
# File 'lib/icontrol/local_lb/monitor.rb', line 164 def template_reverse_mode super end |
#template_state ⇒ EnabledState
Gets the enabled/disabled states of this monitor template.
175 176 177 |
# File 'lib/icontrol/local_lb/monitor.rb', line 175 def template_state super end |
#template_string_property(opts) ⇒ StringValue
Gets a string property values of this monitor template.
188 189 190 191 |
# File 'lib/icontrol/local_lb/monitor.rb', line 188 def template_string_property(opts) opts = check_params(opts,[:property_types]) super(opts) end |
#template_transparent_mode ⇒ boolean
Gets the transparent mode states of this monitor template.
200 201 202 |
# File 'lib/icontrol/local_lb/monitor.rb', line 200 def template_transparent_mode super end |
#template_type ⇒ TemplateType
Gets the template types of this monitor template.
211 212 213 |
# File 'lib/icontrol/local_lb/monitor.rb', line 211 def template_type super end |
#template_user_defined_string_property(opts) ⇒ UserDefinedStringValue
Gets the string property values of this monitor template.
224 225 226 227 |
# File 'lib/icontrol/local_lb/monitor.rb', line 224 def template_user_defined_string_property(opts) opts = check_params(opts,[:property_names]) super(opts) end |
#version ⇒ String
Gets the version information for this interface.
233 234 235 |
# File 'lib/icontrol/local_lb/monitor.rb', line 233 def version super end |