26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# File 'lib/rundock/builder/target_builder.rb', line 26
def build_group(target_group_name, target_info)
if !target_info.nil? &&
target_info.key?(target_group_name.to_sym) &&
target_info[target_group_name.to_sym][:target_type] == 'group' &&
target_info[target_group_name.to_sym].key?(:targets) &&
target_info[target_group_name.to_sym][:targets].is_a?(Array)
targets = target_info[target_group_name.to_sym][:targets]
nodes = []
@parsed_node_options = {}
targets.each do |n|
backend_builder = BackendBuilder.new(@options, n, target_info)
backend = backend_builder.build
@parsed_node_options[n.to_sym] = backend_builder.parsed_options
nodes << Node.new(n, backend)
end
nodes
else
raise TargetGroupNotFoundError
end
end
|