mcollective-client 1.3.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of mcollective-client might be problematic. Click here for more details.
- data/bin/mc-call-agent +54 -0
- data/bin/mco +27 -0
- data/lib/mcollective.rb +70 -0
- data/lib/mcollective/agents.rb +160 -0
- data/lib/mcollective/application.rb +354 -0
- data/lib/mcollective/applications.rb +145 -0
- data/lib/mcollective/client.rb +292 -0
- data/lib/mcollective/config.rb +202 -0
- data/lib/mcollective/connector.rb +18 -0
- data/lib/mcollective/connector/base.rb +24 -0
- data/lib/mcollective/facts.rb +39 -0
- data/lib/mcollective/facts/base.rb +86 -0
- data/lib/mcollective/log.rb +103 -0
- data/lib/mcollective/logger.rb +5 -0
- data/lib/mcollective/logger/base.rb +73 -0
- data/lib/mcollective/logger/console_logger.rb +61 -0
- data/lib/mcollective/logger/file_logger.rb +46 -0
- data/lib/mcollective/logger/syslog_logger.rb +53 -0
- data/lib/mcollective/matcher.rb +16 -0
- data/lib/mcollective/matcher/parser.rb +93 -0
- data/lib/mcollective/matcher/scanner.rb +123 -0
- data/lib/mcollective/message.rb +201 -0
- data/lib/mcollective/monkey_patches.rb +104 -0
- data/lib/mcollective/optionparser.rb +164 -0
- data/lib/mcollective/pluginmanager.rb +180 -0
- data/lib/mcollective/pluginpackager.rb +26 -0
- data/lib/mcollective/pluginpackager/agent_definition.rb +79 -0
- data/lib/mcollective/pluginpackager/standard_definition.rb +59 -0
- data/lib/mcollective/registration.rb +16 -0
- data/lib/mcollective/registration/base.rb +75 -0
- data/lib/mcollective/rpc.rb +188 -0
- data/lib/mcollective/rpc/actionrunner.rb +142 -0
- data/lib/mcollective/rpc/agent.rb +441 -0
- data/lib/mcollective/rpc/audit.rb +38 -0
- data/lib/mcollective/rpc/client.rb +793 -0
- data/lib/mcollective/rpc/ddl.rb +258 -0
- data/lib/mcollective/rpc/helpers.rb +339 -0
- data/lib/mcollective/rpc/progress.rb +63 -0
- data/lib/mcollective/rpc/reply.rb +61 -0
- data/lib/mcollective/rpc/request.rb +51 -0
- data/lib/mcollective/rpc/result.rb +41 -0
- data/lib/mcollective/rpc/stats.rb +185 -0
- data/lib/mcollective/runnerstats.rb +90 -0
- data/lib/mcollective/security.rb +26 -0
- data/lib/mcollective/security/base.rb +237 -0
- data/lib/mcollective/shell.rb +87 -0
- data/lib/mcollective/ssl.rb +246 -0
- data/lib/mcollective/unix_daemon.rb +37 -0
- data/lib/mcollective/util.rb +274 -0
- data/lib/mcollective/vendor.rb +41 -0
- data/lib/mcollective/vendor/require_vendored.rb +2 -0
- data/lib/mcollective/windows_daemon.rb +25 -0
- data/spec/Rakefile +16 -0
- data/spec/fixtures/application/test.rb +7 -0
- data/spec/fixtures/test-cert.pem +15 -0
- data/spec/fixtures/test-private.pem +15 -0
- data/spec/fixtures/test-public.pem +6 -0
- data/spec/monkey_patches/instance_variable_defined.rb +7 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +25 -0
- data/spec/unit/agents_spec.rb +280 -0
- data/spec/unit/application_spec.rb +636 -0
- data/spec/unit/applications_spec.rb +155 -0
- data/spec/unit/array.rb +30 -0
- data/spec/unit/config_spec.rb +148 -0
- data/spec/unit/facts/base_spec.rb +118 -0
- data/spec/unit/facts_spec.rb +39 -0
- data/spec/unit/log_spec.rb +71 -0
- data/spec/unit/logger/base_spec.rb +110 -0
- data/spec/unit/logger/syslog_logger_spec.rb +86 -0
- data/spec/unit/matcher/parser_spec.rb +106 -0
- data/spec/unit/matcher/scanner_spec.rb +71 -0
- data/spec/unit/message_spec.rb +401 -0
- data/spec/unit/optionparser_spec.rb +113 -0
- data/spec/unit/pluginmanager_spec.rb +173 -0
- data/spec/unit/pluginpackager/agent_definition_spec.rb +130 -0
- data/spec/unit/pluginpackager/standard_definition_spec.rb +75 -0
- data/spec/unit/plugins/mcollective/connector/activemq_spec.rb +533 -0
- data/spec/unit/plugins/mcollective/connector/stomp/eventlogger_spec.rb +34 -0
- data/spec/unit/plugins/mcollective/connector/stomp_spec.rb +417 -0
- data/spec/unit/plugins/mcollective/packagers/ospackage_spec.rb +229 -0
- data/spec/unit/plugins/mcollective/security/psk_spec.rb +156 -0
- data/spec/unit/registration/base_spec.rb +77 -0
- data/spec/unit/rpc/actionrunner_spec.rb +213 -0
- data/spec/unit/rpc/agent_spec.rb +155 -0
- data/spec/unit/rpc/client_spec.rb +523 -0
- data/spec/unit/rpc/ddl_spec.rb +388 -0
- data/spec/unit/rpc/helpers_spec.rb +55 -0
- data/spec/unit/rpc/reply_spec.rb +143 -0
- data/spec/unit/rpc/request_spec.rb +115 -0
- data/spec/unit/rpc/result_spec.rb +66 -0
- data/spec/unit/rpc/stats_spec.rb +288 -0
- data/spec/unit/runnerstats_spec.rb +40 -0
- data/spec/unit/security/base_spec.rb +279 -0
- data/spec/unit/shell_spec.rb +144 -0
- data/spec/unit/ssl_spec.rb +244 -0
- data/spec/unit/symbol.rb +11 -0
- data/spec/unit/unix_daemon.rb +41 -0
- data/spec/unit/util_spec.rb +342 -0
- data/spec/unit/vendor_spec.rb +34 -0
- data/spec/unit/windows_daemon.rb +43 -0
- data/spec/windows_spec.opts +1 -0
- metadata +242 -0
@@ -0,0 +1,34 @@
|
|
1
|
+
#!/usr/bin/env rspec
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
module MCollective
|
6
|
+
describe Vendor do
|
7
|
+
describe "#vendor_dir" do
|
8
|
+
it "should return correct vendor directory" do
|
9
|
+
specdir = File.dirname(__FILE__)
|
10
|
+
expected_dir = File.expand_path("#{specdir}/../../lib/mcollective/vendor")
|
11
|
+
Vendor.vendor_dir.should == expected_dir
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
describe "#load_entry" do
|
16
|
+
it "should attempt to load the correct path" do
|
17
|
+
specdir = File.dirname(__FILE__)
|
18
|
+
expected_dir = File.expand_path("#{specdir}/../../lib/mcollective/vendor")
|
19
|
+
|
20
|
+
Class.any_instance.stubs("load").with("#{expected_dir}/foo").once
|
21
|
+
|
22
|
+
Vendor.load_entry("foo")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
describe "#require_libs" do
|
27
|
+
it "should require the vendor loader" do
|
28
|
+
Class.any_instance.stubs("require").with("mcollective/vendor/require_vendored").once
|
29
|
+
|
30
|
+
Vendor.require_libs
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
#!/usr/bin/env rspec
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
module MCollective
|
6
|
+
if Util.windows?
|
7
|
+
require 'mcollective/windows_daemon'
|
8
|
+
|
9
|
+
describe WindowsDaemon do
|
10
|
+
describe "#daemonize_runner" do
|
11
|
+
it "should only run on the windows platform" do
|
12
|
+
Util.expects("windows?").returns(false)
|
13
|
+
expect { WindowsDaemon.daemonize_runner }.to raise_error("The Windows Daemonizer should only be used on the Windows Platform")
|
14
|
+
end
|
15
|
+
|
16
|
+
it "should not support writing pid files" do
|
17
|
+
expect { WindowsDaemon.daemonize_runner(true) }.to raise_error("Writing pid files are not supported on the Windows Platform")
|
18
|
+
end
|
19
|
+
|
20
|
+
it "should start the mainloop" do
|
21
|
+
WindowsDaemon.expects(:mainloop)
|
22
|
+
WindowsDaemon.daemonize_runner
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
describe "#service_stop" do
|
27
|
+
it "should disconnect and exit" do
|
28
|
+
Log.expects(:info)
|
29
|
+
|
30
|
+
connector = mock
|
31
|
+
connector.expects(:disconnect).once
|
32
|
+
|
33
|
+
PluginManager.expects("[]").with("connector_plugin").returns(connector)
|
34
|
+
|
35
|
+
d = WindowsDaemon.new
|
36
|
+
d.expects("exit!").once
|
37
|
+
|
38
|
+
d.service_stop
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
--format s --backtrace
|
metadata
ADDED
@@ -0,0 +1,242 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mcollective-client
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 3
|
9
|
+
- 3
|
10
|
+
version: 1.3.3
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- R.I.Pienaar
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2012-04-05 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: systemu
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 3
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
version: "0"
|
32
|
+
type: :runtime
|
33
|
+
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: json
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
+
none: false
|
39
|
+
requirements:
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
hash: 3
|
43
|
+
segments:
|
44
|
+
- 0
|
45
|
+
version: "0"
|
46
|
+
type: :runtime
|
47
|
+
version_requirements: *id002
|
48
|
+
description: Client tools for the mcollective Application Server
|
49
|
+
email: rip@puppetlabs.com
|
50
|
+
executables:
|
51
|
+
- mco
|
52
|
+
extensions: []
|
53
|
+
|
54
|
+
extra_rdoc_files: []
|
55
|
+
|
56
|
+
files:
|
57
|
+
- bin/mc-call-agent
|
58
|
+
- bin/mco
|
59
|
+
- lib/mcollective/connector/base.rb
|
60
|
+
- lib/mcollective/windows_daemon.rb
|
61
|
+
- lib/mcollective/vendor/require_vendored.rb
|
62
|
+
- lib/mcollective/shell.rb
|
63
|
+
- lib/mcollective/ssl.rb
|
64
|
+
- lib/mcollective/facts/base.rb
|
65
|
+
- lib/mcollective/application.rb
|
66
|
+
- lib/mcollective/message.rb
|
67
|
+
- lib/mcollective/monkey_patches.rb
|
68
|
+
- lib/mcollective/agents.rb
|
69
|
+
- lib/mcollective/rpc/agent.rb
|
70
|
+
- lib/mcollective/rpc/request.rb
|
71
|
+
- lib/mcollective/rpc/reply.rb
|
72
|
+
- lib/mcollective/rpc/progress.rb
|
73
|
+
- lib/mcollective/rpc/ddl.rb
|
74
|
+
- lib/mcollective/rpc/result.rb
|
75
|
+
- lib/mcollective/rpc/helpers.rb
|
76
|
+
- lib/mcollective/rpc/actionrunner.rb
|
77
|
+
- lib/mcollective/rpc/audit.rb
|
78
|
+
- lib/mcollective/rpc/client.rb
|
79
|
+
- lib/mcollective/rpc/stats.rb
|
80
|
+
- lib/mcollective/log.rb
|
81
|
+
- lib/mcollective/pluginmanager.rb
|
82
|
+
- lib/mcollective/runnerstats.rb
|
83
|
+
- lib/mcollective/pluginpackager/agent_definition.rb
|
84
|
+
- lib/mcollective/pluginpackager/standard_definition.rb
|
85
|
+
- lib/mcollective/vendor.rb
|
86
|
+
- lib/mcollective/facts.rb
|
87
|
+
- lib/mcollective/logger.rb
|
88
|
+
- lib/mcollective/logger/file_logger.rb
|
89
|
+
- lib/mcollective/logger/console_logger.rb
|
90
|
+
- lib/mcollective/logger/base.rb
|
91
|
+
- lib/mcollective/logger/syslog_logger.rb
|
92
|
+
- lib/mcollective/config.rb
|
93
|
+
- lib/mcollective/connector.rb
|
94
|
+
- lib/mcollective/registration/base.rb
|
95
|
+
- lib/mcollective/registration.rb
|
96
|
+
- lib/mcollective/applications.rb
|
97
|
+
- lib/mcollective/pluginpackager.rb
|
98
|
+
- lib/mcollective/security/base.rb
|
99
|
+
- lib/mcollective/matcher.rb
|
100
|
+
- lib/mcollective/unix_daemon.rb
|
101
|
+
- lib/mcollective/rpc.rb
|
102
|
+
- lib/mcollective/optionparser.rb
|
103
|
+
- lib/mcollective/matcher/parser.rb
|
104
|
+
- lib/mcollective/matcher/scanner.rb
|
105
|
+
- lib/mcollective/client.rb
|
106
|
+
- lib/mcollective/security.rb
|
107
|
+
- lib/mcollective/util.rb
|
108
|
+
- lib/mcollective.rb
|
109
|
+
- spec/spec.opts
|
110
|
+
- spec/fixtures/test-public.pem
|
111
|
+
- spec/fixtures/application/test.rb
|
112
|
+
- spec/fixtures/test-private.pem
|
113
|
+
- spec/fixtures/test-cert.pem
|
114
|
+
- spec/unit/windows_daemon.rb
|
115
|
+
- spec/unit/application_spec.rb
|
116
|
+
- spec/unit/facts/base_spec.rb
|
117
|
+
- spec/unit/rpc/reply_spec.rb
|
118
|
+
- spec/unit/rpc/ddl_spec.rb
|
119
|
+
- spec/unit/rpc/client_spec.rb
|
120
|
+
- spec/unit/rpc/helpers_spec.rb
|
121
|
+
- spec/unit/rpc/request_spec.rb
|
122
|
+
- spec/unit/rpc/agent_spec.rb
|
123
|
+
- spec/unit/rpc/result_spec.rb
|
124
|
+
- spec/unit/rpc/actionrunner_spec.rb
|
125
|
+
- spec/unit/rpc/stats_spec.rb
|
126
|
+
- spec/unit/optionparser_spec.rb
|
127
|
+
- spec/unit/pluginpackager/agent_definition_spec.rb
|
128
|
+
- spec/unit/pluginpackager/standard_definition_spec.rb
|
129
|
+
- spec/unit/ssl_spec.rb
|
130
|
+
- spec/unit/config_spec.rb
|
131
|
+
- spec/unit/applications_spec.rb
|
132
|
+
- spec/unit/runnerstats_spec.rb
|
133
|
+
- spec/unit/logger/base_spec.rb
|
134
|
+
- spec/unit/logger/syslog_logger_spec.rb
|
135
|
+
- spec/unit/plugins/mcollective/connector/activemq_spec.rb
|
136
|
+
- spec/unit/plugins/mcollective/connector/stomp/eventlogger_spec.rb
|
137
|
+
- spec/unit/plugins/mcollective/connector/stomp_spec.rb
|
138
|
+
- spec/unit/plugins/mcollective/packagers/ospackage_spec.rb
|
139
|
+
- spec/unit/plugins/mcollective/security/psk_spec.rb
|
140
|
+
- spec/unit/registration/base_spec.rb
|
141
|
+
- spec/unit/symbol.rb
|
142
|
+
- spec/unit/agents_spec.rb
|
143
|
+
- spec/unit/security/base_spec.rb
|
144
|
+
- spec/unit/array.rb
|
145
|
+
- spec/unit/vendor_spec.rb
|
146
|
+
- spec/unit/unix_daemon.rb
|
147
|
+
- spec/unit/message_spec.rb
|
148
|
+
- spec/unit/log_spec.rb
|
149
|
+
- spec/unit/facts_spec.rb
|
150
|
+
- spec/unit/shell_spec.rb
|
151
|
+
- spec/unit/pluginmanager_spec.rb
|
152
|
+
- spec/unit/matcher/parser_spec.rb
|
153
|
+
- spec/unit/matcher/scanner_spec.rb
|
154
|
+
- spec/unit/util_spec.rb
|
155
|
+
- spec/windows_spec.opts
|
156
|
+
- spec/spec_helper.rb
|
157
|
+
- spec/monkey_patches/instance_variable_defined.rb
|
158
|
+
- spec/Rakefile
|
159
|
+
homepage: https://docs.puppetlabs.com/mcollective/
|
160
|
+
licenses: []
|
161
|
+
|
162
|
+
post_install_message:
|
163
|
+
rdoc_options: []
|
164
|
+
|
165
|
+
require_paths:
|
166
|
+
- lib
|
167
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
168
|
+
none: false
|
169
|
+
requirements:
|
170
|
+
- - ">="
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
hash: 3
|
173
|
+
segments:
|
174
|
+
- 0
|
175
|
+
version: "0"
|
176
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
177
|
+
none: false
|
178
|
+
requirements:
|
179
|
+
- - ">="
|
180
|
+
- !ruby/object:Gem::Version
|
181
|
+
hash: 3
|
182
|
+
segments:
|
183
|
+
- 0
|
184
|
+
version: "0"
|
185
|
+
requirements: []
|
186
|
+
|
187
|
+
rubyforge_project:
|
188
|
+
rubygems_version: 1.8.11
|
189
|
+
signing_key:
|
190
|
+
specification_version: 3
|
191
|
+
summary: Client for The Marionette Collective
|
192
|
+
test_files:
|
193
|
+
- spec/spec.opts
|
194
|
+
- spec/fixtures/test-public.pem
|
195
|
+
- spec/fixtures/application/test.rb
|
196
|
+
- spec/fixtures/test-private.pem
|
197
|
+
- spec/fixtures/test-cert.pem
|
198
|
+
- spec/unit/windows_daemon.rb
|
199
|
+
- spec/unit/application_spec.rb
|
200
|
+
- spec/unit/facts/base_spec.rb
|
201
|
+
- spec/unit/rpc/reply_spec.rb
|
202
|
+
- spec/unit/rpc/ddl_spec.rb
|
203
|
+
- spec/unit/rpc/client_spec.rb
|
204
|
+
- spec/unit/rpc/helpers_spec.rb
|
205
|
+
- spec/unit/rpc/request_spec.rb
|
206
|
+
- spec/unit/rpc/agent_spec.rb
|
207
|
+
- spec/unit/rpc/result_spec.rb
|
208
|
+
- spec/unit/rpc/actionrunner_spec.rb
|
209
|
+
- spec/unit/rpc/stats_spec.rb
|
210
|
+
- spec/unit/optionparser_spec.rb
|
211
|
+
- spec/unit/pluginpackager/agent_definition_spec.rb
|
212
|
+
- spec/unit/pluginpackager/standard_definition_spec.rb
|
213
|
+
- spec/unit/ssl_spec.rb
|
214
|
+
- spec/unit/config_spec.rb
|
215
|
+
- spec/unit/applications_spec.rb
|
216
|
+
- spec/unit/runnerstats_spec.rb
|
217
|
+
- spec/unit/logger/base_spec.rb
|
218
|
+
- spec/unit/logger/syslog_logger_spec.rb
|
219
|
+
- spec/unit/plugins/mcollective/connector/activemq_spec.rb
|
220
|
+
- spec/unit/plugins/mcollective/connector/stomp/eventlogger_spec.rb
|
221
|
+
- spec/unit/plugins/mcollective/connector/stomp_spec.rb
|
222
|
+
- spec/unit/plugins/mcollective/packagers/ospackage_spec.rb
|
223
|
+
- spec/unit/plugins/mcollective/security/psk_spec.rb
|
224
|
+
- spec/unit/registration/base_spec.rb
|
225
|
+
- spec/unit/symbol.rb
|
226
|
+
- spec/unit/agents_spec.rb
|
227
|
+
- spec/unit/security/base_spec.rb
|
228
|
+
- spec/unit/array.rb
|
229
|
+
- spec/unit/vendor_spec.rb
|
230
|
+
- spec/unit/unix_daemon.rb
|
231
|
+
- spec/unit/message_spec.rb
|
232
|
+
- spec/unit/log_spec.rb
|
233
|
+
- spec/unit/facts_spec.rb
|
234
|
+
- spec/unit/shell_spec.rb
|
235
|
+
- spec/unit/pluginmanager_spec.rb
|
236
|
+
- spec/unit/matcher/parser_spec.rb
|
237
|
+
- spec/unit/matcher/scanner_spec.rb
|
238
|
+
- spec/unit/util_spec.rb
|
239
|
+
- spec/windows_spec.opts
|
240
|
+
- spec/spec_helper.rb
|
241
|
+
- spec/monkey_patches/instance_variable_defined.rb
|
242
|
+
- spec/Rakefile
|