mcollective-client 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of mcollective-client might be problematic. Click here for more details.
- data/lib/mcollective/aggregate.rb +33 -9
- data/lib/mcollective/aggregate/result/collection_result.rb +1 -1
- data/lib/mcollective/client.rb +5 -1
- data/lib/mcollective/data.rb +9 -5
- data/lib/mcollective/data/result.rb +1 -1
- data/lib/mcollective/ddl/base.rb +1 -1
- data/lib/mcollective/rpc/client.rb +2 -0
- data/lib/mcollective/rpc/stats.rb +29 -5
- data/spec/unit/aggregate/result/collection_result_spec.rb +1 -1
- data/spec/unit/aggregate_spec.rb +82 -22
- data/spec/unit/client_spec.rb +1 -1
- data/spec/unit/data/result_spec.rb +4 -0
- data/spec/unit/data_spec.rb +8 -3
- data/spec/unit/ddl/base_spec.rb +10 -10
- data/spec/unit/plugins/mcollective/aggregate/summary_spec.rb +10 -0
- data/spec/unit/rpc/stats_spec.rb +36 -0
- data/spec/unit/validator_spec.rb +1 -1
- metadata +246 -257
@@ -3,12 +3,13 @@ module MCollective
|
|
3
3
|
autoload :Result, 'mcollective/aggregate/result'
|
4
4
|
autoload :Base, 'mcollective/aggregate/base'
|
5
5
|
|
6
|
-
attr_accessor :ddl, :functions, :action
|
6
|
+
attr_accessor :ddl, :functions, :action, :failed
|
7
7
|
|
8
8
|
def initialize(ddl)
|
9
9
|
@functions = []
|
10
10
|
@ddl = ddl
|
11
11
|
@action = ddl[:action]
|
12
|
+
@failed = []
|
12
13
|
|
13
14
|
create_functions
|
14
15
|
end
|
@@ -17,35 +18,58 @@ module MCollective
|
|
17
18
|
# All aggregate call and summarize method calls operate on these function as a batch.
|
18
19
|
def create_functions
|
19
20
|
@ddl[:aggregate].each_with_index do |agg, i|
|
20
|
-
contains_output?(agg[:args][0])
|
21
|
-
|
22
21
|
output = agg[:args][0]
|
23
|
-
arguments = agg[:args][1..(agg[:args].size)]
|
24
22
|
|
25
|
-
|
23
|
+
if contains_output?(output)
|
24
|
+
arguments = agg[:args][1]
|
25
|
+
format = (arguments.delete(:format) if arguments) || nil
|
26
|
+
begin
|
27
|
+
@functions << load_function(agg[:function]).new(output, arguments, format, @action)
|
28
|
+
rescue Exception => e
|
29
|
+
Log.error("Cannot create aggregate function '#{output}'. #{e.to_s}")
|
30
|
+
@failed << {:name => output, :type => :startup}
|
31
|
+
end
|
32
|
+
else
|
33
|
+
Log.error("Cannot create aggregate function '#{output}'. '#{output}' has not been specified as a valid ddl output.")
|
34
|
+
@failed << {:name => output, :type => :create}
|
35
|
+
end
|
26
36
|
end
|
27
37
|
end
|
28
38
|
|
29
39
|
# Check if the function param is defined as an output for the action in the ddl
|
30
40
|
def contains_output?(output)
|
31
|
-
|
41
|
+
@ddl[:output].keys.include?(output)
|
32
42
|
end
|
33
43
|
|
34
44
|
# Call all the appropriate functions with the reply data received from RPC::Client
|
35
45
|
def call_functions(reply)
|
36
46
|
@functions.each do |function|
|
37
47
|
Log.debug("Calling aggregate function #{function} for result")
|
38
|
-
|
48
|
+
begin
|
49
|
+
function.process_result(reply[:data][function.output_name], reply)
|
50
|
+
rescue Exception => e
|
51
|
+
Log.error("Could not process aggregate function for '#{function.output_name}'. #{e.to_s}")
|
52
|
+
@failed << {:name => function.output_name, :type => :process_result}
|
53
|
+
@functions.delete(function)
|
54
|
+
end
|
39
55
|
end
|
40
56
|
end
|
41
57
|
|
42
58
|
# Finalizes the function returning a result object
|
43
59
|
def summarize
|
44
60
|
summary = @functions.map do |function|
|
45
|
-
|
61
|
+
begin
|
62
|
+
function.summarize
|
63
|
+
rescue Exception => e
|
64
|
+
Log.error("Could not summarize aggregate result for '#{function.output_name}'. #{e.to_s}")
|
65
|
+
@failed << {:name => function.output_name, :type => :summarize}
|
66
|
+
nil
|
67
|
+
end
|
46
68
|
end
|
47
69
|
|
48
|
-
summary.
|
70
|
+
summary.reject{|x| x.nil?}.sort do |x,y|
|
71
|
+
x.result[:output] <=> y.result[:output]
|
72
|
+
end
|
49
73
|
end
|
50
74
|
|
51
75
|
# Loads function from disk for use
|
@@ -8,7 +8,7 @@ module MCollective
|
|
8
8
|
result = StringIO.new
|
9
9
|
|
10
10
|
@result[:value].sort{|x,y| x[1] <=> y[1]}.reverse.each do |value|
|
11
|
-
result.puts
|
11
|
+
result.puts @aggregate_format % [value[0], value[1]]
|
12
12
|
end
|
13
13
|
|
14
14
|
result.string.chomp
|
data/lib/mcollective/client.rb
CHANGED
@@ -127,10 +127,12 @@ module MCollective
|
|
127
127
|
def req(body, agent=nil, options=false, waitfor=0)
|
128
128
|
if body.is_a?(Message)
|
129
129
|
agent = body.agent
|
130
|
-
options = body.options
|
131
130
|
waitfor = body.discovered_hosts.size || 0
|
131
|
+
@options = body.options
|
132
132
|
end
|
133
133
|
|
134
|
+
@options = options if options
|
135
|
+
|
134
136
|
stat = {:starttime => Time.now.to_f, :discoverytime => 0, :blocktime => 0, :totaltime => 0}
|
135
137
|
|
136
138
|
timeout = @discoverer.discovery_timeout(@options[:timeout], @options[:filter])
|
@@ -141,6 +143,8 @@ module MCollective
|
|
141
143
|
reqid = nil
|
142
144
|
|
143
145
|
begin
|
146
|
+
Log.debug("Publishing request to agent %s with timeout %d" % [agent, timeout])
|
147
|
+
|
144
148
|
Timeout.timeout(timeout) do
|
145
149
|
reqid = sendreq(body, agent, @options[:filter])
|
146
150
|
|
data/lib/mcollective/data.rb
CHANGED
@@ -44,15 +44,19 @@ module MCollective
|
|
44
44
|
|
45
45
|
raise DDLValidationError, "No dataquery has been defined in the DDL for data plugin #{name}" unless query
|
46
46
|
|
47
|
-
input = query
|
48
|
-
output = query
|
47
|
+
input = query.fetch(:input, {})
|
48
|
+
output = query.fetch(:output, {})
|
49
49
|
|
50
|
-
raise DDLValidationError, "No :query input has been defined in the DDL for data plugin #{name}" unless input[:query]
|
51
50
|
raise DDLValidationError, "No output has been defined in the DDL for data plugin #{name}" if output.keys.empty?
|
52
51
|
|
53
|
-
|
52
|
+
if input[:query]
|
53
|
+
return true if argument.nil? && input[:query][:optional]
|
54
54
|
|
55
|
-
|
55
|
+
ddl.validate_input_argument(input, :query, argument)
|
56
|
+
else
|
57
|
+
raise("No data plugin argument was declared in the %s DDL but an input was supplied" % name) if argument
|
58
|
+
return true
|
59
|
+
end
|
56
60
|
end
|
57
61
|
|
58
62
|
def self.ddl_has_output?(ddl, output)
|
@@ -19,7 +19,7 @@ module MCollective
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def []=(key, val)
|
22
|
-
raise "Can only store String, Integer, Float or Boolean data but got #{val.class} for key #{key}" unless [String, Fixnum, Float, TrueClass, FalseClass].include?(val.class)
|
22
|
+
raise "Can only store String, Integer, Float or Boolean data but got #{val.class} for key #{key}" unless [String, Fixnum, Bignum, Float, TrueClass, FalseClass].include?(val.class)
|
23
23
|
|
24
24
|
@data[key.to_sym] = val
|
25
25
|
end
|
data/lib/mcollective/ddl/base.rb
CHANGED
@@ -141,7 +141,7 @@ module MCollective
|
|
141
141
|
|
142
142
|
return true
|
143
143
|
rescue => e
|
144
|
-
raise DDLValidationError, "Cannot validate input: %s" % e.to_s
|
144
|
+
raise DDLValidationError, "Cannot validate input %s: %s" % [key, e.to_s]
|
145
145
|
end
|
146
146
|
|
147
147
|
# Registers an input argument for a given action
|
@@ -753,6 +753,7 @@ module MCollective
|
|
753
753
|
end
|
754
754
|
|
755
755
|
@stats.aggregate_summary = aggregate.summarize if aggregate
|
756
|
+
@stats.aggregate_failures = aggregate.failed if aggregate
|
756
757
|
else
|
757
758
|
@stderr.print("\nNo request sent, we did not discover any nodes.")
|
758
759
|
end
|
@@ -833,6 +834,7 @@ module MCollective
|
|
833
834
|
end
|
834
835
|
|
835
836
|
@stats.aggregate_summary = aggregate.summarize if aggregate
|
837
|
+
@stats.aggregate_failures = aggregate.failed if aggregate
|
836
838
|
@stats.client_stats = @client.stats
|
837
839
|
else
|
838
840
|
@stderr.print("\nNo request sent, we did not discover any nodes.")
|
@@ -4,7 +4,7 @@ module MCollective
|
|
4
4
|
class Stats
|
5
5
|
attr_accessor :noresponsefrom, :starttime, :discoverytime, :blocktime, :responses, :totaltime
|
6
6
|
attr_accessor :discovered, :discovered_nodes, :okcount, :failcount, :noresponsefrom, :responsesfrom
|
7
|
-
attr_accessor :requestid, :aggregate_summary, :ddl
|
7
|
+
attr_accessor :requestid, :aggregate_summary, :ddl, :aggregate_failures
|
8
8
|
|
9
9
|
def initialize
|
10
10
|
reset
|
@@ -26,6 +26,7 @@ module MCollective
|
|
26
26
|
@noresponsefrom = []
|
27
27
|
@requestid = nil
|
28
28
|
@aggregate_summary = []
|
29
|
+
@aggregate_failures = []
|
29
30
|
end
|
30
31
|
|
31
32
|
# returns a hash of our stats
|
@@ -42,7 +43,8 @@ module MCollective
|
|
42
43
|
:okcount => @okcount,
|
43
44
|
:requestid => @requestid,
|
44
45
|
:failcount => @failcount,
|
45
|
-
:aggregate_summary => @aggregate_summary
|
46
|
+
:aggregate_summary => @aggregate_summary,
|
47
|
+
:aggregate_failures => @aggregate_failures}
|
46
48
|
end
|
47
49
|
|
48
50
|
# Fake hash access to keep things backward compatible
|
@@ -143,18 +145,40 @@ module MCollective
|
|
143
145
|
display_as = output_item
|
144
146
|
end
|
145
147
|
|
146
|
-
|
148
|
+
if aggregate.is_a?(Aggregate::Result::Base)
|
149
|
+
aggregate_report = aggregate.to_s
|
150
|
+
else
|
151
|
+
next
|
152
|
+
end
|
147
153
|
|
148
154
|
result.puts Util.colorize(:bold, "Summary of %s:" % display_as)
|
149
155
|
result.puts
|
150
156
|
unless aggregate_report == ""
|
151
|
-
result.puts aggregate.to_s
|
157
|
+
result.puts aggregate.to_s.split("\n").map{|x| " " + x}.join("\n")
|
152
158
|
else
|
153
159
|
result.puts Util.colorize(:yellow, " No aggregate summary could be computed")
|
154
160
|
end
|
155
161
|
result.puts
|
156
162
|
end
|
157
163
|
|
164
|
+
@aggregate_failures.each do |failed|
|
165
|
+
case(failed[:type])
|
166
|
+
when :startup
|
167
|
+
message = "exception raised while processing startup hook"
|
168
|
+
when :create
|
169
|
+
message = "unspecified output '#{failed[:name]}' for the action"
|
170
|
+
when :process_result
|
171
|
+
message = "exception raised while processing result data"
|
172
|
+
when :summarize
|
173
|
+
message = "exception raised while summarizing"
|
174
|
+
end
|
175
|
+
|
176
|
+
result.puts Util.colorize(:bold, "Summary of %s:" % failed[:name])
|
177
|
+
result.puts
|
178
|
+
result.puts Util.colorize(:yellow, " Could not compute summary - %s" % message)
|
179
|
+
result.puts
|
180
|
+
end
|
181
|
+
|
158
182
|
result.string
|
159
183
|
end
|
160
184
|
|
@@ -190,7 +214,7 @@ module MCollective
|
|
190
214
|
if @discovered
|
191
215
|
@responses < @discovered ? color = :red : color = :green
|
192
216
|
|
193
|
-
if @aggregate_summary.size > 0 && summarize
|
217
|
+
if @aggregate_summary.size + @aggregate_failures.size > 0 && summarize
|
194
218
|
result_text << text_for_aggregates
|
195
219
|
else
|
196
220
|
result_text << ""
|
@@ -9,7 +9,7 @@ module MCollective
|
|
9
9
|
describe "#to_s" do
|
10
10
|
it "should return the correctly formatted string" do
|
11
11
|
result = CollectionResult.new({:output => [:test], :value => {"foo" => 3, "bar" => 2}}, "%s:%s", :action).to_s
|
12
|
-
result.should == "
|
12
|
+
result.should == "foo:3\nbar:2"
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
data/spec/unit/aggregate_spec.rb
CHANGED
@@ -6,30 +6,57 @@ module MCollective
|
|
6
6
|
describe Aggregate do
|
7
7
|
let(:ddl) do
|
8
8
|
{
|
9
|
-
:aggregate => [{:function => :func, :args=>[:
|
9
|
+
:aggregate => [{:function => :func, :args=>[:foo, {:format => "%s"}]}],
|
10
10
|
:action => "test_action",
|
11
11
|
:output => {:foo => nil, :bar => nil}
|
12
12
|
}
|
13
13
|
end
|
14
14
|
|
15
15
|
describe '#create_functions' do
|
16
|
-
|
17
|
-
Aggregate.any_instance.stubs(:contains_output?)
|
18
|
-
end
|
16
|
+
let(:function){mock}
|
19
17
|
|
20
18
|
it "should load all the functions with a format if defined" do
|
21
|
-
function
|
22
|
-
|
19
|
+
function.expects(:new).with(:foo, {}, "%s", 'test_action')
|
20
|
+
Aggregate.any_instance.expects(:contains_output?).returns(true)
|
23
21
|
Aggregate.any_instance.expects(:load_function).once.returns(function)
|
24
|
-
|
22
|
+
Aggregate.new(ddl)
|
25
23
|
end
|
26
24
|
|
27
25
|
it "should load all the functions without a format if it isn't defined" do
|
28
|
-
function
|
29
|
-
function.expects(:new).with(:value, [], nil, 'test_action')
|
26
|
+
function.expects(:new).with(:foo, {}, nil, 'test_action')
|
30
27
|
Aggregate.any_instance.expects(:load_function).once.returns(function)
|
31
|
-
ddl[:aggregate].first[:format] = nil
|
32
|
-
|
28
|
+
ddl[:aggregate].first[:args][1][:format] = nil
|
29
|
+
Aggregate.new(ddl)
|
30
|
+
end
|
31
|
+
|
32
|
+
it "should not summarize functions where the output is not specified in the ddl" do
|
33
|
+
invalid_ddl = { :aggregate => [{:function => :func, :args=>[:foo], :format => "%s"}, {:function => :func, :args=>[:fail], :format => "%s"}],
|
34
|
+
:action => "test_action",
|
35
|
+
:output => {:foo => nil, :bar => nil}}
|
36
|
+
|
37
|
+
function.stubs(:new).returns("function")
|
38
|
+
Aggregate.any_instance.stubs(:load_function).returns(function)
|
39
|
+
|
40
|
+
Log.expects(:error)
|
41
|
+
aggregate = Aggregate.new(invalid_ddl)
|
42
|
+
aggregate.functions.should == ["function"]
|
43
|
+
aggregate.failed.should == [{:type=>:create, :name=>:fail}]
|
44
|
+
end
|
45
|
+
|
46
|
+
it "should pass additional arguments if specified in the ddl" do
|
47
|
+
function.expects(:new).with(:foo, {:extra => "extra"}, "%s", 'test_action')
|
48
|
+
Aggregate.any_instance.expects(:load_function).once.returns(function)
|
49
|
+
ddl[:aggregate].first[:args][1][:extra] = "extra"
|
50
|
+
Aggregate.new(ddl)
|
51
|
+
end
|
52
|
+
|
53
|
+
it "should not summarize functions if the startup hook raises an exception" do
|
54
|
+
function.stubs(:new).raises("rspec")
|
55
|
+
Aggregate.any_instance.expects(:load_function).returns(function)
|
56
|
+
|
57
|
+
Log.expects(:error)
|
58
|
+
aggregate = Aggregate.new(ddl)
|
59
|
+
aggregate.failed.should == [{:type=>:startup, :name =>:foo }]
|
33
60
|
end
|
34
61
|
end
|
35
62
|
|
@@ -39,31 +66,51 @@ module MCollective
|
|
39
66
|
@aggregate = Aggregate.new(ddl)
|
40
67
|
end
|
41
68
|
|
42
|
-
it "should
|
43
|
-
|
44
|
-
|
45
|
-
}.to raise_error("'test_action' action does not contain output 'baz'")
|
69
|
+
it "should return false if the ddl output does not include the function's input" do
|
70
|
+
result = @aggregate.contains_output?(:baz)
|
71
|
+
result.should == false
|
46
72
|
end
|
47
73
|
|
48
|
-
it "should
|
49
|
-
@aggregate.contains_output?(:foo)
|
74
|
+
it "should return true if the ddl output includes the function's input" do
|
75
|
+
result = @aggregate.contains_output?(:foo)
|
76
|
+
result.should == true
|
50
77
|
end
|
51
78
|
end
|
52
79
|
|
53
80
|
describe '#call_functions' do
|
54
|
-
|
55
|
-
|
56
|
-
|
81
|
+
let(:aggregate){ Aggregate.new(ddl)}
|
82
|
+
let(:result){ RPC::Result.new("rspec", "rspec", :sender => "rspec", :statuscode => 0, :statusmsg => "rspec", :data => {:test => :result})}
|
83
|
+
let(:function) {mock}
|
57
84
|
|
58
|
-
|
85
|
+
before :each do
|
86
|
+
Aggregate.any_instance.stubs(:create_functions)
|
87
|
+
end
|
59
88
|
|
60
|
-
|
89
|
+
it "should call all of the functions" do
|
61
90
|
function.expects(:process_result).with(:result, result).once
|
62
91
|
function.expects(:output_name).returns(:test)
|
92
|
+
aggregate.functions = [function]
|
63
93
|
|
94
|
+
aggregate.call_functions(result)
|
95
|
+
end
|
96
|
+
|
97
|
+
it "should not fail if 'process_result' method raises an exception" do
|
64
98
|
aggregate.functions = [function]
|
99
|
+
function.stubs(:output_name).returns(:test)
|
100
|
+
function.stubs(:process_result).raises("Failed")
|
65
101
|
|
102
|
+
Log.expects(:error)
|
66
103
|
aggregate.call_functions(result)
|
104
|
+
aggregate.failed.should == [:name => :test, :type => :process_result]
|
105
|
+
end
|
106
|
+
|
107
|
+
it "should not fail if 'summarize' method raises en exception" do
|
108
|
+
function.stubs(:summarize).raises("Failed")
|
109
|
+
function.stubs(:output_name).returns("rspec")
|
110
|
+
aggregate.functions = [function]
|
111
|
+
|
112
|
+
Log.expects(:error)
|
113
|
+
result = aggregate.summarize
|
67
114
|
end
|
68
115
|
end
|
69
116
|
|
@@ -85,6 +132,19 @@ module MCollective
|
|
85
132
|
result = aggregate.summarize
|
86
133
|
result.should == [func2, func1]
|
87
134
|
end
|
135
|
+
|
136
|
+
it "should not summarise data that raises an exception" do
|
137
|
+
Aggregate.any_instance.stubs(:create_functions)
|
138
|
+
aggregate = Aggregate.new(ddl)
|
139
|
+
func = mock
|
140
|
+
func.stubs(:summarize).raises("rspec")
|
141
|
+
func.stubs(:output_name).returns("rspec")
|
142
|
+
aggregate.functions = [func]
|
143
|
+
Log.expects(:error)
|
144
|
+
|
145
|
+
aggregate.summarize
|
146
|
+
aggregate.failed.should == [{:name => "rspec", :type => :summarize}]
|
147
|
+
end
|
88
148
|
end
|
89
149
|
|
90
150
|
describe '#load_function' do
|
data/spec/unit/client_spec.rb
CHANGED
@@ -58,7 +58,7 @@ module MCollective
|
|
58
58
|
@client.expects(:sendreq).returns("823a3419a0975c3facbde121f72ab61f")
|
59
59
|
@client.expects(:receive).returns(reply)
|
60
60
|
|
61
|
-
@discoverer.
|
61
|
+
@discoverer.expects(:discovery_timeout).with(message.options[:timeout], message.options[:filter]).returns(0)
|
62
62
|
|
63
63
|
Time.stubs(:now).returns(Time.at(1340621250), Time.at(1340621251))
|
64
64
|
|
@@ -23,6 +23,10 @@ module MCollective
|
|
23
23
|
@result["rspec"] = "rspec value"
|
24
24
|
@result.instance_variable_get("@data").should == {:rspec => "rspec value"}
|
25
25
|
end
|
26
|
+
|
27
|
+
it "should only allow valid data types" do
|
28
|
+
expect { @result["rspec"] = Time.now }.to raise_error(/Can only store .+ data but got Time for key rspec/)
|
29
|
+
end
|
26
30
|
end
|
27
31
|
|
28
32
|
describe "#include" do
|
data/spec/unit/data_spec.rb
CHANGED
@@ -132,9 +132,14 @@ module MCollective
|
|
132
132
|
expect { Data.ddl_validate(@ddl, "rspec") }.to raise_error("No dataquery has been defined in the DDL for data plugin rspec test")
|
133
133
|
end
|
134
134
|
|
135
|
-
it "should
|
136
|
-
@ddl.expects(:entities).returns({:data => {:input => {}, :output => {}}})
|
137
|
-
|
135
|
+
it "should allow ddls without any input defined" do
|
136
|
+
@ddl.expects(:entities).returns({:data => {:input => {}, :output => {:x => {}}}})
|
137
|
+
Data.ddl_validate(@ddl, nil)
|
138
|
+
end
|
139
|
+
|
140
|
+
it "should not allow input arguments when no query were defined" do
|
141
|
+
@ddl.expects(:entities).returns({:data => {:input => {}, :output => {:x => {}}}})
|
142
|
+
expect { Data.ddl_validate(@ddl, "rspec") }.to raise_error("No data plugin argument was declared in the rspec test DDL but an input was supplied")
|
138
143
|
end
|
139
144
|
|
140
145
|
it "should ensure the ddl has output" do
|
data/spec/unit/ddl/base_spec.rb
CHANGED
@@ -65,7 +65,7 @@ module MCollective
|
|
65
65
|
|
66
66
|
expect {
|
67
67
|
@ddl.validate_input_argument(@ddl.entities[:string][:input], :string, 1)
|
68
|
-
}.to raise_error("Cannot validate input: value should be a string")
|
68
|
+
}.to raise_error("Cannot validate input string: value should be a string")
|
69
69
|
|
70
70
|
@ddl.validate_input_argument(@ddl.entities[:string][:input], :string, "1")
|
71
71
|
end
|
@@ -79,7 +79,7 @@ module MCollective
|
|
79
79
|
|
80
80
|
expect {
|
81
81
|
@ddl.validate_input_argument(@ddl.entities[:string][:input], :string, "too long")
|
82
|
-
}.to raise_error("Cannot validate input: Input string is longer than 1 character(s)")
|
82
|
+
}.to raise_error("Cannot validate input string: Input string is longer than 1 character(s)")
|
83
83
|
|
84
84
|
@ddl.validate_input_argument(@ddl.entities[:string][:input], :string, "1")
|
85
85
|
end
|
@@ -93,7 +93,7 @@ module MCollective
|
|
93
93
|
|
94
94
|
expect {
|
95
95
|
@ddl.validate_input_argument(@ddl.entities[:string][:input], :string, "doesnt validate")
|
96
|
-
}.to raise_error("Cannot validate input: value should match ^regex$")
|
96
|
+
}.to raise_error("Cannot validate input string: value should match ^regex$")
|
97
97
|
|
98
98
|
@ddl.validate_input_argument(@ddl.entities[:string][:input], :string, "regex")
|
99
99
|
end
|
@@ -106,7 +106,7 @@ module MCollective
|
|
106
106
|
|
107
107
|
expect {
|
108
108
|
@ddl.validate_input_argument(@ddl.entities[:list][:input], :list, 3)
|
109
|
-
}.to raise_error("Cannot validate input: value should be one of 1, 2")
|
109
|
+
}.to raise_error("Cannot validate input list: value should be one of 1, 2")
|
110
110
|
|
111
111
|
@ddl.validate_input_argument(@ddl.entities[:list][:input], :list, 1)
|
112
112
|
end
|
@@ -119,7 +119,7 @@ module MCollective
|
|
119
119
|
|
120
120
|
expect {
|
121
121
|
@ddl.validate_input_argument(@ddl.entities[:bool][:input], :bool, 3)
|
122
|
-
}.to raise_error("Cannot validate input: value should be a boolean")
|
122
|
+
}.to raise_error("Cannot validate input bool: value should be a boolean")
|
123
123
|
|
124
124
|
@ddl.validate_input_argument(@ddl.entities[:bool][:input], :bool, true)
|
125
125
|
@ddl.validate_input_argument(@ddl.entities[:bool][:input], :bool, false)
|
@@ -133,11 +133,11 @@ module MCollective
|
|
133
133
|
|
134
134
|
expect {
|
135
135
|
@ddl.validate_input_argument(@ddl.entities[:test][:input], :int, "1")
|
136
|
-
}.to raise_error("Cannot validate input: value should be a integer")
|
136
|
+
}.to raise_error("Cannot validate input int: value should be a integer")
|
137
137
|
|
138
138
|
expect {
|
139
139
|
@ddl.validate_input_argument(@ddl.entities[:test][:input], :int, 1.1)
|
140
|
-
}.to raise_error("Cannot validate input: value should be a integer")
|
140
|
+
}.to raise_error("Cannot validate input int: value should be a integer")
|
141
141
|
|
142
142
|
@ddl.validate_input_argument(@ddl.entities[:test][:input], :int, 1)
|
143
143
|
end
|
@@ -150,11 +150,11 @@ module MCollective
|
|
150
150
|
|
151
151
|
expect {
|
152
152
|
@ddl.validate_input_argument(@ddl.entities[:test][:input], :float, "1")
|
153
|
-
}.to raise_error("Cannot validate input: value should be a float")
|
153
|
+
}.to raise_error("Cannot validate input float: value should be a float")
|
154
154
|
|
155
155
|
expect {
|
156
156
|
@ddl.validate_input_argument(@ddl.entities[:test][:input], :float, 1)
|
157
|
-
}.to raise_error("Cannot validate input: value should be a float")
|
157
|
+
}.to raise_error("Cannot validate input float: value should be a float")
|
158
158
|
|
159
159
|
@ddl.validate_input_argument(@ddl.entities[:test][:input], :float, 1.1)
|
160
160
|
end
|
@@ -167,7 +167,7 @@ module MCollective
|
|
167
167
|
|
168
168
|
expect {
|
169
169
|
@ddl.validate_input_argument(@ddl.entities[:test][:input], :number, "1")
|
170
|
-
}.to raise_error("Cannot validate input: value should be a number")
|
170
|
+
}.to raise_error("Cannot validate input number: value should be a number")
|
171
171
|
|
172
172
|
@ddl.validate_input_argument(@ddl.entities[:test][:input], :number, 1)
|
173
173
|
@ddl.validate_input_argument(@ddl.entities[:test][:input], :number, 1.1)
|
@@ -39,6 +39,16 @@ module MCollective
|
|
39
39
|
sum.result[:value] = {"shrt" => 1, "long key" => 1}
|
40
40
|
sum.summarize.aggregate_format.should == "%8s = %s"
|
41
41
|
end
|
42
|
+
|
43
|
+
it "should calculate an attractive format when result type is not a string" do
|
44
|
+
sum1 = Summary.new(:test, [], nil, :test_action)
|
45
|
+
sum1.result[:value] = {true => 4, false => 5}
|
46
|
+
sum1.summarize.aggregate_format.should == "%5s = %s"
|
47
|
+
|
48
|
+
sum2 = Summary.new(:test, [], nil, :test_action)
|
49
|
+
sum2.result[:value] = {1 => 1, 10 => 2}
|
50
|
+
sum2.summarize.aggregate_format.should == "%2s = %s"
|
51
|
+
end
|
42
52
|
end
|
43
53
|
end
|
44
54
|
end
|
data/spec/unit/rpc/stats_spec.rb
CHANGED
@@ -17,6 +17,7 @@ module MCollective
|
|
17
17
|
:starttime => 1300031826.0,
|
18
18
|
:requestid => nil,
|
19
19
|
:aggregate_summary => [],
|
20
|
+
:aggregate_failures => [],
|
20
21
|
:discovered_nodes => []}
|
21
22
|
|
22
23
|
@stats = Stats.new
|
@@ -283,6 +284,41 @@ module MCollective
|
|
283
284
|
@stats.no_response_report.should match(Regexp.new(/No response from.+bar\s+foo/m))
|
284
285
|
end
|
285
286
|
end
|
287
|
+
|
288
|
+
describe "#text_for_aggregates" do
|
289
|
+
let(:aggregate){mock()}
|
290
|
+
|
291
|
+
before :each do
|
292
|
+
aggregate.stubs(:result).returns({:output => "success"})
|
293
|
+
aggregate.stubs(:action).returns("action")
|
294
|
+
end
|
295
|
+
|
296
|
+
it "should create the correct output text for aggregate functions" do
|
297
|
+
@stats.aggregate_summary = [aggregate]
|
298
|
+
aggregate.stubs(:is_a?).returns(true)
|
299
|
+
@stats.text_for_aggregates.should =~ /Summary of.*/
|
300
|
+
end
|
301
|
+
|
302
|
+
it "should display an error message for a failed statup hook" do
|
303
|
+
@stats.aggregate_failures = [{:name => "rspec", :type => :startup}]
|
304
|
+
@stats.text_for_aggregates.should =~ /exception raised while processing startup hook/
|
305
|
+
end
|
306
|
+
|
307
|
+
it "should display an error message for an unspecified output" do
|
308
|
+
@stats.aggregate_failures = [{:name => "rspec", :type => :create}]
|
309
|
+
@stats.text_for_aggregates.should =~ /unspecified output 'rspec' for the action/
|
310
|
+
end
|
311
|
+
|
312
|
+
it "should display an error message for a failed process_result" do
|
313
|
+
@stats.aggregate_failures = [{:name => "rspec", :type => :process_result}]
|
314
|
+
@stats.text_for_aggregates.should =~ /exception raised while processing result data/
|
315
|
+
end
|
316
|
+
|
317
|
+
it "should display an error message for a failed summarize" do
|
318
|
+
@stats.aggregate_failures = [{:name => "rspec", :type => :summarize}]
|
319
|
+
@stats.text_for_aggregates.should =~ /exception raised while summarizing/
|
320
|
+
end
|
321
|
+
end
|
286
322
|
end
|
287
323
|
end
|
288
324
|
end
|
data/spec/unit/validator_spec.rb
CHANGED
metadata
CHANGED
@@ -1,384 +1,373 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: mcollective-client
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.2.1
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 2
|
8
|
-
- 2
|
9
|
-
- 0
|
10
|
-
version: 2.2.0
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- R.I.Pienaar
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-10-17 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: systemu
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
24
17
|
none: false
|
25
|
-
requirements:
|
26
|
-
- -
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
|
29
|
-
segments:
|
30
|
-
- 0
|
31
|
-
version: "0"
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
32
22
|
type: :runtime
|
33
|
-
version_requirements: *id001
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
|
-
name: json
|
36
23
|
prerelease: false
|
37
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: json
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
38
33
|
none: false
|
39
|
-
requirements:
|
40
|
-
- -
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
|
43
|
-
segments:
|
44
|
-
- 0
|
45
|
-
version: "0"
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
46
38
|
type: :runtime
|
47
|
-
version_requirements: *id002
|
48
|
-
- !ruby/object:Gem::Dependency
|
49
|
-
name: stomp
|
50
39
|
prerelease: false
|
51
|
-
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: stomp
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
52
49
|
none: false
|
53
|
-
requirements:
|
54
|
-
- -
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
|
57
|
-
segments:
|
58
|
-
- 0
|
59
|
-
version: "0"
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
60
54
|
type: :runtime
|
61
|
-
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
62
|
description: Client libraries for the mcollective Application Server
|
63
63
|
email: rip@puppetlabs.com
|
64
|
-
executables:
|
64
|
+
executables:
|
65
65
|
- mco
|
66
66
|
extensions: []
|
67
|
-
|
68
67
|
extra_rdoc_files: []
|
69
|
-
|
70
|
-
files:
|
68
|
+
files:
|
71
69
|
- bin/mc-call-agent
|
72
70
|
- bin/mco
|
73
|
-
- lib/mcollective/
|
74
|
-
- lib/mcollective/
|
75
|
-
- lib/mcollective/windows_daemon.rb
|
76
|
-
- lib/mcollective/vendor/require_vendored.rb
|
77
|
-
- lib/mcollective/shell.rb
|
78
|
-
- lib/mcollective/ssl.rb
|
71
|
+
- lib/mcollective/agent.rb
|
72
|
+
- lib/mcollective/agents.rb
|
79
73
|
- lib/mcollective/aggregate/base.rb
|
80
|
-
- lib/mcollective/aggregate/result/numeric_result.rb
|
81
74
|
- lib/mcollective/aggregate/result/base.rb
|
82
75
|
- lib/mcollective/aggregate/result/collection_result.rb
|
76
|
+
- lib/mcollective/aggregate/result/numeric_result.rb
|
83
77
|
- lib/mcollective/aggregate/result.rb
|
84
|
-
- lib/mcollective/
|
85
|
-
- lib/mcollective/facts/base.rb
|
78
|
+
- lib/mcollective/aggregate.rb
|
86
79
|
- lib/mcollective/application.rb
|
87
|
-
- lib/mcollective/
|
88
|
-
- lib/mcollective/
|
89
|
-
- lib/mcollective/
|
90
|
-
- lib/mcollective/
|
91
|
-
- lib/mcollective/
|
92
|
-
- lib/mcollective/
|
93
|
-
- lib/mcollective/
|
94
|
-
- lib/mcollective/
|
95
|
-
- lib/mcollective/
|
96
|
-
- lib/mcollective/rpc/actionrunner.rb
|
97
|
-
- lib/mcollective/rpc/audit.rb
|
98
|
-
- lib/mcollective/rpc/client.rb
|
99
|
-
- lib/mcollective/rpc/stats.rb
|
100
|
-
- lib/mcollective/log.rb
|
101
|
-
- lib/mcollective/pluginmanager.rb
|
102
|
-
- lib/mcollective/runnerstats.rb
|
103
|
-
- lib/mcollective/pluginpackager/agent_definition.rb
|
104
|
-
- lib/mcollective/pluginpackager/standard_definition.rb
|
105
|
-
- lib/mcollective/discovery.rb
|
106
|
-
- lib/mcollective/vendor.rb
|
107
|
-
- lib/mcollective/facts.rb
|
108
|
-
- lib/mcollective/logger.rb
|
109
|
-
- lib/mcollective/generators.rb
|
110
|
-
- lib/mcollective/ddl/base.rb
|
80
|
+
- lib/mcollective/applications.rb
|
81
|
+
- lib/mcollective/cache.rb
|
82
|
+
- lib/mcollective/client.rb
|
83
|
+
- lib/mcollective/config.rb
|
84
|
+
- lib/mcollective/connector/base.rb
|
85
|
+
- lib/mcollective/connector.rb
|
86
|
+
- lib/mcollective/data/base.rb
|
87
|
+
- lib/mcollective/data/result.rb
|
88
|
+
- lib/mcollective/data.rb
|
111
89
|
- lib/mcollective/ddl/agentddl.rb
|
112
|
-
- lib/mcollective/ddl/
|
90
|
+
- lib/mcollective/ddl/base.rb
|
113
91
|
- lib/mcollective/ddl/dataddl.rb
|
92
|
+
- lib/mcollective/ddl/discoveryddl.rb
|
114
93
|
- lib/mcollective/ddl/validatorddl.rb
|
115
|
-
- lib/mcollective/
|
116
|
-
- lib/mcollective/
|
117
|
-
- lib/mcollective/
|
118
|
-
- lib/mcollective/
|
94
|
+
- lib/mcollective/ddl.rb
|
95
|
+
- lib/mcollective/discovery.rb
|
96
|
+
- lib/mcollective/facts/base.rb
|
97
|
+
- lib/mcollective/facts.rb
|
98
|
+
- lib/mcollective/generators/agent_generator.rb
|
119
99
|
- lib/mcollective/generators/base.rb
|
100
|
+
- lib/mcollective/generators/data_generator.rb
|
101
|
+
- lib/mcollective/generators/templates/action_snippet.erb
|
120
102
|
- lib/mcollective/generators/templates/data_input_snippet.erb
|
121
103
|
- lib/mcollective/generators/templates/ddl.erb
|
122
|
-
- lib/mcollective/generators/templates/action_snippet.erb
|
123
104
|
- lib/mcollective/generators/templates/plugin.erb
|
124
|
-
- lib/mcollective/generators
|
125
|
-
- lib/mcollective/
|
126
|
-
- lib/mcollective/
|
127
|
-
- lib/mcollective/
|
128
|
-
- lib/mcollective/
|
105
|
+
- lib/mcollective/generators.rb
|
106
|
+
- lib/mcollective/log.rb
|
107
|
+
- lib/mcollective/logger/base.rb
|
108
|
+
- lib/mcollective/logger/console_logger.rb
|
109
|
+
- lib/mcollective/logger/file_logger.rb
|
110
|
+
- lib/mcollective/logger/syslog_logger.rb
|
111
|
+
- lib/mcollective/logger.rb
|
112
|
+
- lib/mcollective/matcher/parser.rb
|
113
|
+
- lib/mcollective/matcher/scanner.rb
|
114
|
+
- lib/mcollective/matcher.rb
|
115
|
+
- lib/mcollective/message.rb
|
116
|
+
- lib/mcollective/monkey_patches.rb
|
117
|
+
- lib/mcollective/optionparser.rb
|
118
|
+
- lib/mcollective/pluginmanager.rb
|
119
|
+
- lib/mcollective/pluginpackager/agent_definition.rb
|
120
|
+
- lib/mcollective/pluginpackager/standard_definition.rb
|
121
|
+
- lib/mcollective/pluginpackager.rb
|
129
122
|
- lib/mcollective/registration/base.rb
|
130
123
|
- lib/mcollective/registration.rb
|
131
|
-
- lib/mcollective/
|
132
|
-
- lib/mcollective/
|
133
|
-
- lib/mcollective/
|
134
|
-
- lib/mcollective/
|
135
|
-
- lib/mcollective/
|
136
|
-
- lib/mcollective/
|
137
|
-
- lib/mcollective/
|
138
|
-
- lib/mcollective/
|
139
|
-
- lib/mcollective/
|
124
|
+
- lib/mcollective/rpc/actionrunner.rb
|
125
|
+
- lib/mcollective/rpc/agent.rb
|
126
|
+
- lib/mcollective/rpc/audit.rb
|
127
|
+
- lib/mcollective/rpc/client.rb
|
128
|
+
- lib/mcollective/rpc/helpers.rb
|
129
|
+
- lib/mcollective/rpc/progress.rb
|
130
|
+
- lib/mcollective/rpc/reply.rb
|
131
|
+
- lib/mcollective/rpc/request.rb
|
132
|
+
- lib/mcollective/rpc/result.rb
|
133
|
+
- lib/mcollective/rpc/stats.rb
|
140
134
|
- lib/mcollective/rpc.rb
|
141
|
-
- lib/mcollective/
|
142
|
-
- lib/mcollective/
|
143
|
-
- lib/mcollective/matcher/parser.rb
|
144
|
-
- lib/mcollective/matcher/scanner.rb
|
145
|
-
- lib/mcollective/client.rb
|
135
|
+
- lib/mcollective/runnerstats.rb
|
136
|
+
- lib/mcollective/security/base.rb
|
146
137
|
- lib/mcollective/security.rb
|
138
|
+
- lib/mcollective/shell.rb
|
139
|
+
- lib/mcollective/ssl.rb
|
140
|
+
- lib/mcollective/unix_daemon.rb
|
147
141
|
- lib/mcollective/util.rb
|
142
|
+
- lib/mcollective/validator.rb
|
143
|
+
- lib/mcollective/vendor/require_vendored.rb
|
144
|
+
- lib/mcollective/vendor.rb
|
145
|
+
- lib/mcollective/windows_daemon.rb
|
148
146
|
- lib/mcollective.rb
|
149
|
-
- spec/spec.opts
|
150
|
-
- spec/fixtures/test-public.pem
|
151
147
|
- spec/fixtures/application/test.rb
|
152
|
-
- spec/fixtures/test-private.pem
|
153
148
|
- spec/fixtures/test-cert.pem
|
149
|
+
- spec/fixtures/test-private.pem
|
150
|
+
- spec/fixtures/test-public.pem
|
154
151
|
- spec/fixtures/util/1.in
|
155
|
-
- spec/fixtures/util/4.in
|
156
152
|
- spec/fixtures/util/1.out
|
157
|
-
- spec/fixtures/util/3.in
|
158
153
|
- spec/fixtures/util/2.in
|
159
154
|
- spec/fixtures/util/2.out
|
160
|
-
- spec/fixtures/util/
|
155
|
+
- spec/fixtures/util/3.in
|
161
156
|
- spec/fixtures/util/3.out
|
162
|
-
- spec/
|
163
|
-
- spec/
|
164
|
-
- spec/
|
157
|
+
- spec/fixtures/util/4.in
|
158
|
+
- spec/fixtures/util/4.out
|
159
|
+
- spec/monkey_patches/instance_variable_defined.rb
|
160
|
+
- spec/Rakefile
|
161
|
+
- spec/spec.opts
|
162
|
+
- spec/spec_helper.rb
|
163
|
+
- spec/unit/agents_spec.rb
|
165
164
|
- spec/unit/aggregate/base_spec.rb
|
166
165
|
- spec/unit/aggregate/result/base_spec.rb
|
167
|
-
- spec/unit/aggregate/result/numeric_result_spec.rb
|
168
166
|
- spec/unit/aggregate/result/collection_result_spec.rb
|
169
|
-
- spec/unit/
|
170
|
-
- spec/unit/
|
171
|
-
- spec/unit/
|
167
|
+
- spec/unit/aggregate/result/numeric_result_spec.rb
|
168
|
+
- spec/unit/aggregate_spec.rb
|
169
|
+
- spec/unit/application_spec.rb
|
170
|
+
- spec/unit/applications_spec.rb
|
172
171
|
- spec/unit/array_spec.rb
|
173
|
-
- spec/unit/rpc/reply_spec.rb
|
174
|
-
- spec/unit/rpc/client_spec.rb
|
175
|
-
- spec/unit/rpc/helpers_spec.rb
|
176
|
-
- spec/unit/rpc/request_spec.rb
|
177
|
-
- spec/unit/rpc/agent_spec.rb
|
178
|
-
- spec/unit/rpc/result_spec.rb
|
179
|
-
- spec/unit/rpc/actionrunner_spec.rb
|
180
|
-
- spec/unit/rpc/stats_spec.rb
|
181
|
-
- spec/unit/windows_daemon_spec.rb
|
182
172
|
- spec/unit/cache_spec.rb
|
183
|
-
- spec/unit/
|
184
|
-
- spec/unit/string_spec.rb
|
185
|
-
- spec/unit/pluginpackager/agent_definition_spec.rb
|
186
|
-
- spec/unit/pluginpackager/standard_definition_spec.rb
|
187
|
-
- spec/unit/ssl_spec.rb
|
173
|
+
- spec/unit/client_spec.rb
|
188
174
|
- spec/unit/config_spec.rb
|
189
|
-
- spec/unit/
|
190
|
-
- spec/unit/
|
191
|
-
- spec/unit/
|
175
|
+
- spec/unit/data/base_spec.rb
|
176
|
+
- spec/unit/data/result_spec.rb
|
177
|
+
- spec/unit/data_spec.rb
|
178
|
+
- spec/unit/ddl/agentddl_spec.rb
|
192
179
|
- spec/unit/ddl/base_spec.rb
|
193
180
|
- spec/unit/ddl/dataddl_spec.rb
|
194
|
-
- spec/unit/ddl/agentddl_spec.rb
|
195
181
|
- spec/unit/ddl/discoveryddl_spec.rb
|
196
|
-
- spec/unit/
|
197
|
-
- spec/unit/
|
198
|
-
- spec/unit/
|
182
|
+
- spec/unit/ddl_spec.rb
|
183
|
+
- spec/unit/discovery_spec.rb
|
184
|
+
- spec/unit/facts/base_spec.rb
|
185
|
+
- spec/unit/facts_spec.rb
|
199
186
|
- spec/unit/generators/agent_generator_spec.rb
|
200
|
-
- spec/unit/generators/snippets/agent_ddl
|
201
|
-
- spec/unit/generators/snippets/data_ddl
|
202
187
|
- spec/unit/generators/base_spec.rb
|
203
188
|
- spec/unit/generators/data_generator_spec.rb
|
204
|
-
- spec/unit/
|
189
|
+
- spec/unit/generators/snippets/agent_ddl
|
190
|
+
- spec/unit/generators/snippets/data_ddl
|
191
|
+
- spec/unit/log_spec.rb
|
192
|
+
- spec/unit/logger/base_spec.rb
|
193
|
+
- spec/unit/logger/console_logger_spec.rb
|
194
|
+
- spec/unit/logger/syslog_logger_spec.rb
|
195
|
+
- spec/unit/matcher/parser_spec.rb
|
196
|
+
- spec/unit/matcher/scanner_spec.rb
|
197
|
+
- spec/unit/matcher_spec.rb
|
198
|
+
- spec/unit/message_spec.rb
|
199
|
+
- spec/unit/optionparser_spec.rb
|
200
|
+
- spec/unit/pluginmanager_spec.rb
|
201
|
+
- spec/unit/pluginpackager/agent_definition_spec.rb
|
202
|
+
- spec/unit/pluginpackager/standard_definition_spec.rb
|
203
|
+
- spec/unit/pluginpackager_spec.rb
|
204
|
+
- spec/unit/plugins/mcollective/aggregate/average_spec.rb
|
205
|
+
- spec/unit/plugins/mcollective/aggregate/sum_spec.rb
|
206
|
+
- spec/unit/plugins/mcollective/aggregate/summary_spec.rb
|
205
207
|
- spec/unit/plugins/mcollective/connector/activemq_spec.rb
|
208
|
+
- spec/unit/plugins/mcollective/connector/rabbitmq_spec.rb
|
206
209
|
- spec/unit/plugins/mcollective/connector/stomp/eventlogger_spec.rb
|
207
210
|
- spec/unit/plugins/mcollective/connector/stomp_spec.rb
|
208
|
-
- spec/unit/plugins/mcollective/
|
209
|
-
- spec/unit/plugins/mcollective/
|
210
|
-
- spec/unit/plugins/mcollective/aggregate/summary_spec.rb
|
211
|
+
- spec/unit/plugins/mcollective/data/agent_data_spec.rb
|
212
|
+
- spec/unit/plugins/mcollective/data/fstat_data_spec.rb
|
211
213
|
- spec/unit/plugins/mcollective/discovery/flatfile_spec.rb
|
212
214
|
- spec/unit/plugins/mcollective/discovery/mc_spec.rb
|
213
215
|
- spec/unit/plugins/mcollective/packagers/debpackage_packager_spec.rb
|
214
216
|
- spec/unit/plugins/mcollective/packagers/ospackage_spec.rb
|
215
217
|
- spec/unit/plugins/mcollective/packagers/rpmpackage_packager_spec.rb
|
216
218
|
- spec/unit/plugins/mcollective/security/psk_spec.rb
|
217
|
-
- spec/unit/plugins/mcollective/
|
218
|
-
- spec/unit/plugins/mcollective/data/agent_data_spec.rb
|
219
|
-
- spec/unit/plugins/mcollective/validator/regex_validator_spec.rb
|
220
|
-
- spec/unit/plugins/mcollective/validator/shellsafe_validator_spec.rb
|
219
|
+
- spec/unit/plugins/mcollective/validator/array_validator_spec.rb
|
221
220
|
- spec/unit/plugins/mcollective/validator/ipv4address_validator_spec.rb
|
222
|
-
- spec/unit/plugins/mcollective/validator/typecheck_validator_spec.rb
|
223
221
|
- spec/unit/plugins/mcollective/validator/ipv6address_validator_spec.rb
|
224
|
-
- spec/unit/plugins/mcollective/validator/array_validator_spec.rb
|
225
222
|
- spec/unit/plugins/mcollective/validator/length_validator_spec.rb
|
226
|
-
- spec/unit/
|
223
|
+
- spec/unit/plugins/mcollective/validator/regex_validator_spec.rb
|
224
|
+
- spec/unit/plugins/mcollective/validator/shellsafe_validator_spec.rb
|
225
|
+
- spec/unit/plugins/mcollective/validator/typecheck_validator_spec.rb
|
227
226
|
- spec/unit/registration/base_spec.rb
|
228
|
-
- spec/unit/
|
229
|
-
- spec/unit/
|
230
|
-
- spec/unit/
|
231
|
-
- spec/unit/
|
227
|
+
- spec/unit/rpc/actionrunner_spec.rb
|
228
|
+
- spec/unit/rpc/agent_spec.rb
|
229
|
+
- spec/unit/rpc/client_spec.rb
|
230
|
+
- spec/unit/rpc/helpers_spec.rb
|
231
|
+
- spec/unit/rpc/reply_spec.rb
|
232
|
+
- spec/unit/rpc/request_spec.rb
|
233
|
+
- spec/unit/rpc/result_spec.rb
|
234
|
+
- spec/unit/rpc/stats_spec.rb
|
232
235
|
- spec/unit/rpc_spec.rb
|
233
|
-
- spec/unit/
|
234
|
-
- spec/unit/
|
235
|
-
- spec/unit/matcher_spec.rb
|
236
|
-
- spec/unit/log_spec.rb
|
237
|
-
- spec/unit/aggregate_spec.rb
|
238
|
-
- spec/unit/facts_spec.rb
|
236
|
+
- spec/unit/runnerstats_spec.rb
|
237
|
+
- spec/unit/security/base_spec.rb
|
239
238
|
- spec/unit/shell_spec.rb
|
240
|
-
- spec/unit/
|
241
|
-
- spec/unit/
|
242
|
-
- spec/unit/matcher/parser_spec.rb
|
243
|
-
- spec/unit/matcher/scanner_spec.rb
|
239
|
+
- spec/unit/ssl_spec.rb
|
240
|
+
- spec/unit/string_spec.rb
|
244
241
|
- spec/unit/symbol_spec.rb
|
242
|
+
- spec/unit/unix_daemon_spec.rb
|
245
243
|
- spec/unit/util_spec.rb
|
244
|
+
- spec/unit/validator_spec.rb
|
245
|
+
- spec/unit/vendor_spec.rb
|
246
|
+
- spec/unit/windows_daemon_spec.rb
|
246
247
|
- spec/windows_spec.opts
|
247
|
-
- spec/spec_helper.rb
|
248
|
-
- spec/monkey_patches/instance_variable_defined.rb
|
249
|
-
- spec/Rakefile
|
250
248
|
homepage: https://docs.puppetlabs.com/mcollective/
|
251
249
|
licenses: []
|
252
|
-
|
253
250
|
post_install_message:
|
254
251
|
rdoc_options: []
|
255
|
-
|
256
|
-
require_paths:
|
252
|
+
require_paths:
|
257
253
|
- lib
|
258
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
254
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
259
255
|
none: false
|
260
|
-
requirements:
|
261
|
-
- -
|
262
|
-
- !ruby/object:Gem::Version
|
263
|
-
|
264
|
-
|
265
|
-
- 0
|
266
|
-
version: "0"
|
267
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
256
|
+
requirements:
|
257
|
+
- - ! '>='
|
258
|
+
- !ruby/object:Gem::Version
|
259
|
+
version: '0'
|
260
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
268
261
|
none: false
|
269
|
-
requirements:
|
270
|
-
- -
|
271
|
-
- !ruby/object:Gem::Version
|
272
|
-
|
273
|
-
segments:
|
274
|
-
- 0
|
275
|
-
version: "0"
|
262
|
+
requirements:
|
263
|
+
- - ! '>='
|
264
|
+
- !ruby/object:Gem::Version
|
265
|
+
version: '0'
|
276
266
|
requirements: []
|
277
|
-
|
278
267
|
rubyforge_project:
|
279
|
-
rubygems_version: 1.8.
|
268
|
+
rubygems_version: 1.8.24
|
280
269
|
signing_key:
|
281
270
|
specification_version: 3
|
282
271
|
summary: Client libraries for The Marionette Collective
|
283
|
-
test_files:
|
284
|
-
- spec/spec.opts
|
285
|
-
- spec/fixtures/test-public.pem
|
272
|
+
test_files:
|
286
273
|
- spec/fixtures/application/test.rb
|
287
|
-
- spec/fixtures/test-private.pem
|
288
274
|
- spec/fixtures/test-cert.pem
|
275
|
+
- spec/fixtures/test-private.pem
|
276
|
+
- spec/fixtures/test-public.pem
|
289
277
|
- spec/fixtures/util/1.in
|
290
|
-
- spec/fixtures/util/4.in
|
291
278
|
- spec/fixtures/util/1.out
|
292
|
-
- spec/fixtures/util/3.in
|
293
279
|
- spec/fixtures/util/2.in
|
294
280
|
- spec/fixtures/util/2.out
|
295
|
-
- spec/fixtures/util/
|
281
|
+
- spec/fixtures/util/3.in
|
296
282
|
- spec/fixtures/util/3.out
|
297
|
-
- spec/
|
298
|
-
- spec/
|
299
|
-
- spec/
|
283
|
+
- spec/fixtures/util/4.in
|
284
|
+
- spec/fixtures/util/4.out
|
285
|
+
- spec/monkey_patches/instance_variable_defined.rb
|
286
|
+
- spec/Rakefile
|
287
|
+
- spec/spec.opts
|
288
|
+
- spec/spec_helper.rb
|
289
|
+
- spec/unit/agents_spec.rb
|
300
290
|
- spec/unit/aggregate/base_spec.rb
|
301
291
|
- spec/unit/aggregate/result/base_spec.rb
|
302
|
-
- spec/unit/aggregate/result/numeric_result_spec.rb
|
303
292
|
- spec/unit/aggregate/result/collection_result_spec.rb
|
304
|
-
- spec/unit/
|
305
|
-
- spec/unit/
|
306
|
-
- spec/unit/
|
293
|
+
- spec/unit/aggregate/result/numeric_result_spec.rb
|
294
|
+
- spec/unit/aggregate_spec.rb
|
295
|
+
- spec/unit/application_spec.rb
|
296
|
+
- spec/unit/applications_spec.rb
|
307
297
|
- spec/unit/array_spec.rb
|
308
|
-
- spec/unit/rpc/reply_spec.rb
|
309
|
-
- spec/unit/rpc/client_spec.rb
|
310
|
-
- spec/unit/rpc/helpers_spec.rb
|
311
|
-
- spec/unit/rpc/request_spec.rb
|
312
|
-
- spec/unit/rpc/agent_spec.rb
|
313
|
-
- spec/unit/rpc/result_spec.rb
|
314
|
-
- spec/unit/rpc/actionrunner_spec.rb
|
315
|
-
- spec/unit/rpc/stats_spec.rb
|
316
|
-
- spec/unit/windows_daemon_spec.rb
|
317
298
|
- spec/unit/cache_spec.rb
|
318
|
-
- spec/unit/
|
319
|
-
- spec/unit/string_spec.rb
|
320
|
-
- spec/unit/pluginpackager/agent_definition_spec.rb
|
321
|
-
- spec/unit/pluginpackager/standard_definition_spec.rb
|
322
|
-
- spec/unit/ssl_spec.rb
|
299
|
+
- spec/unit/client_spec.rb
|
323
300
|
- spec/unit/config_spec.rb
|
324
|
-
- spec/unit/
|
325
|
-
- spec/unit/
|
326
|
-
- spec/unit/
|
301
|
+
- spec/unit/data/base_spec.rb
|
302
|
+
- spec/unit/data/result_spec.rb
|
303
|
+
- spec/unit/data_spec.rb
|
304
|
+
- spec/unit/ddl/agentddl_spec.rb
|
327
305
|
- spec/unit/ddl/base_spec.rb
|
328
306
|
- spec/unit/ddl/dataddl_spec.rb
|
329
|
-
- spec/unit/ddl/agentddl_spec.rb
|
330
307
|
- spec/unit/ddl/discoveryddl_spec.rb
|
331
|
-
- spec/unit/
|
332
|
-
- spec/unit/
|
333
|
-
- spec/unit/
|
308
|
+
- spec/unit/ddl_spec.rb
|
309
|
+
- spec/unit/discovery_spec.rb
|
310
|
+
- spec/unit/facts/base_spec.rb
|
311
|
+
- spec/unit/facts_spec.rb
|
334
312
|
- spec/unit/generators/agent_generator_spec.rb
|
335
|
-
- spec/unit/generators/snippets/agent_ddl
|
336
|
-
- spec/unit/generators/snippets/data_ddl
|
337
313
|
- spec/unit/generators/base_spec.rb
|
338
314
|
- spec/unit/generators/data_generator_spec.rb
|
339
|
-
- spec/unit/
|
315
|
+
- spec/unit/generators/snippets/agent_ddl
|
316
|
+
- spec/unit/generators/snippets/data_ddl
|
317
|
+
- spec/unit/log_spec.rb
|
318
|
+
- spec/unit/logger/base_spec.rb
|
319
|
+
- spec/unit/logger/console_logger_spec.rb
|
320
|
+
- spec/unit/logger/syslog_logger_spec.rb
|
321
|
+
- spec/unit/matcher/parser_spec.rb
|
322
|
+
- spec/unit/matcher/scanner_spec.rb
|
323
|
+
- spec/unit/matcher_spec.rb
|
324
|
+
- spec/unit/message_spec.rb
|
325
|
+
- spec/unit/optionparser_spec.rb
|
326
|
+
- spec/unit/pluginmanager_spec.rb
|
327
|
+
- spec/unit/pluginpackager/agent_definition_spec.rb
|
328
|
+
- spec/unit/pluginpackager/standard_definition_spec.rb
|
329
|
+
- spec/unit/pluginpackager_spec.rb
|
330
|
+
- spec/unit/plugins/mcollective/aggregate/average_spec.rb
|
331
|
+
- spec/unit/plugins/mcollective/aggregate/sum_spec.rb
|
332
|
+
- spec/unit/plugins/mcollective/aggregate/summary_spec.rb
|
340
333
|
- spec/unit/plugins/mcollective/connector/activemq_spec.rb
|
334
|
+
- spec/unit/plugins/mcollective/connector/rabbitmq_spec.rb
|
341
335
|
- spec/unit/plugins/mcollective/connector/stomp/eventlogger_spec.rb
|
342
336
|
- spec/unit/plugins/mcollective/connector/stomp_spec.rb
|
343
|
-
- spec/unit/plugins/mcollective/
|
344
|
-
- spec/unit/plugins/mcollective/
|
345
|
-
- spec/unit/plugins/mcollective/aggregate/summary_spec.rb
|
337
|
+
- spec/unit/plugins/mcollective/data/agent_data_spec.rb
|
338
|
+
- spec/unit/plugins/mcollective/data/fstat_data_spec.rb
|
346
339
|
- spec/unit/plugins/mcollective/discovery/flatfile_spec.rb
|
347
340
|
- spec/unit/plugins/mcollective/discovery/mc_spec.rb
|
348
341
|
- spec/unit/plugins/mcollective/packagers/debpackage_packager_spec.rb
|
349
342
|
- spec/unit/plugins/mcollective/packagers/ospackage_spec.rb
|
350
343
|
- spec/unit/plugins/mcollective/packagers/rpmpackage_packager_spec.rb
|
351
344
|
- spec/unit/plugins/mcollective/security/psk_spec.rb
|
352
|
-
- spec/unit/plugins/mcollective/
|
353
|
-
- spec/unit/plugins/mcollective/data/agent_data_spec.rb
|
354
|
-
- spec/unit/plugins/mcollective/validator/regex_validator_spec.rb
|
355
|
-
- spec/unit/plugins/mcollective/validator/shellsafe_validator_spec.rb
|
345
|
+
- spec/unit/plugins/mcollective/validator/array_validator_spec.rb
|
356
346
|
- spec/unit/plugins/mcollective/validator/ipv4address_validator_spec.rb
|
357
|
-
- spec/unit/plugins/mcollective/validator/typecheck_validator_spec.rb
|
358
347
|
- spec/unit/plugins/mcollective/validator/ipv6address_validator_spec.rb
|
359
|
-
- spec/unit/plugins/mcollective/validator/array_validator_spec.rb
|
360
348
|
- spec/unit/plugins/mcollective/validator/length_validator_spec.rb
|
361
|
-
- spec/unit/
|
349
|
+
- spec/unit/plugins/mcollective/validator/regex_validator_spec.rb
|
350
|
+
- spec/unit/plugins/mcollective/validator/shellsafe_validator_spec.rb
|
351
|
+
- spec/unit/plugins/mcollective/validator/typecheck_validator_spec.rb
|
362
352
|
- spec/unit/registration/base_spec.rb
|
363
|
-
- spec/unit/
|
364
|
-
- spec/unit/
|
365
|
-
- spec/unit/
|
366
|
-
- spec/unit/
|
353
|
+
- spec/unit/rpc/actionrunner_spec.rb
|
354
|
+
- spec/unit/rpc/agent_spec.rb
|
355
|
+
- spec/unit/rpc/client_spec.rb
|
356
|
+
- spec/unit/rpc/helpers_spec.rb
|
357
|
+
- spec/unit/rpc/reply_spec.rb
|
358
|
+
- spec/unit/rpc/request_spec.rb
|
359
|
+
- spec/unit/rpc/result_spec.rb
|
360
|
+
- spec/unit/rpc/stats_spec.rb
|
367
361
|
- spec/unit/rpc_spec.rb
|
368
|
-
- spec/unit/
|
369
|
-
- spec/unit/
|
370
|
-
- spec/unit/matcher_spec.rb
|
371
|
-
- spec/unit/log_spec.rb
|
372
|
-
- spec/unit/aggregate_spec.rb
|
373
|
-
- spec/unit/facts_spec.rb
|
362
|
+
- spec/unit/runnerstats_spec.rb
|
363
|
+
- spec/unit/security/base_spec.rb
|
374
364
|
- spec/unit/shell_spec.rb
|
375
|
-
- spec/unit/
|
376
|
-
- spec/unit/
|
377
|
-
- spec/unit/matcher/parser_spec.rb
|
378
|
-
- spec/unit/matcher/scanner_spec.rb
|
365
|
+
- spec/unit/ssl_spec.rb
|
366
|
+
- spec/unit/string_spec.rb
|
379
367
|
- spec/unit/symbol_spec.rb
|
368
|
+
- spec/unit/unix_daemon_spec.rb
|
380
369
|
- spec/unit/util_spec.rb
|
370
|
+
- spec/unit/validator_spec.rb
|
371
|
+
- spec/unit/vendor_spec.rb
|
372
|
+
- spec/unit/windows_daemon_spec.rb
|
381
373
|
- spec/windows_spec.opts
|
382
|
-
- spec/spec_helper.rb
|
383
|
-
- spec/monkey_patches/instance_variable_defined.rb
|
384
|
-
- spec/Rakefile
|