choria-mcorpc-support 2.24.1 → 2.24.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 56d418c1be77553ab3139e83deb55a7e0c765e0772ef7774da3f4e3a8150757b
4
- data.tar.gz: 1b4a31f0f2abf0e567c72549f0dc602b4a9e80021aa4f53528c24fbb2bca8ece
3
+ metadata.gz: 8c9b96995926bcb736c4d7340f1e35c82673db5ce74de15443a79fba36873a2a
4
+ data.tar.gz: f00bd913097f164271403440750015b73041d61b54712dadc728f0b56859d9c9
5
5
  SHA512:
6
- metadata.gz: 607d333a8a2e2b274686ffd68915cf3dafd133e515ea6441bdd13d5d5fe17f934a979990de3c8f3bc4046ba7c56fb0ace7da7a5991ab54f5ef564505680cb70e
7
- data.tar.gz: 4673c0ff851b1f09fc0b480b8a7f1ae610e7f329ad444d6e41a88d76bd36724a843b3bdbad23cc47ff8570602383b629677dd51a2e465b4e37ae9afbd8fbd4fc
6
+ metadata.gz: 996376fe60e4d07d576f18900fb17c062888e467dc04354b58665d7f16ac55dbd44a778146d70e517ea4e5c5ba11cc3437a83ac83644ff9493fcb3c48cc5fece
7
+ data.tar.gz: 217bcb3d3b7ec754dcb0756c68d68ec539546b44f084191b5abd47a21628b1029deabe118ab356db34a5727565734d34bf74c15d4c518a9fcc8109a066442fab
@@ -1,152 +1,251 @@
1
- metadata :name => "choria_util",
2
- :description => "Choria Utilities",
3
- :author => "R.I.Pienaar <rip@devco.net>",
4
- :license => "Apache-2.0",
5
- :version => "0.19.0",
6
- :url => "https://choria.io",
7
- :timeout => 2
1
+ metadata :name => "choria_util",
2
+ :description => "Choria Utilities",
3
+ :author => "R.I.Pienaar <rip@devco.net>",
4
+ :license => "Apache-2.0",
5
+ :version => "0.19.0",
6
+ :url => "https://choria.io",
7
+ :timeout => 2
8
8
 
9
- requires :mcollective => "2.9.0"
10
9
 
11
- action "machine_transition", :description => "Attempts to force a transition in a hosted Choria Autonomous Agent" do
10
+ action "info", :description => "Choria related information from the running Daemon and Middleware" do
11
+ display :failed
12
+
13
+
14
+
15
+ output :choria_version,
16
+ :description => "Choria version",
17
+ :display_as => "Choria Version"
18
+
19
+ output :client_flavour,
20
+ :description => "Middleware client gem flavour",
21
+ :display_as => "Middleware Client Flavour"
22
+
23
+ output :client_options,
24
+ :description => "Active Middleware client gem options",
25
+ :display_as => "Middleware Client Options"
26
+
27
+ output :client_stats,
28
+ :description => "Middleware client gem statistics",
29
+ :display_as => "Middleware Client Stats"
30
+
31
+ output :client_version,
32
+ :description => "Middleware client library version",
33
+ :display_as => "Middleware Client Library Version"
34
+
35
+ output :connected_server,
36
+ :description => "Connected middleware server",
37
+ :display_as => "Connected Broker"
38
+
39
+ output :connector,
40
+ :description => "Connector plugin",
41
+ :display_as => "Connector"
42
+
43
+ output :connector_tls,
44
+ :description => "If the connector is running with TLS security enabled",
45
+ :display_as => "Connector TLS"
46
+
47
+ output :facter_command,
48
+ :description => "Command used for Facter",
49
+ :display_as => "Facter"
50
+
51
+ output :facter_domain,
52
+ :description => "Facter domain",
53
+ :display_as => "Facter Domain"
54
+
55
+ output :middleware_servers,
56
+ :description => "Middleware Servers configured or discovered",
57
+ :display_as => "Middleware"
58
+
59
+ output :path,
60
+ :description => "Active OS PATH",
61
+ :display_as => "Path"
62
+
63
+ output :secure_protocol,
64
+ :description => "If the protocol is running with PKI security enabled",
65
+ :display_as => "Protocol Secure"
66
+
67
+ output :security,
68
+ :description => "Security Provider plugin",
69
+ :display_as => "Security Provider"
70
+
71
+ output :srv_domain,
72
+ :description => "Configured SRV domain",
73
+ :display_as => "SRV Domain"
74
+
75
+ output :using_srv,
76
+ :description => "Indicates if SRV records are considered",
77
+ :display_as => "SRV Used"
78
+
79
+ summarize do
80
+ aggregate summary(:choria_version)
81
+ aggregate summary(:client_version)
82
+ aggregate summary(:client_flavour)
83
+ aggregate summary(:connected_server)
84
+ aggregate summary(:srv_domain)
85
+ aggregate summary(:using_srv)
86
+ aggregate summary(:secure_protocol)
87
+ aggregate summary(:connector_tls)
88
+ end
89
+ end
90
+
91
+ action "machine_state", :description => "Retrieves the current state of a specific Choria Autonomous Agent" do
92
+ display :ok
93
+
12
94
  input :instance,
13
- :prompt => "Instance ID",
95
+ :prompt => "Instance ID",
14
96
  :description => "Machine Instance ID",
15
- :type => :string,
16
- :validation => '^.+-.+-.+-.+-.+$',
17
- :maxlength => 36,
18
- :optional => true
97
+ :type => :string,
98
+ :validation => '^.+-.+-.+-.+-.+$',
99
+ :maxlength => 36,
100
+ :optional => true
19
101
 
20
- input :version,
21
- :prompt => "Version",
22
- :description => "Machine Version",
23
- :type => :string,
24
- :validation => '^\d+\.\d+\.\d+$',
25
- :maxlength => 20,
26
- :optional => true
27
102
 
28
103
  input :name,
29
- :prompt => "Name",
104
+ :prompt => "Name",
30
105
  :description => "Machine Name",
31
- :type => :string,
32
- :validation => '^[a-zA-Z][a-zA-Z0-9_-]+',
33
- :maxlength => 128,
34
- :optional => true
106
+ :type => :string,
107
+ :validation => '^[a-zA-Z][a-zA-Z0-9_-]+',
108
+ :maxlength => 128,
109
+ :optional => true
110
+
35
111
 
36
112
  input :path,
37
- :prompt => "Path",
113
+ :prompt => "Path",
38
114
  :description => "Machine Path",
39
- :type => :string,
40
- :validation => '.+',
41
- :maxlength => 512,
42
- :optional => true
115
+ :type => :string,
116
+ :validation => '.+',
117
+ :maxlength => 512,
118
+ :optional => true
43
119
 
44
- input :transition,
45
- :prompt => "Transition Name",
46
- :description => "The transition event to send to the machine",
47
- :type => :string,
48
- :validation => '^[a-zA-Z][a-zA-Z0-9_-]+$',
49
- :maxlength => 128,
50
- :optional => false
51
120
 
52
- output :success,
53
- :description => "Indicates if the transition was successfully accepted",
54
- :display_as => "Accepted"
121
+
122
+
123
+ output :available_transitions,
124
+ :description => "The list of available transitions this autonomous agent can make",
125
+ :type => "array",
126
+ :display_as => "Available Transitions"
127
+
128
+ output :current_state,
129
+ :description => "The Choria Scout specific state for Scout checks",
130
+ :display_as => "Scout State"
131
+
132
+ output :id,
133
+ :description => "The unique running ID of the autonomous agent",
134
+ :type => "string",
135
+ :display_as => "ID"
136
+
137
+ output :name,
138
+ :description => "The name of the autonomous agent",
139
+ :type => "string",
140
+ :display_as => "Name"
141
+
142
+ output :path,
143
+ :description => "The location on disk where the autonomous agent is stored",
144
+ :type => "string",
145
+ :display_as => "Path"
146
+
147
+ output :scout,
148
+ :description => "True when this autonomous agent represents a Choria Scout Check",
149
+ :type => "boolean",
150
+ :display_as => "Scout Check"
151
+
152
+ output :start_time,
153
+ :description => "The time the autonomous agent was started in unix seconds",
154
+ :type => "string",
155
+ :display_as => "Started"
156
+
157
+ output :state,
158
+ :description => "The current state the agent is in",
159
+ :type => "string",
160
+ :display_as => "State"
161
+
162
+ output :version,
163
+ :description => "The version of the autonomous agent",
164
+ :type => "string",
165
+ :display_as => "Version"
166
+
167
+ summarize do
168
+ aggregate summary(:state)
169
+ aggregate summary(:name)
170
+ aggregate summary(:version)
171
+ end
55
172
  end
56
173
 
57
174
  action "machine_states", :description => "States of the hosted Choria Autonomous Agents" do
58
175
  display :always
59
176
 
60
- output :machine_names,
61
- :description => "List of running machine names",
62
- :display_as => "Machine Names"
177
+
63
178
 
64
179
  output :machine_ids,
65
180
  :description => "List of running machine IDs",
66
- :display_as => "Machine IDs"
181
+ :display_as => "Machine IDs"
182
+
183
+ output :machine_names,
184
+ :description => "List of running machine names",
185
+ :display_as => "Machine Names"
67
186
 
68
187
  output :states,
69
188
  :description => "Hash map of machine statusses indexed by machine ID",
70
- :display_as => "Machine States"
189
+ :display_as => "Machine States"
71
190
 
72
191
  summarize do
73
192
  aggregate summary(:machine_names)
74
193
  end
75
194
  end
76
195
 
77
- action "info", :description => "Choria related information from the running Daemon and Middleware" do
78
- output :security,
79
- :description => "Security Provider plugin",
80
- :display_as => "Security Provider"
81
-
82
- output :secure_protocol,
83
- :description => "If the protocol is running with PKI security enabled",
84
- :display_as => "Protocol Secure"
85
-
86
- output :connector,
87
- :description => "Connector plugin",
88
- :display_as => "Connector"
196
+ action "machine_transition", :description => "Attempts to force a transition in a hosted Choria Autonomous Agent" do
197
+ display :failed
89
198
 
90
- output :connector_tls,
91
- :description => "If the connector is running with TLS security enabled",
92
- :display_as => "Connector TLS"
199
+ input :instance,
200
+ :prompt => "Instance ID",
201
+ :description => "Machine Instance ID",
202
+ :type => :string,
203
+ :validation => '^.+-.+-.+-.+-.+$',
204
+ :maxlength => 36,
205
+ :optional => true
93
206
 
94
- output :path,
95
- :description => "Active OS PATH",
96
- :display_as => "Path"
97
207
 
98
- output :choria_version,
99
- :description => "Choria version",
100
- :display_as => "Choria Version"
208
+ input :name,
209
+ :prompt => "Name",
210
+ :description => "Machine Name",
211
+ :type => :string,
212
+ :validation => '^[a-zA-Z][a-zA-Z0-9_-]+',
213
+ :maxlength => 128,
214
+ :optional => true
101
215
 
102
- output :client_version,
103
- :description => "Middleware client library version",
104
- :display_as => "Middleware Client Library Version"
105
216
 
106
- output :client_flavour,
107
- :description => "Middleware client gem flavour",
108
- :display_as => "Middleware Client Flavour"
217
+ input :path,
218
+ :prompt => "Path",
219
+ :description => "Machine Path",
220
+ :type => :string,
221
+ :validation => '.+',
222
+ :maxlength => 512,
223
+ :optional => true
109
224
 
110
- output :client_options,
111
- :description => "Active Middleware client gem options",
112
- :display_as => "Middleware Client Options"
113
225
 
114
- output :connected_server,
115
- :description => "Connected middleware server",
116
- :display_as => "Connected Broker"
226
+ input :transition,
227
+ :prompt => "Transition Name",
228
+ :description => "The transition event to send to the machine",
229
+ :type => :string,
230
+ :validation => '^[a-zA-Z][a-zA-Z0-9_-]+$',
231
+ :maxlength => 128,
232
+ :optional => false
117
233
 
118
- output :client_stats,
119
- :description => "Middleware client gem statistics",
120
- :display_as => "Middleware Client Stats"
121
234
 
122
- output :facter_domain,
123
- :description => "Facter domain",
124
- :display_as => "Facter Domain"
235
+ input :version,
236
+ :prompt => "Version",
237
+ :description => "Machine Version",
238
+ :type => :string,
239
+ :validation => '^\d+\.\d+\.\d+$',
240
+ :maxlength => 20,
241
+ :optional => true
125
242
 
126
- output :facter_command,
127
- :description => "Command used for Facter",
128
- :display_as => "Facter"
129
243
 
130
- output :srv_domain,
131
- :description => "Configured SRV domain",
132
- :display_as => "SRV Domain"
133
244
 
134
- output :using_srv,
135
- :description => "Indicates if SRV records are considered",
136
- :display_as => "SRV Used"
137
245
 
138
- output :middleware_servers,
139
- :description => "Middleware Servers configured or discovered",
140
- :display_as => "Middleware"
246
+ output :success,
247
+ :description => "Indicates if the transition was successfully accepted",
248
+ :display_as => "Accepted"
141
249
 
142
- summarize do
143
- aggregate summary(:choria_version)
144
- aggregate summary(:client_version)
145
- aggregate summary(:client_flavour)
146
- aggregate summary(:connected_server)
147
- aggregate summary(:srv_domain)
148
- aggregate summary(:using_srv)
149
- aggregate summary(:secure_protocol)
150
- aggregate summary(:connector_tls)
151
- end
152
250
  end
251
+
@@ -149,6 +149,106 @@
149
149
  }
150
150
  ]
151
151
  },
152
+ {
153
+ "action": "machine_state",
154
+ "description": "Retrieves the current state of a specific Choria Autonomous Agent",
155
+ "display": "ok",
156
+ "input": {
157
+ "instance": {
158
+ "prompt": "Instance ID",
159
+ "description": "Machine Instance ID",
160
+ "type": "string",
161
+ "default": null,
162
+ "optional": true,
163
+ "validation": "^.+-.+-.+-.+-.+$",
164
+ "maxlength": 36
165
+ },
166
+ "name": {
167
+ "prompt": "Name",
168
+ "description": "Machine Name",
169
+ "type": "string",
170
+ "default": null,
171
+ "optional": true,
172
+ "validation": "^[a-zA-Z][a-zA-Z0-9_-]+",
173
+ "maxlength": 128
174
+ },
175
+ "path": {
176
+ "prompt": "Path",
177
+ "description": "Machine Path",
178
+ "type": "string",
179
+ "default": null,
180
+ "optional": true,
181
+ "validation": ".+",
182
+ "maxlength": 512
183
+ }
184
+ },
185
+ "aggregate": [
186
+ {
187
+ "function": "summary",
188
+ "args": [
189
+ "state"
190
+ ]
191
+ },
192
+ {
193
+ "function": "summary",
194
+ "args": [
195
+ "name"
196
+ ]
197
+ },
198
+ {
199
+ "function": "summary",
200
+ "args": [
201
+ "version"
202
+ ]
203
+ }
204
+ ],
205
+ "output": {
206
+ "name": {
207
+ "type": "string",
208
+ "description": "The name of the autonomous agent",
209
+ "display_as": "Name"
210
+ },
211
+ "version": {
212
+ "type": "string",
213
+ "description": "The version of the autonomous agent",
214
+ "display_as": "Version"
215
+ },
216
+ "state": {
217
+ "type": "string",
218
+ "description": "The current state the agent is in",
219
+ "display_as": "State"
220
+ },
221
+ "path": {
222
+ "type": "string",
223
+ "description": "The location on disk where the autonomous agent is stored",
224
+ "display_as": "Path"
225
+ },
226
+ "id": {
227
+ "type": "string",
228
+ "description": "The unique running ID of the autonomous agent",
229
+ "display_as": "ID"
230
+ },
231
+ "start_time": {
232
+ "type": "string",
233
+ "description": "The time the autonomous agent was started in unix seconds",
234
+ "display_as": "Started"
235
+ },
236
+ "available_transitions": {
237
+ "type": "array",
238
+ "description": "The list of available transitions this autonomous agent can make",
239
+ "display_as": "Available Transitions"
240
+ },
241
+ "scout": {
242
+ "type": "boolean",
243
+ "description": "True when this autonomous agent represents a Choria Scout Check",
244
+ "display_as": "Scout Check"
245
+ },
246
+ "current_state": {
247
+ "description": "The Choria Scout specific state for Scout checks",
248
+ "display_as": "Scout State"
249
+ }
250
+ }
251
+ },
152
252
  {
153
253
  "action": "machine_states",
154
254
  "input": {
@@ -241,4 +341,4 @@
241
341
  "description": "Attempts to force a transition in a hosted Choria Autonomous Agent"
242
342
  }
243
343
  ]
244
- }
344
+ }
@@ -308,8 +308,7 @@
308
308
  },
309
309
  "machines": {
310
310
  "description": "Autonomous Agents",
311
- "display_as": "Machines",
312
- "default": null
311
+ "display_as": "Machines"
313
312
  }
314
313
  },
315
314
  "display": "always",
@@ -330,4 +329,4 @@
330
329
  "description": "Responds to requests for PING with PONG"
331
330
  }
332
331
  ]
333
- }
332
+ }
@@ -1,122 +1,58 @@
1
1
  {
2
2
  "$schema": "https://choria.io/schemas/mcorpc/ddl/v1/agent.json",
3
3
  "metadata": {
4
- "name": "scout",
5
- "description": "Choria Scout Agent Management API",
6
- "author": "R.I.Pienaar <rip@devco.net>",
7
4
  "license": "Apache-2.0",
5
+ "author": "R.I.Pienaar <rip@devco.net>",
6
+ "timeout": 5,
7
+ "name": "scout",
8
8
  "version": "0.0.1",
9
9
  "url": "https://choria.io",
10
- "provider": "golang",
11
- "timeout": 5
10
+ "description": "Choria Scout Agent Management API",
11
+ "provider": "golang"
12
12
  },
13
13
  "actions": [
14
14
  {
15
15
  "action": "checks",
16
- "input": {
17
- },
16
+ "display": "ok",
17
+ "description": "Obtain a list of checks and their current status",
18
+ "input": {},
18
19
  "output": {
19
20
  "checks": {
20
21
  "description": "Details about each check",
21
- "display_as": "Checks",
22
- "default": null,
23
- "type": "array"
22
+ "type": "array",
23
+ "display_as": "Checks"
24
24
  }
25
- },
26
- "display": "ok",
27
- "description": "Obtain a list of checks and their current status"
25
+ }
28
26
  },
29
27
  {
30
- "action": "goss_validate",
28
+ "action": "resume",
31
29
  "input": {
32
- "file": {
33
- "prompt": "Goss File",
34
- "description": "Path to the Goss validation specification",
35
- "type": "string",
36
- "default": null,
37
- "optional": false,
38
- "validation": ".+",
39
- "maxlength": 256
40
- },
41
- "vars": {
42
- "prompt": "Vars File",
43
- "description": "Path to a file to use as template variables",
44
- "type": "string",
45
- "default": null,
46
- "optional": true,
47
- "validation": ".+",
48
- "maxlength": 256
30
+ "checks": {
31
+ "prompt": "Checks",
32
+ "description": "Check to resume, empty means all",
33
+ "type": "array",
34
+ "optional": true
49
35
  }
50
36
  },
51
37
  "output": {
52
- "failures": {
53
- "description": "The number of tests that failed",
54
- "display_as": "Failed Tests",
55
- "default": null,
56
- "type": "integer"
57
- },
58
- "results": {
59
- "description": "The full test results",
60
- "display_as": "Results",
61
- "default": null,
38
+ "failed": {
39
+ "description": "List of checks that could not be resumed",
40
+ "display_as": "Failed",
62
41
  "type": "array"
63
42
  },
64
- "runtime": {
65
- "description": "The time it took to run the tests, in seconds",
66
- "display_as": "Runtime",
67
- "default": null,
68
- "type": "integer"
69
- },
70
- "success": {
71
- "description": "Indicates if the test passed",
72
- "display_as": "Success",
73
- "default": null,
74
- "type": "string"
75
- },
76
- "summary": {
77
- "description": "A human friendly test result",
78
- "display_as": "Summary",
79
- "default": null,
80
- "type": "string"
43
+ "transitioned": {
44
+ "description": "List of checks that were resumed",
45
+ "display_as": "Triggered",
46
+ "type": "array"
81
47
  },
82
- "tests": {
83
- "description": "The number of tests that were run",
84
- "display_as": "Tests",
85
- "default": null,
86
- "type": "integer"
48
+ "skipped": {
49
+ "description": "List of checks that was skipped",
50
+ "display_as": "Skipped",
51
+ "type": "array"
87
52
  }
88
53
  },
89
54
  "display": "failed",
90
- "description": "Performs a Goss validation using a specific file",
91
- "aggregate": [
92
- {
93
- "function": "summary",
94
- "args": [
95
- "tests",
96
- {
97
- "format": "%s Test Cases on %d node(s)"
98
- }
99
- ]
100
- },
101
- {
102
- "function": "summary",
103
- "args": [
104
- "failures",
105
- {
106
- "format": "%s Failed Cases on %d node(s)"
107
- }
108
- ]
109
- },
110
- {
111
- "function": "summary",
112
- "args": [
113
- "success",
114
- {
115
- "format": "%s Passed Cases on %d node(s)"
116
- }
117
- ]
118
- }
119
- ]
55
+ "description": "Resume active checking of one or more checks"
120
56
  },
121
57
  {
122
58
  "action": "maintenance",
@@ -125,7 +61,6 @@
125
61
  "prompt": "Checks",
126
62
  "description": "Check to pause, empty means all",
127
63
  "type": "array",
128
- "default": null,
129
64
  "optional": true
130
65
  }
131
66
  },
@@ -133,19 +68,16 @@
133
68
  "failed": {
134
69
  "description": "List of checks that could not be paused",
135
70
  "display_as": "Failed",
136
- "default": null,
137
- "type": "array"
138
- },
139
- "skipped": {
140
- "description": "List of checks that was skipped",
141
- "display_as": "Skipped",
142
- "default": null,
143
71
  "type": "array"
144
72
  },
145
73
  "transitioned": {
146
74
  "description": "List of checks that were paused",
147
75
  "display_as": "Triggered",
148
- "default": null,
76
+ "type": "array"
77
+ },
78
+ "skipped": {
79
+ "description": "List of checks that was skipped",
80
+ "display_as": "Skipped",
149
81
  "type": "array"
150
82
  }
151
83
  },
@@ -153,38 +85,82 @@
153
85
  "description": "Pause checking of one or more checks"
154
86
  },
155
87
  {
156
- "action": "resume",
88
+ "action": "goss_validate",
89
+ "description": "Performs a Goss validation using a specific file",
90
+ "display": "failed",
91
+ "aggregate": [
92
+ {
93
+ "function": "summary",
94
+ "args": [
95
+ "tests",
96
+ {"format": "%s Tests on %d node(s)"}
97
+ ]
98
+ },
99
+ {
100
+ "function": "summary",
101
+ "args": [
102
+ "failures",
103
+ {"format": "%s Failed test on %d node(s)"}
104
+ ]
105
+ },
106
+ {
107
+ "function": "summary",
108
+ "args": [
109
+ "success",
110
+ {"format": "%s Passed tests on %d node(s)"}
111
+ ]
112
+ }
113
+ ],
157
114
  "input": {
158
- "checks": {
159
- "prompt": "Checks",
160
- "description": "Check to resume, empty means all",
161
- "type": "array",
162
- "default": null,
115
+ "file": {
116
+ "prompt": "Goss File",
117
+ "description": "Path to the Goss validation specification",
118
+ "type": "string",
119
+ "maxlength": 256,
120
+ "validation": ".+",
121
+ "optional": false
122
+ },
123
+ "vars": {
124
+ "prompt": "Vars File",
125
+ "description": "Path to a file to use as template variables",
126
+ "type": "string",
127
+ "maxlength": 256,
128
+ "validation": ".+",
163
129
  "optional": true
164
130
  }
165
131
  },
166
132
  "output": {
167
- "failed": {
168
- "description": "List of checks that could not be resumed",
169
- "display_as": "Failed",
170
- "default": null,
171
- "type": "array"
133
+ "tests": {
134
+ "description": "The number of tests that were run",
135
+ "display_as": "Tests",
136
+ "type": "integer"
172
137
  },
173
- "skipped": {
174
- "description": "List of checks that was skipped",
175
- "display_as": "Skipped",
176
- "default": null,
177
- "type": "array"
138
+ "failures": {
139
+ "description": "The number of tests that failed",
140
+ "display_as": "Failed Tests",
141
+ "type": "integer"
178
142
  },
179
- "transitioned": {
180
- "description": "List of checks that were resumed",
181
- "display_as": "Triggered",
182
- "default": null,
143
+ "runtime": {
144
+ "description": "The time it took to run the tests, in seconds",
145
+ "display_as": "Runtime",
146
+ "type": "integer"
147
+ },
148
+ "success": {
149
+ "description": "Indicates if the test passed",
150
+ "display_as": "Success",
151
+ "type": "string"
152
+ },
153
+ "summary": {
154
+ "description": "A human friendly test result",
155
+ "display_as": "Summary",
156
+ "type": "string"
157
+ },
158
+ "results": {
159
+ "description": "The full test results",
160
+ "display_as": "Results",
183
161
  "type": "array"
184
162
  }
185
- },
186
- "display": "failed",
187
- "description": "Resume active checking of one or more checks"
163
+ }
188
164
  },
189
165
  {
190
166
  "action": "trigger",
@@ -193,7 +169,6 @@
193
169
  "prompt": "Checks",
194
170
  "description": "Check to trigger, empty means all",
195
171
  "type": "array",
196
- "default": null,
197
172
  "optional": true
198
173
  }
199
174
  },
@@ -201,19 +176,16 @@
201
176
  "failed": {
202
177
  "description": "List of checks that could not be triggered",
203
178
  "display_as": "Failed",
204
- "default": null,
205
- "type": "array"
206
- },
207
- "skipped": {
208
- "description": "List of checks that was skipped",
209
- "display_as": "Skipped",
210
- "default": null,
211
179
  "type": "array"
212
180
  },
213
181
  "transitioned": {
214
182
  "description": "List of checks that were triggered",
215
183
  "display_as": "Triggered",
216
- "default": null,
184
+ "type": "array"
185
+ },
186
+ "skipped": {
187
+ "description": "List of checks that was skipped",
188
+ "display_as": "Skipped",
217
189
  "type": "array"
218
190
  }
219
191
  },
@@ -221,4 +193,4 @@
221
193
  "description": "Force an immediate check of one or more checks"
222
194
  }
223
195
  ]
224
- }
196
+ }
@@ -147,13 +147,11 @@ module MCollective
147
147
 
148
148
  # Returns the PuppetLabs mcollective path for windows
149
149
  def self.windows_prefix
150
- require "win32/dir"
151
- File.join(Dir::COMMON_APPDATA, "PuppetLabs", "choria")
150
+ File.join(ENV["ALLUSERSPROFILE"], "PuppetLabs", "choria")
152
151
  end
153
152
 
154
153
  def self.choria_windows_prefix
155
- require "win32/dir"
156
- File.join(Dir::COMMON_APPDATA, "ChoriaIO", "choria")
154
+ File.join(ENV["ALLUSERSPROFILE"], "choria")
157
155
  end
158
156
 
159
157
  def self.config_paths_for_user
@@ -157,7 +157,7 @@ module MCollective
157
157
  # @return [String] path to the command
158
158
  def task_command(spooldir, task)
159
159
  file_spec = task["files"][0]
160
- file_name = File.join(spooldir, "files", file_spec["filename"])
160
+ file_name = File.join(spooldir, "files", task_module(task["task"]), "tasks", file_spec["filename"])
161
161
 
162
162
  command = platform_specific_command(file_name)
163
163
 
@@ -220,7 +220,10 @@ module MCollective
220
220
  # @param task [Hash] task specification
221
221
  def populate_spooldir(spooldir, task)
222
222
  task["files"].each do |file|
223
- spool_filename = File.join(spooldir, "files", file["filename"])
223
+ filename = file["filename"]
224
+ filename = File.join(task_module(task["task"]), "tasks", filename) unless filename.index("/")
225
+
226
+ spool_filename = File.join(spooldir, "files", filename)
224
227
 
225
228
  FileUtils.mkdir_p(File.dirname(spool_filename), :mode => 0o0750)
226
229
  FileUtils.cp(task_file_name(file), spool_filename)
@@ -569,6 +572,15 @@ module MCollective
569
572
  parts
570
573
  end
571
574
 
575
+ # Return a task's module
576
+ #
577
+ # @param task [String]
578
+ # @return [String] the module name
579
+ # @raise [StandardError] for invalid task names
580
+ def task_module(task)
581
+ parse_task(task)[0]
582
+ end
583
+
572
584
  # Determines the cache path for a task file
573
585
  #
574
586
  # @param file [Hash] a file hash as per the task metadata
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: choria-mcorpc-support
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.24.1
4
+ version: 2.24.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - R.I.Pienaar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-03 00:00:00.000000000 Z
11
+ date: 2021-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: systemu