choria-mcorpc-support 2.23.3 → 2.24.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +5 -5
  2. data/lib/mcollective.rb +3 -3
  3. data/lib/mcollective/agent/choria_provision.ddl +214 -0
  4. data/lib/mcollective/agent/choria_provision.json +272 -0
  5. data/lib/mcollective/agent/choria_util.ddl +226 -107
  6. data/lib/mcollective/agent/choria_util.json +125 -25
  7. data/lib/mcollective/agent/rpcutil.ddl +242 -183
  8. data/lib/mcollective/agent/rpcutil.json +53 -57
  9. data/lib/mcollective/agent/scout.ddl +1 -1
  10. data/lib/mcollective/agent/scout.json +108 -136
  11. data/lib/mcollective/application/find.rb +1 -1
  12. data/lib/mcollective/application/plugin.rb +8 -173
  13. data/lib/mcollective/client.rb +1 -1
  14. data/lib/mcollective/config.rb +145 -103
  15. data/lib/mcollective/ddl.rb +0 -1
  16. data/lib/mcollective/discovery.rb +11 -63
  17. data/lib/mcollective/discovery/broadcast.ddl +11 -0
  18. data/lib/mcollective/discovery/choria.ddl +6 -4
  19. data/lib/mcollective/discovery/delegate.ddl +13 -0
  20. data/lib/mcollective/discovery/delegate.rb +72 -0
  21. data/lib/mcollective/discovery/external.ddl +13 -0
  22. data/lib/mcollective/discovery/file.ddl +13 -0
  23. data/lib/mcollective/discovery/flatfile.ddl +7 -5
  24. data/lib/mcollective/discovery/inventory.ddl +13 -0
  25. data/lib/mcollective/discovery/mc.ddl +3 -3
  26. data/lib/mcollective/log.rb +1 -2
  27. data/lib/mcollective/optionparser.rb +1 -1
  28. data/lib/mcollective/pluginpackager/forge_packager.rb +1 -1
  29. data/lib/mcollective/rpc/client.rb +4 -2
  30. data/lib/mcollective/util.rb +2 -4
  31. data/lib/mcollective/util/choria.rb +14 -8
  32. data/lib/mcollective/util/tasks_support.rb +15 -2
  33. metadata +11 -29
  34. data/lib/mcollective/data.rb +0 -96
  35. data/lib/mcollective/data/agent_data.ddl +0 -22
  36. data/lib/mcollective/data/agent_data.rb +0 -17
  37. data/lib/mcollective/data/base.rb +0 -68
  38. data/lib/mcollective/data/bolt_task_data.ddl +0 -90
  39. data/lib/mcollective/data/bolt_task_data.rb +0 -32
  40. data/lib/mcollective/data/collective_data.ddl +0 -20
  41. data/lib/mcollective/data/collective_data.rb +0 -9
  42. data/lib/mcollective/data/fact_data.ddl +0 -28
  43. data/lib/mcollective/data/fact_data.rb +0 -55
  44. data/lib/mcollective/data/fstat_data.ddl +0 -89
  45. data/lib/mcollective/data/fstat_data.rb +0 -54
  46. data/lib/mcollective/data/result.rb +0 -50
  47. data/lib/mcollective/ddl/dataddl.rb +0 -56
  48. data/lib/mcollective/discovery/choria.rb +0 -223
  49. data/lib/mcollective/discovery/flatfile.rb +0 -47
  50. data/lib/mcollective/discovery/stdin.ddl +0 -11
  51. data/lib/mcollective/discovery/stdin.rb +0 -67
  52. data/lib/mcollective/generators.rb +0 -7
  53. data/lib/mcollective/generators/agent_generator.rb +0 -50
  54. data/lib/mcollective/generators/base.rb +0 -45
  55. data/lib/mcollective/generators/data_generator.rb +0 -50
  56. data/lib/mcollective/generators/templates/action_snippet.erb +0 -13
  57. data/lib/mcollective/generators/templates/data_input_snippet.erb +0 -7
  58. data/lib/mcollective/generators/templates/ddl.erb +0 -8
  59. data/lib/mcollective/generators/templates/plugin.erb +0 -7
@@ -1,224 +1,283 @@
1
- metadata :name => "rpcutil",
2
- :description => "General helpful actions that expose stats and internals to SimpleRPC clients",
3
- :author => "R.I.Pienaar <rip@devco.net>",
4
- :license => "Apache License, Version 2.0",
5
- :version => "0.19.0",
6
- :url => "https://choria.io/",
7
- :timeout => 2
8
-
9
- action "collective_info", :description => "Info about the main and sub collectives" do
10
- display :always
11
-
12
- output :main_collective,
13
- :description => "The main Collective",
14
- :display_as => "Main Collective"
15
-
16
- output :collectives,
17
- :description => "All Collectives",
18
- :display_as => "All Collectives"
19
-
20
- summarize do
21
- aggregate summary(:collectives)
22
- end
23
- end
1
+ metadata :name => "rpcutil",
2
+ :description => "Utility actions that expose information about the state of the running Server",
3
+ :author => "R.I.Pienaar <rip@devco.net>",
4
+ :license => "Apache-2.0",
5
+ :version => "0.22.0",
6
+ :url => "https://choria.io/",
7
+ :timeout => 2
24
8
 
25
- action "inventory", :description => "System Inventory" do
26
- display :always
27
9
 
28
- output :agents,
29
- :description => "List of agent names",
30
- :display_as => "Agents"
10
+ action "agent_inventory", :description => "Inventory of all agents on the server including versions, licenses and more" do
11
+ display :always
31
12
 
32
- output :facts,
33
- :description => "List of facts and values",
34
- :display_as => "Facts"
35
13
 
36
- output :classes,
37
- :description => "List of classes on the system",
38
- :display_as => "Classes"
39
14
 
40
- output :version,
41
- :description => "MCollective Version",
42
- :display_as => "Version"
15
+ output :agents,
16
+ :description => "List of agents on the server",
17
+ :type => "array",
18
+ :display_as => "Agents"
43
19
 
44
- output :main_collective,
45
- :description => "The main Collective",
46
- :display_as => "Main Collective"
20
+ end
47
21
 
48
- output :collectives,
49
- :description => "All Collectives",
50
- :display_as => "All Collectives"
22
+ action "collective_info", :description => "Info about the main and sub collectives that the server belongs to" do
23
+ display :always
51
24
 
52
- output :data_plugins,
53
- :description => "List of data plugin names",
54
- :display_as => "Data Plugins"
55
25
 
56
- output :machines,
57
- :description => "Autonomous Agents",
58
- :display_as => "Machines"
59
- end
60
26
 
61
- action "get_fact", :description => "Retrieve a single fact from the fact store" do
62
- display :always
63
-
64
- input :fact,
65
- :prompt => "The name of the fact",
66
- :description => "The fact to retrieve",
67
- :type => :string,
68
- :validation => '.+',
69
- :optional => false,
70
- :maxlength => 512
71
-
72
- output :fact,
73
- :description => "The name of the fact being returned",
74
- :display_as => "Fact"
75
-
76
- output :value,
77
- :description => "The value of the fact",
78
- :display_as => "Value"
79
-
80
- summarize do
81
- aggregate summary(:value)
82
- end
83
- end
27
+ output :collectives,
28
+ :description => "All Collectives",
29
+ :type => "array",
30
+ :display_as => "All Collectives"
84
31
 
85
- action "get_facts", :description => "Retrieve multiple facts from the fact store" do
86
- display :always
87
-
88
- input :facts,
89
- :prompt => "Comma-separated list of facts",
90
- :description => "Facts to retrieve",
91
- :type => :string,
92
- :validation => '^\s*[\w\.\-]+(\s*,\s*[\w\.\-]+)*$',
93
- :optional => false,
94
- :maxlength => 200
95
-
96
- output :values,
97
- :description => "List of values of the facts",
98
- :display_as => "Values"
32
+ output :main_collective,
33
+ :description => "The main Collective",
34
+ :type => "string",
35
+ :display_as => "Main Collective"
36
+
37
+ summarize do
38
+ aggregate summary(:collectives)
39
+ end
99
40
  end
100
41
 
101
42
  action "daemon_stats", :description => "Get statistics from the running daemon" do
102
- display :always
43
+ display :always
44
+
45
+
46
+
47
+ output :agents,
48
+ :description => "List of agents loaded",
49
+ :type => "array",
50
+ :display_as => "Agents"
51
+
52
+ output :configfile,
53
+ :description => "Config file used to start the daemon",
54
+ :type => "string",
55
+ :display_as => "Config File"
56
+
57
+ output :filtered,
58
+ :description => "Count of message that didn't pass filter checks",
59
+ :type => "integer",
60
+ :display_as => "Failed Filter"
61
+
62
+ output :passed,
63
+ :description => "Count of messages that passed filter checks",
64
+ :type => "integer",
65
+ :display_as => "Passed Filter"
66
+
67
+ output :pid,
68
+ :description => "Process ID of the Choria Server",
69
+ :type => "integer",
70
+ :display_as => "PID"
71
+
72
+ output :replies,
73
+ :description => "Count of replies sent back to clients",
74
+ :type => "integer",
75
+ :display_as => "Replies"
76
+
77
+ output :starttime,
78
+ :description => "Time the Choria Server started in unix seconds",
79
+ :type => "integer",
80
+ :display_as => "Start Time"
81
+
82
+ output :threads,
83
+ :description => "List of threads active in the Choria Server",
84
+ :type => "array",
85
+ :display_as => "Threads"
86
+
87
+ output :times,
88
+ :description => "Processor time consumed by the Choria Server",
89
+ :type => "hash",
90
+ :display_as => "Times"
91
+
92
+ output :total,
93
+ :description => "Count of messages received by the Choria Server",
94
+ :type => "integer",
95
+ :display_as => "Total Messages"
96
+
97
+ output :ttlexpired,
98
+ :description => "Count of messages that did pass TTL checks",
99
+ :type => "integer",
100
+ :display_as => "TTL Expired"
101
+
102
+ output :unvalidated,
103
+ :description => "Count of messages that failed security validation",
104
+ :type => "integer",
105
+ :display_as => "Failed Security"
106
+
107
+ output :validated,
108
+ :description => "Count of messages that passed security validation",
109
+ :type => "integer",
110
+ :display_as => "Security Validated"
111
+
112
+ output :version,
113
+ :description => "Choria Server Version",
114
+ :type => "string",
115
+ :display_as => "Version"
116
+
117
+ summarize do
118
+ aggregate summary(:version)
119
+ aggregate summary(:agents)
120
+ end
121
+ end
103
122
 
104
- output :threads,
105
- :description => "List of threads active in the daemon",
106
- :display_as => "Threads"
123
+ action "get_config_item", :description => "Get the active value of a specific config property" do
124
+ display :always
107
125
 
108
- output :agents,
109
- :description => "List of agents loaded",
110
- :display_as => "Agents"
126
+ input :item,
127
+ :prompt => "Configuration Item",
128
+ :description => "The item to retrieve from the server",
129
+ :type => :string,
130
+ :validation => '^.+$',
131
+ :maxlength => 120,
132
+ :optional => false
111
133
 
112
- output :pid,
113
- :description => "Process ID of the daemon",
114
- :display_as => "PID"
115
134
 
116
- output :times,
117
- :description => "Processor time consumed by the daemon",
118
- :display_as => "Times"
119
135
 
120
- output :validated,
121
- :description => "Messages that passed security validation",
122
- :display_as => "Security Validated"
123
136
 
124
- output :unvalidated,
125
- :description => "Messages that failed security validation",
126
- :display_as => "Failed Security"
137
+ output :item,
138
+ :description => "The config property being retrieved",
139
+ :type => "string",
140
+ :display_as => "Property"
127
141
 
128
- output :passed,
129
- :description => "Passed filter checks",
130
- :display_as => "Passed Filter"
142
+ output :value,
143
+ :description => "The value that is in use",
144
+ :display_as => "Value"
131
145
 
132
- output :filtered,
133
- :description => "Didn't pass filter checks",
134
- :display_as => "Failed Filter"
146
+ summarize do
147
+ aggregate summary(:value)
148
+ end
149
+ end
135
150
 
136
- output :starttime,
137
- :description => "Time the server started",
138
- :display_as => "Start Time"
151
+ action "get_data", :description => "Get data from a data plugin" do
152
+ display :always
139
153
 
140
- output :total,
141
- :description => "Total messages received",
142
- :display_as => "Total Messages"
154
+ input :query,
155
+ :prompt => "Query",
156
+ :description => "The query argument to supply to the data plugin",
157
+ :type => :string,
158
+ :validation => '^.+$',
159
+ :maxlength => 200,
160
+ :optional => true
143
161
 
144
- output :replies,
145
- :description => "Replies sent back to clients",
146
- :display_as => "Replies"
147
162
 
148
- output :configfile,
149
- :description => "Config file used to start the daemon",
150
- :display_as => "Config File"
163
+ input :source,
164
+ :prompt => "Data Source",
165
+ :description => "The data plugin to retrieve information from",
166
+ :type => :string,
167
+ :validation => '^\w+$',
168
+ :maxlength => 50,
169
+ :optional => false
170
+
151
171
 
152
- output :version,
153
- :description => "MCollective Version",
154
- :display_as => "Version"
155
172
 
156
- output :ttlexpired,
157
- :description => "Messages that did pass TTL checks",
158
- :display_as => "TTL Expired"
159
173
 
160
- summarize do
161
- aggregate summary(:version)
162
- aggregate summary(:agents)
163
- end
164
174
  end
165
175
 
166
- action "agent_inventory", :description => "Inventory of all agents on the server" do
167
- display :always
176
+ action "get_fact", :description => "Retrieve a single fact from the fact store" do
177
+ display :always
178
+
179
+ input :fact,
180
+ :prompt => "The name of the fact",
181
+ :description => "The fact to retrieve",
182
+ :type => :string,
183
+ :validation => '.+',
184
+ :maxlength => 512,
185
+ :optional => false
186
+
187
+
188
+
168
189
 
169
- output :agents,
170
- :description => "List of agents on the server",
171
- :display_as => "Agents"
190
+ output :fact,
191
+ :description => "The name of the fact being returned",
192
+ :type => "string",
193
+ :display_as => "Fact"
194
+
195
+ output :value,
196
+ :description => "The value of the fact",
197
+ :display_as => "Value"
198
+
199
+ summarize do
200
+ aggregate summary(:value)
201
+ end
172
202
  end
173
203
 
174
- action "get_config_item", :description => "Get the active value of a specific config property" do
175
- display :always
176
-
177
- input :item,
178
- :prompt => "Configuration Item",
179
- :description => "The item to retrieve from the server",
180
- :type => :string,
181
- :validation => '^.+$',
182
- :optional => false,
183
- :maxlength => 50
184
-
185
- output :item,
186
- :description => "The config property being retrieved",
187
- :display_as => "Property"
188
-
189
- output :value,
190
- :description => "The value that is in use",
191
- :display_as => "Value"
192
-
193
- summarize do
194
- aggregate summary(:value)
195
- end
204
+ action "get_facts", :description => "Retrieve multiple facts from the fact store" do
205
+ display :always
206
+
207
+ input :facts,
208
+ :prompt => "Comma-separated list of facts to retrieve",
209
+ :description => "Facts to retrieve",
210
+ :type => :string,
211
+ :validation => '^\s*[\w\.\-]+(\s*,\s*[\w\.\-]+)*$',
212
+ :maxlength => 200,
213
+ :optional => false
214
+
215
+
216
+
217
+
218
+ output :values,
219
+ :description => "List of values of the facts",
220
+ :type => "hash",
221
+ :display_as => "Values"
222
+
196
223
  end
197
224
 
198
- action "get_data", :description => "Get data from a data plugin" do
199
- display :always
200
-
201
- input :source,
202
- :prompt => "Data Source",
203
- :description => "The data plugin to retrieve information from",
204
- :type => :string,
205
- :validation => '^\w+$',
206
- :optional => false,
207
- :maxlength => 50
208
-
209
- input :query,
210
- :prompt => "Query",
211
- :description => "The query argument to supply to the data plugin",
212
- :type => :string,
213
- :validation => '^.+$',
214
- :optional => true,
215
- :maxlength => 200
225
+ action "inventory", :description => "System Inventory" do
226
+ display :always
227
+
228
+
229
+
230
+ output :agents,
231
+ :description => "List of agent names",
232
+ :type => "array",
233
+ :display_as => "Agents"
234
+
235
+ output :classes,
236
+ :description => "List of classes on the system",
237
+ :type => "array",
238
+ :display_as => "Classes"
239
+
240
+ output :collectives,
241
+ :description => "All Collectives",
242
+ :type => "array",
243
+ :display_as => "All Collectives"
244
+
245
+ output :data_plugins,
246
+ :description => "List of data plugin names",
247
+ :type => "array",
248
+ :display_as => "Data Plugins"
249
+
250
+ output :facts,
251
+ :description => "List of facts and values",
252
+ :type => "hash",
253
+ :display_as => "Facts"
254
+
255
+ output :machines,
256
+ :description => "Autonomous Agents",
257
+ :type => "hash",
258
+ :display_as => "Machines"
259
+
260
+ output :main_collective,
261
+ :description => "The main Collective",
262
+ :type => "string",
263
+ :display_as => "Main Collective"
264
+
265
+ output :version,
266
+ :description => "Choria Server Version",
267
+ :type => "string",
268
+ :display_as => "Version"
269
+
216
270
  end
217
271
 
218
272
  action "ping", :description => "Responds to requests for PING with PONG" do
219
- display :always
273
+ display :always
274
+
275
+
276
+
277
+ output :pong,
278
+ :description => "The local Unix timestamp",
279
+ :type => "string",
280
+ :display_as => "Timestamp"
220
281
 
221
- output :pong,
222
- :description => "The local timestamp",
223
- :display_as => "Timestamp"
224
282
  end
283
+