Class: Uttk::Strategies::HostSelector
- Includes:
- Concrete
- Defined in:
- lib/uttk/strategies/HostSelector.rb
Overview
Example:
root: !S::Suite
contents:
- selector: !S::HostSelector
hosts: # The list of hosts.
- ssh://joe:[email protected] # Via ssh on foo.com.
- druby://bar.fr:4242/ttk # Another custom protocol.
- ... # Hosts can also be specified
# with a file containing hosts
# or an url.
static_select: | # Performed just one time.
reject! { |x| not x.alive? } # Example of static cleaning.
shuffle! # Shuffle the hosts.
dynamic_select: | # Called to elect an host.
roll # Move the first host to the
# end of the list and return it
# Other examples:
# - first (take the first)
# - choose (randomly)
- big suite: !S::Pool
attribute: !S::Jump
to: !url <<host_selector.elect>>
test: !S::Suite
... something long ...
contents:
- ...
- ...
Instance Attribute Summary
Attributes inherited from Strategy
Instance Method Summary collapse
-
#elect_host ⇒ Object
Methods.
Methods inherited from Strategy
#abort, #assert_cmd, #assign, #clean_instance_variables, #display_unexpected_exc, #display_unexpected_synflow_exc, #fail, #initialize, #initialize_flow_factory, #mk_system_runner, #name=, #pass, #raise_error, #reject, #run, #running?, #skip, #skip_if_cached, #skip_pass, #skip_wrt_rpath_and_rpath_exclude, #strategy, #strategy=, #symbols=, #symtbl, #symtbl=, #testify, #timeout=, to_form, #to_s, to_yaml_type, #wclass=
Constructor Details
This class inherits a constructor from Uttk::Strategies::Strategy
Instance Method Details
#elect_host ⇒ Object
Methods
45 46 47 |
# File 'lib/uttk/strategies/HostSelector.rb', line 45 def elect_host do_dynamic_select end |