Class: IControl::LocalLB::Monitor

Inherits:
Base
  • Object
show all
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

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.

Parameters:

  • opts (Hash)

Options Hash (opts):

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



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_templatesObject

Deletes all user-defined (non-root) monitor template.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



55
56
57
# File 'lib/icontrol/local_lb/monitor.rb', line 55

def delete_all_templates
  super
end

#delete_templateObject

Deletes this monitor template.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



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.

Parameters:

  • opts (Hash)

Options Hash (opts):

Returns:

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



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_usableboolean

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.

Returns:

  • (boolean)

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



245
246
247
# File 'lib/icontrol/local_lb/monitor.rb', line 245

def is_template_directly_usable
  super
end

#is_template_read_onlyboolean

Determines if this monitor template are read-only. The user can only modify properties for read/write monitor template.

Returns:

  • (boolean)

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



257
258
259
# File 'lib/icontrol/local_lb/monitor.rb', line 257

def is_template_read_only
  super
end

#is_template_rootboolean

Determines if this monitor template are of the base monitor template.

Returns:

  • (boolean)

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



268
269
270
# File 'lib/icontrol/local_lb/monitor.rb', line 268

def is_template_root
  super
end

#manual_resume_stateEnabledState

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.

Returns:

  • (EnabledState)

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



92
93
94
# File 'lib/icontrol/local_lb/monitor.rb', line 92

def manual_resume_state
  super
end

#parent_templateString

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.

Returns:

  • (String)

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



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.

Parameters:

  • opts (Hash)

Options Hash (opts):

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



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.

Parameters:

  • opts (Hash)

Options Hash (opts):

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



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.

Parameters:

  • opts (Hash)

Options Hash (opts):

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



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.

Parameters:

  • opts (Hash)

Options Hash (opts):

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



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.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :reverse_modes (boolean)

    The reverse mode states of the monitor templates.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



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.

Parameters:

  • opts (Hash)

Options Hash (opts):

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



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.

Parameters:

  • opts (Hash)

Options Hash (opts):

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



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.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :transparent_modes (boolean)

    The transparent mode states of the monitor templates.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



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.

Parameters:

  • opts (Hash)

Options Hash (opts):

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



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_typeAddressType

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.

Returns:

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



117
118
119
# File 'lib/icontrol/local_lb/monitor.rb', line 117

def template_address_type
  super
end

#template_destinationMonitorIPPort

Gets the destination IP:port values of this monitor template.

Returns:

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



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.

Parameters:

  • opts (Hash)

Options Hash (opts):

Returns:

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



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_listMonitorTemplate

Gets the list of monitor template.

Returns:

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



153
154
155
# File 'lib/icontrol/local_lb/monitor.rb', line 153

def template_list
  super
end

#template_reverse_modeboolean

Gets the reverse mode states of this monitor template.

Returns:

  • (boolean)

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



164
165
166
# File 'lib/icontrol/local_lb/monitor.rb', line 164

def template_reverse_mode
  super
end

#template_stateEnabledState

Gets the enabled/disabled states of this monitor template.

Returns:

  • (EnabledState)

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



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.

Parameters:

  • opts (Hash)

Options Hash (opts):

Returns:

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



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_modeboolean

Gets the transparent mode states of this monitor template.

Returns:

  • (boolean)

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



200
201
202
# File 'lib/icontrol/local_lb/monitor.rb', line 200

def template_transparent_mode
  super
end

#template_typeTemplateType

Gets the template types of this monitor template.

Returns:

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



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.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :property_names (String)

    The user-defined string property names from which to get values for the monitor templates.

Returns:

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



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

#versionString

Gets the version information for this interface.

Returns:

  • (String)


233
234
235
# File 'lib/icontrol/local_lb/monitor.rb', line 233

def version
  super
end