hammer_cli_foreman_remote_execution 0.2.3 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.tx/config +4 -3
- data/Gemfile +1 -1
- data/Rakefile +5 -25
- data/lib/hammer_cli_foreman_remote_execution/version.rb +1 -1
- data/locale/Makefile +2 -53
- data/locale/ca/LC_MESSAGES/hammer-cli-foreman-remote-execution.mo +0 -0
- data/locale/ca/hammer-cli-foreman-remote-execution.po +317 -0
- data/locale/cs_CZ/LC_MESSAGES/hammer-cli-foreman-remote-execution.mo +0 -0
- data/locale/cs_CZ/hammer-cli-foreman-remote-execution.po +305 -0
- data/locale/de/LC_MESSAGES/hammer-cli-foreman-remote-execution.mo +0 -0
- data/locale/de/hammer-cli-foreman-remote-execution.po +137 -82
- data/locale/en/LC_MESSAGES/hammer-cli-foreman-remote-execution.mo +0 -0
- data/locale/en/hammer-cli-foreman-remote-execution.po +55 -16
- data/locale/es/LC_MESSAGES/hammer-cli-foreman-remote-execution.mo +0 -0
- data/locale/es/hammer-cli-foreman-remote-execution.po +136 -84
- data/locale/fr/LC_MESSAGES/hammer-cli-foreman-remote-execution.mo +0 -0
- data/locale/fr/hammer-cli-foreman-remote-execution.po +140 -83
- data/locale/hammer-cli-foreman-remote-execution.pot +113 -57
- data/locale/it/LC_MESSAGES/hammer-cli-foreman-remote-execution.mo +0 -0
- data/locale/it/hammer-cli-foreman-remote-execution.po +76 -33
- data/locale/ja/LC_MESSAGES/hammer-cli-foreman-remote-execution.mo +0 -0
- data/locale/ja/hammer-cli-foreman-remote-execution.po +136 -86
- data/locale/ka/LC_MESSAGES/hammer-cli-foreman-remote-execution.mo +0 -0
- data/locale/ka/hammer-cli-foreman-remote-execution.po +313 -0
- data/locale/ko/LC_MESSAGES/hammer-cli-foreman-remote-execution.mo +0 -0
- data/locale/ko/hammer-cli-foreman-remote-execution.po +122 -73
- data/locale/pt_BR/LC_MESSAGES/hammer-cli-foreman-remote-execution.mo +0 -0
- data/locale/pt_BR/hammer-cli-foreman-remote-execution.po +136 -85
- data/locale/ru/LC_MESSAGES/hammer-cli-foreman-remote-execution.mo +0 -0
- data/locale/ru/hammer-cli-foreman-remote-execution.po +128 -75
- data/locale/zh_CN/LC_MESSAGES/hammer-cli-foreman-remote-execution.mo +0 -0
- data/locale/zh_CN/hammer-cli-foreman-remote-execution.po +133 -87
- data/locale/zh_TW/LC_MESSAGES/hammer-cli-foreman-remote-execution.mo +0 -0
- data/locale/zh_TW/hammer-cli-foreman-remote-execution.po +119 -73
- data/test/unit/foreign_input_set_test.rb +9 -9
- data/test/unit/job_invocation_test.rb +10 -10
- data/test/unit/job_template_test.rb +18 -18
- data/test/unit/remote_execution_feature_test.rb +7 -7
- data/test/unit/template_input_test.rb +11 -11
- metadata +23 -6
@@ -1,16 +1,17 @@
|
|
1
1
|
# SOME DESCRIPTIVE TITLE.
|
2
2
|
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
3
|
-
# This file is distributed under the same license as the
|
4
|
-
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
3
|
+
# This file is distributed under the same license as the hammer-cli-foreman-remote-execution package.
|
5
4
|
#
|
5
|
+
# Translators:
|
6
6
|
msgid ""
|
7
7
|
msgstr ""
|
8
|
-
"Project-Id-Version: hammer-cli-foreman-remote-execution 0.2.
|
8
|
+
"Project-Id-Version: hammer-cli-foreman-remote-execution 0.2.3\n"
|
9
9
|
"Report-Msgid-Bugs-To: \n"
|
10
|
-
"
|
11
|
-
"
|
12
|
-
"
|
13
|
-
"
|
10
|
+
"POT-Creation-Date: 2019-02-26 10:44-0500\n"
|
11
|
+
"PO-Revision-Date: 2016-02-12 07:57+0000\n"
|
12
|
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13
|
+
"Language-Team: Chinese (Taiwan) (http://app.transifex.com/foreman/foreman/"
|
14
|
+
"language/zh_TW/)\n"
|
14
15
|
"MIME-Version: 1.0\n"
|
15
16
|
"Content-Type: text/plain; charset=UTF-8\n"
|
16
17
|
"Content-Transfer-Encoding: 8bit\n"
|
@@ -18,119 +19,115 @@ msgstr ""
|
|
18
19
|
"Plural-Forms: nplurals=1; plural=0;\n"
|
19
20
|
|
20
21
|
msgid "Manage foreign input sets"
|
21
|
-
msgstr ""
|
22
|
+
msgstr "管理外部輸入集"
|
22
23
|
|
23
24
|
msgid "ID"
|
24
25
|
msgstr "ID"
|
25
26
|
|
26
|
-
#, fuzzy
|
27
27
|
msgid "Target template ID"
|
28
|
-
msgstr "ID"
|
28
|
+
msgstr "目標範本 ID"
|
29
29
|
|
30
30
|
msgid "Target template name"
|
31
|
-
msgstr ""
|
31
|
+
msgstr "目標範本名稱"
|
32
32
|
|
33
33
|
msgid "Name"
|
34
34
|
msgstr "名稱"
|
35
35
|
|
36
36
|
msgid "Include all"
|
37
|
-
msgstr ""
|
37
|
+
msgstr "包含所有"
|
38
38
|
|
39
39
|
msgid "Include"
|
40
|
-
msgstr ""
|
40
|
+
msgstr "包含"
|
41
41
|
|
42
42
|
msgid "Exclude"
|
43
|
-
msgstr ""
|
43
|
+
msgstr "排除"
|
44
44
|
|
45
45
|
msgid "Foreign input set updated"
|
46
|
-
msgstr ""
|
46
|
+
msgstr "外部輸入集已更新"
|
47
47
|
|
48
48
|
msgid "Could not update the input set"
|
49
|
-
msgstr ""
|
49
|
+
msgstr "無法更新輸入集"
|
50
50
|
|
51
51
|
msgid "Foreign input set created"
|
52
|
-
msgstr ""
|
52
|
+
msgstr "外部輸入集已建立"
|
53
53
|
|
54
54
|
msgid "Could not create the input set"
|
55
|
-
msgstr ""
|
55
|
+
msgstr "無法建立輸入集"
|
56
56
|
|
57
57
|
msgid "Foreign input set deleted"
|
58
|
-
msgstr ""
|
58
|
+
msgstr "外部輸入集已刪除"
|
59
59
|
|
60
60
|
msgid "Could not delete the input set"
|
61
|
-
msgstr ""
|
61
|
+
msgstr "無法刪除輸入集"
|
62
62
|
|
63
63
|
msgid "Description"
|
64
|
-
msgstr ""
|
64
|
+
msgstr "說明"
|
65
65
|
|
66
|
-
#, fuzzy
|
67
66
|
msgid "Status"
|
68
67
|
msgstr "狀態"
|
69
68
|
|
70
69
|
msgid "Success"
|
71
|
-
msgstr ""
|
70
|
+
msgstr "成功"
|
72
71
|
|
73
72
|
msgid "Failed"
|
74
|
-
msgstr ""
|
73
|
+
msgstr "失敗"
|
75
74
|
|
76
75
|
msgid "Pending"
|
77
|
-
msgstr ""
|
76
|
+
msgstr "等待處理中"
|
78
77
|
|
79
78
|
msgid "Total"
|
80
|
-
msgstr ""
|
79
|
+
msgstr "總數"
|
81
80
|
|
82
|
-
#, fuzzy
|
83
81
|
msgid "Start"
|
84
|
-
msgstr "
|
82
|
+
msgstr "開始"
|
85
83
|
|
86
84
|
msgid "Job Category"
|
87
|
-
msgstr ""
|
85
|
+
msgstr "工作類別"
|
88
86
|
|
89
87
|
msgid "Mode"
|
90
|
-
msgstr ""
|
88
|
+
msgstr "模式"
|
91
89
|
|
92
90
|
msgid "Cron line"
|
93
91
|
msgstr "Cron 行"
|
94
92
|
|
95
|
-
#, fuzzy
|
96
93
|
msgid "Recurring logic ID"
|
97
|
-
msgstr "ID"
|
94
|
+
msgstr "週期性的邏輯 ID"
|
98
95
|
|
99
96
|
msgid "Hosts"
|
100
|
-
msgstr ""
|
97
|
+
msgstr "主機"
|
101
98
|
|
102
99
|
msgid "View the output for a host"
|
103
|
-
msgstr ""
|
100
|
+
msgstr "檢視主機輸出"
|
104
101
|
|
105
102
|
msgid "Do not wait for job to complete, shows current output only"
|
106
|
-
msgstr ""
|
103
|
+
msgstr "不等待工作完成,僅顯示現有輸出"
|
107
104
|
|
108
105
|
msgid "The job is scheduled to start at %{timestamp}"
|
109
106
|
msgstr ""
|
110
107
|
|
111
108
|
msgid "Job invocation %{id} created"
|
112
|
-
msgstr ""
|
109
|
+
msgstr "工作祈願 %{id} 已建立"
|
113
110
|
|
114
111
|
msgid "Schedule the execution for a later time"
|
115
|
-
msgstr ""
|
112
|
+
msgstr "排程執行工作至晚一點的時間"
|
116
113
|
|
117
114
|
msgid "Execution should be cancelled if it cannot be started before --start-at"
|
118
|
-
msgstr ""
|
115
|
+
msgstr "如果不能在 --start-at 之前開始,就應該取消執行"
|
119
116
|
|
120
117
|
msgid "Create a recurring execution"
|
121
|
-
msgstr ""
|
118
|
+
msgstr "建立週期性執行"
|
122
119
|
|
123
120
|
msgid "Perform no more executions after this time, used with --cron-line"
|
124
|
-
msgstr ""
|
121
|
+
msgstr "此時間之後不再進行任何執行,與 --cron-line 合用"
|
125
122
|
|
126
123
|
msgid "Specify inputs from command line"
|
127
|
-
msgstr ""
|
124
|
+
msgstr "從命令列指定輸入"
|
128
125
|
|
129
126
|
msgid "Read input values from files"
|
130
|
-
msgstr ""
|
127
|
+
msgstr "從檔案讀取輸入值"
|
131
128
|
|
132
129
|
msgid "Dynamic search queries are evaluated at run time"
|
133
|
-
msgstr ""
|
130
|
+
msgstr "在執行時評量動態搜尋查詢"
|
134
131
|
|
135
132
|
msgid "Cancel the job"
|
136
133
|
msgstr ""
|
@@ -142,34 +139,34 @@ msgid "Could not cancel the job invocation"
|
|
142
139
|
msgstr ""
|
143
140
|
|
144
141
|
msgid "Rerun the job"
|
145
|
-
msgstr ""
|
142
|
+
msgstr "重新執行工作"
|
146
143
|
|
147
144
|
msgid "Job invocation was rerun as %{id}"
|
148
145
|
msgstr ""
|
149
146
|
|
150
147
|
msgid "Manage job invocations"
|
151
|
-
msgstr ""
|
148
|
+
msgstr "管理工作祈願"
|
152
149
|
|
153
150
|
msgid "Provider"
|
154
|
-
msgstr ""
|
151
|
+
msgstr "供應商"
|
155
152
|
|
156
153
|
msgid "Type"
|
157
|
-
msgstr ""
|
154
|
+
msgstr "類型"
|
158
155
|
|
159
156
|
msgid "Inputs"
|
160
|
-
msgstr ""
|
157
|
+
msgstr "輸入"
|
161
158
|
|
162
159
|
msgid "View job template content"
|
163
|
-
msgstr ""
|
160
|
+
msgstr "新工作範本內容"
|
164
161
|
|
165
162
|
msgid "Path to a file that contains the template"
|
166
|
-
msgstr ""
|
163
|
+
msgstr "包含範本的檔案之路徑"
|
167
164
|
|
168
165
|
msgid "Job template created"
|
169
|
-
msgstr ""
|
166
|
+
msgstr "已建立工作範本"
|
170
167
|
|
171
168
|
msgid "Could not create the job template"
|
172
|
-
msgstr ""
|
169
|
+
msgstr "無法建立工作範本"
|
173
170
|
|
174
171
|
msgid "Path to a file that contains the template - must include ERB metadata"
|
175
172
|
msgstr ""
|
@@ -184,26 +181,25 @@ msgid "Export a template including all metadata"
|
|
184
181
|
msgstr ""
|
185
182
|
|
186
183
|
msgid "Job template updated"
|
187
|
-
msgstr ""
|
184
|
+
msgstr "已更新工作範本"
|
188
185
|
|
189
186
|
msgid "Could not update the job template"
|
190
|
-
msgstr ""
|
187
|
+
msgstr "無法更新工作範本"
|
191
188
|
|
192
189
|
msgid "Job template deleted"
|
193
|
-
msgstr ""
|
190
|
+
msgstr "已刪除工作範本"
|
194
191
|
|
195
192
|
msgid "Could not delete the job template"
|
196
|
-
msgstr ""
|
193
|
+
msgstr "無法刪除工作範本"
|
197
194
|
|
198
195
|
msgid "Manage job templates"
|
199
|
-
msgstr ""
|
196
|
+
msgstr "管理工作範本"
|
200
197
|
|
201
198
|
msgid ""
|
202
|
-
"Comma-separated list of key=file, where file is a path to a text file to be
|
203
|
-
"
|
204
|
-
msgstr ""
|
199
|
+
"Comma-separated list of key=file, where file is a path to a text file to be "
|
200
|
+
"read"
|
201
|
+
msgstr "key=file 清單,以逗號隔開;其中 file 是要讀取的文字檔案路徑"
|
205
202
|
|
206
|
-
#, fuzzy
|
207
203
|
msgid ""
|
208
204
|
"Cron line format 'a b c d e', where:\n"
|
209
205
|
" a. is minute (range: 0-59)\n"
|
@@ -211,7 +207,13 @@ msgid ""
|
|
211
207
|
" c. is day of month (range: 1-31)\n"
|
212
208
|
" d. is month (range: 1-12)\n"
|
213
209
|
" e. is day of week (range: 0-6)"
|
214
|
-
msgstr "
|
210
|
+
msgstr ""
|
211
|
+
"Cron 行格式 'a b c d e',其中:\n"
|
212
|
+
" a. 分鐘(範圍:0-59)\n"
|
213
|
+
" b. 小時(範圍:0-23)\n"
|
214
|
+
" c. 日期(範圍:1-31)\n"
|
215
|
+
" d. 月份(範圍:1-12)\n"
|
216
|
+
" e. 星期幾(0-6)"
|
215
217
|
|
216
218
|
msgid "Manage remote execution features"
|
217
219
|
msgstr ""
|
@@ -220,9 +222,8 @@ msgid "Job template name"
|
|
220
222
|
msgstr ""
|
221
223
|
|
222
224
|
msgid "Label"
|
223
|
-
msgstr ""
|
225
|
+
msgstr "標籤"
|
224
226
|
|
225
|
-
#, fuzzy
|
226
227
|
msgid "Job template ID"
|
227
228
|
msgstr "ID"
|
228
229
|
|
@@ -233,31 +234,76 @@ msgid "Could not update the remote execution feature"
|
|
233
234
|
msgstr ""
|
234
235
|
|
235
236
|
msgid "Manage template inputs"
|
236
|
-
msgstr ""
|
237
|
+
msgstr "管理範本輸入"
|
237
238
|
|
238
239
|
msgid "Input type"
|
239
|
-
msgstr ""
|
240
|
+
msgstr "輸入類型"
|
240
241
|
|
241
242
|
msgid "Fact name"
|
242
|
-
msgstr ""
|
243
|
+
msgstr "詳情名稱"
|
243
244
|
|
244
245
|
msgid "Variable name"
|
245
|
-
msgstr ""
|
246
|
+
msgstr "變數名稱"
|
246
247
|
|
247
248
|
msgid "Puppet parameter name"
|
248
|
-
msgstr ""
|
249
|
+
msgstr "Puppet 參數名稱"
|
249
250
|
|
250
251
|
msgid "Options"
|
251
|
-
msgstr ""
|
252
|
+
msgstr "選項"
|
252
253
|
|
253
254
|
msgid "Template input created"
|
254
|
-
msgstr ""
|
255
|
+
msgstr "已建立範本輸入"
|
255
256
|
|
256
257
|
msgid "Could not create the template input"
|
257
|
-
msgstr ""
|
258
|
+
msgstr "無法建立範本輸入"
|
258
259
|
|
259
260
|
msgid "Template input deleted"
|
260
|
-
msgstr ""
|
261
|
+
msgstr "已刪除範本輸入"
|
261
262
|
|
262
263
|
msgid "Could not delete the template input"
|
264
|
+
msgstr "無法刪除範本輸入"
|
265
|
+
|
266
|
+
msgid "Execution"
|
267
|
+
msgstr ""
|
268
|
+
|
269
|
+
msgid "execution"
|
270
|
+
msgstr ""
|
271
|
+
|
272
|
+
msgid "Randomized ordering"
|
273
|
+
msgstr ""
|
274
|
+
|
275
|
+
msgid "Show the complete input of the job"
|
276
|
+
msgstr ""
|
277
|
+
|
278
|
+
msgid "Show job status for the hosts"
|
279
|
+
msgstr ""
|
280
|
+
|
281
|
+
msgid "Missing"
|
282
|
+
msgstr ""
|
283
|
+
|
284
|
+
msgid "Time to pickup"
|
285
|
+
msgstr ""
|
286
|
+
|
287
|
+
msgid "Smart Proxies"
|
288
|
+
msgstr ""
|
289
|
+
|
290
|
+
msgid "Remote execution proxies"
|
291
|
+
msgstr ""
|
292
|
+
|
293
|
+
msgid "Id"
|
294
|
+
msgstr ""
|
295
|
+
|
296
|
+
msgid "Default value"
|
297
|
+
msgstr ""
|
298
|
+
|
299
|
+
msgid "Template input created."
|
300
|
+
msgstr ""
|
301
|
+
|
302
|
+
msgid "Template input updated."
|
303
|
+
msgstr ""
|
304
|
+
|
305
|
+
msgid "Could not update the template input"
|
306
|
+
msgstr ""
|
307
|
+
|
308
|
+
msgid "Template input deleted."
|
263
309
|
msgstr ""
|
@@ -7,10 +7,10 @@ require 'hammer_cli_foreman_remote_execution/template_input'
|
|
7
7
|
describe HammerCLIForemanRemoteExecution::TemplateInput do
|
8
8
|
include CommandTestHelper
|
9
9
|
|
10
|
-
|
10
|
+
describe 'ListCommand' do
|
11
11
|
let(:cmd) { HammerCLIForemanRemoteExecution::TemplateInput::ListCommand.new('', ctx) }
|
12
12
|
|
13
|
-
|
13
|
+
describe 'output' do
|
14
14
|
with_params ['--template-id=1'] do
|
15
15
|
let(:expected_record_count) { cmd.resource.call(:index, :template_id => 1)['results'].length }
|
16
16
|
it_should_print_n_records
|
@@ -19,32 +19,32 @@ describe HammerCLIForemanRemoteExecution::TemplateInput do
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
-
|
22
|
+
describe 'InfoCommand' do
|
23
23
|
let(:cmd) { HammerCLIForemanRemoteExecution::TemplateInput::InfoCommand.new('', ctx) }
|
24
24
|
|
25
|
-
|
25
|
+
describe 'parameters' do
|
26
26
|
it_should_accept 'required parameters', ['--template-id=template', '--name=foo']
|
27
27
|
end
|
28
28
|
|
29
|
-
|
29
|
+
describe 'output' do
|
30
30
|
with_params ['--template-id=1', '--id=1'] do
|
31
31
|
it_should_print_columns ['ID', 'Name', 'Input type', 'Fact name', 'Variable name', 'Puppet parameter name']
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
|
-
|
36
|
+
describe 'DeleteCommand' do
|
37
37
|
let(:cmd) { HammerCLIForemanRemoteExecution::TemplateInput::DeleteCommand.new('', ctx) }
|
38
38
|
|
39
|
-
|
39
|
+
describe 'parameters' do
|
40
40
|
it_should_accept 'required parameters', ['--template-id=template', '--name=foo']
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
|
-
|
44
|
+
describe 'CreateCommand' do
|
45
45
|
let(:cmd) { HammerCLIForemanRemoteExecution::TemplateInput::CreateCommand.new('', ctx) }
|
46
46
|
|
47
|
-
|
47
|
+
describe 'parameters' do
|
48
48
|
it_should_accept 'create options', ['--template-id=1', "--name=asdf", '--input-type=user']
|
49
49
|
end
|
50
50
|
end
|
@@ -7,29 +7,29 @@ require 'hammer_cli_foreman_remote_execution'
|
|
7
7
|
describe HammerCLIForemanRemoteExecution::JobInvocation do
|
8
8
|
include CommandTestHelper
|
9
9
|
|
10
|
-
|
10
|
+
describe 'ListCommand' do
|
11
11
|
let(:cmd) { HammerCLIForemanRemoteExecution::JobInvocation::ListCommand.new('', ctx) }
|
12
12
|
|
13
|
-
|
13
|
+
describe 'parameters' do
|
14
14
|
it_should_accept 'no arguments'
|
15
15
|
it_should_accept_search_params
|
16
16
|
end
|
17
17
|
|
18
|
-
|
18
|
+
describe 'output' do
|
19
19
|
let(:expected_record_count) { cmd.resource.call(:index)['results'].length }
|
20
20
|
it_should_print_n_records
|
21
21
|
it_should_print_columns ['ID', 'Description', 'Status', 'Success', 'Failed', 'Pending', 'Total', 'Start']
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
-
|
25
|
+
describe 'InfoCommand' do
|
26
26
|
let(:cmd) { HammerCLIForemanRemoteExecution::JobInvocation::InfoCommand.new('', ctx) }
|
27
27
|
|
28
28
|
before :each do
|
29
29
|
cmd.stubs(:get_parameters).returns([])
|
30
30
|
end
|
31
31
|
|
32
|
-
|
32
|
+
describe 'parameters' do
|
33
33
|
it_should_accept 'id', ['--id=1']
|
34
34
|
|
35
35
|
it 'should not accept name' do
|
@@ -39,17 +39,17 @@ describe HammerCLIForemanRemoteExecution::JobInvocation do
|
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
|
-
|
42
|
+
describe 'output' do
|
43
43
|
with_params ['--id=1'] do
|
44
44
|
it_should_print_columns ['ID','Description','Status','Success','Failed','Pending','Total','Start','Job Category','Mode','Cron line','Recurring logic ID','Hosts', 'Randomized ordering']
|
45
45
|
end
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
49
|
-
|
49
|
+
describe 'CreateCommand' do
|
50
50
|
let(:cmd) { HammerCLIForemanRemoteExecution::JobInvocation::CreateCommand.new('', ctx) }
|
51
51
|
|
52
|
-
|
52
|
+
describe 'parameters' do
|
53
53
|
it 'detects async flag correctly' do
|
54
54
|
refute cmd.option_async?
|
55
55
|
_out, err = capture_io do
|
@@ -61,7 +61,7 @@ describe HammerCLIForemanRemoteExecution::JobInvocation do
|
|
61
61
|
end
|
62
62
|
end
|
63
63
|
|
64
|
-
|
64
|
+
describe 'Cancel Command' do
|
65
65
|
let(:cmd) { HammerCLIForemanRemoteExecution::JobInvocation::CancelCommand.new('', ctx) }
|
66
66
|
|
67
67
|
it_should_accept 'cancel options', ['--id=1', '--force=yes']
|
@@ -73,7 +73,7 @@ describe HammerCLIForemanRemoteExecution::JobInvocation do
|
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|
76
|
-
|
76
|
+
describe 'RerunCommand' do
|
77
77
|
let(:cmd) { HammerCLIForemanRemoteExecution::JobInvocation::RerunCommand.new('', ctx) }
|
78
78
|
|
79
79
|
it_should_accept 'rerun options', ['--id=1', '--failed-only=false']
|
@@ -7,49 +7,49 @@ require 'hammer_cli_foreman_remote_execution/job_template'
|
|
7
7
|
describe HammerCLIForemanRemoteExecution::JobTemplate do
|
8
8
|
include CommandTestHelper
|
9
9
|
|
10
|
-
|
10
|
+
describe 'ListCommand' do
|
11
11
|
let(:cmd) { HammerCLIForemanRemoteExecution::JobTemplate::ListCommand.new('', ctx) }
|
12
12
|
|
13
|
-
|
13
|
+
describe 'parameters' do
|
14
14
|
it_should_accept 'no arguments'
|
15
15
|
it_should_accept_search_params
|
16
16
|
end
|
17
17
|
|
18
|
-
|
18
|
+
describe 'output' do
|
19
19
|
let(:expected_record_count) { cmd.resource.call(:index)['results'].length }
|
20
20
|
it_should_print_n_records
|
21
21
|
it_should_print_columns ['ID', 'Name', 'Job Category', 'Provider', 'Type']
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
-
|
25
|
+
describe 'InfoCommand' do
|
26
26
|
let(:cmd) { HammerCLIForemanRemoteExecution::JobTemplate::InfoCommand.new('', ctx) }
|
27
27
|
|
28
28
|
before :each do
|
29
29
|
cmd.stubs(:get_parameters).returns([])
|
30
30
|
end
|
31
31
|
|
32
|
-
|
32
|
+
describe 'parameters' do
|
33
33
|
it_should_accept 'id', ['--id=1']
|
34
34
|
it_should_accept 'name', ['--name=template']
|
35
35
|
end
|
36
36
|
|
37
|
-
|
37
|
+
describe 'output' do
|
38
38
|
with_params ['--id=1'] do
|
39
39
|
it_should_print_columns ['ID', 'Name', 'Job Category', 'Provider', 'Type']
|
40
40
|
end
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
|
-
|
44
|
+
describe 'DumpCommand' do
|
45
45
|
let(:cmd) { HammerCLIForemanRemoteExecution::JobTemplate::DumpCommand.new('', ctx) }
|
46
46
|
|
47
|
-
|
47
|
+
describe 'parameters' do
|
48
48
|
it_should_accept 'id', ['--id=1']
|
49
49
|
it_should_accept 'name', ['--name=template']
|
50
50
|
end
|
51
51
|
|
52
|
-
|
52
|
+
describe 'output' do
|
53
53
|
it 'must dump template' do
|
54
54
|
cmd.stubs(:context).returns(ctx.update(:adapter => :test))
|
55
55
|
out, _err = capture_io do
|
@@ -60,23 +60,23 @@ describe HammerCLIForemanRemoteExecution::JobTemplate do
|
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
63
|
-
|
63
|
+
describe 'ImportCommand' do
|
64
64
|
let(:cmd) { HammerCLIForemanRemoteExecution::JobTemplate::ImportCommand.new('', ctx) }
|
65
65
|
|
66
|
-
|
66
|
+
describe 'parameters' do
|
67
67
|
it_should_accept 'import options', ["--file=#{File.join(File.dirname(__FILE__), '..', 'data', 'export.erb')}", '--overwrite=false']
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
71
|
-
|
71
|
+
describe 'ExportCommand' do
|
72
72
|
let(:cmd) { HammerCLIForemanRemoteExecution::JobTemplate::ExportCommand.new('', ctx) }
|
73
73
|
|
74
|
-
|
74
|
+
describe 'parameters' do
|
75
75
|
it_should_accept 'id', ['--id=1']
|
76
76
|
it_should_accept 'name', ['--name=template']
|
77
77
|
end
|
78
78
|
|
79
|
-
|
79
|
+
describe 'output' do
|
80
80
|
it 'must export template' do
|
81
81
|
cmd.stubs(:context).returns(ctx.update(:adapter => :test))
|
82
82
|
out, _err = capture_io do
|
@@ -87,19 +87,19 @@ describe HammerCLIForemanRemoteExecution::JobTemplate do
|
|
87
87
|
end
|
88
88
|
end
|
89
89
|
|
90
|
-
|
90
|
+
describe 'DeleteCommand' do
|
91
91
|
let(:cmd) { HammerCLIForemanRemoteExecution::JobTemplate::DeleteCommand.new('', ctx) }
|
92
92
|
|
93
|
-
|
93
|
+
describe 'parameters' do
|
94
94
|
it_should_accept 'name', ['--name=template']
|
95
95
|
it_should_accept 'id', ['--id=1']
|
96
96
|
end
|
97
97
|
end
|
98
98
|
|
99
|
-
|
99
|
+
describe 'CreateCommand' do
|
100
100
|
let(:cmd) { HammerCLIForemanRemoteExecution::JobTemplate::CreateCommand.new('', ctx) }
|
101
101
|
|
102
|
-
|
102
|
+
describe 'parameters' do
|
103
103
|
it_should_accept 'create options', ['--name=Test', "--file=#{File.join(File.dirname(__FILE__), '..', 'data', 'template.txt')}", '--job-category=Install', '--provider-type=SSH']
|
104
104
|
end
|
105
105
|
end
|
@@ -7,10 +7,10 @@ require 'hammer_cli_foreman_remote_execution/remote_execution_feature'
|
|
7
7
|
describe HammerCLIForemanRemoteExecution::RemoteExecutionFeature do
|
8
8
|
include CommandTestHelper
|
9
9
|
|
10
|
-
|
10
|
+
describe 'ListCommand' do
|
11
11
|
let(:cmd) { HammerCLIForemanRemoteExecution::RemoteExecutionFeature::ListCommand.new('', ctx) }
|
12
12
|
|
13
|
-
|
13
|
+
describe 'output' do
|
14
14
|
with_params [] do
|
15
15
|
let(:expected_record_count) { cmd.resource.call(:index)['results'].length }
|
16
16
|
it_should_print_n_records
|
@@ -19,14 +19,14 @@ describe HammerCLIForemanRemoteExecution::RemoteExecutionFeature do
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
-
|
22
|
+
describe 'InfoCommand' do
|
23
23
|
let(:cmd) { HammerCLIForemanRemoteExecution::RemoteExecutionFeature::InfoCommand.new('', ctx) }
|
24
24
|
|
25
|
-
|
25
|
+
describe 'parameters' do
|
26
26
|
it_should_accept 'required parameters', ['--name=foo']
|
27
27
|
end
|
28
28
|
|
29
|
-
|
29
|
+
describe 'output' do
|
30
30
|
with_params ['--id=1'] do
|
31
31
|
it_should_print_columns ['ID', 'Label', 'Name', 'Description', 'Job template ID', 'Job template name']
|
32
32
|
end
|
@@ -34,10 +34,10 @@ describe HammerCLIForemanRemoteExecution::RemoteExecutionFeature do
|
|
34
34
|
end
|
35
35
|
|
36
36
|
|
37
|
-
|
37
|
+
describe 'CreateCommand' do
|
38
38
|
let(:cmd) { HammerCLIForemanRemoteExecution::RemoteExecutionFeature::UpdateCommand.new('', ctx) }
|
39
39
|
|
40
|
-
|
40
|
+
describe 'parameters' do
|
41
41
|
it_should_accept 'create options', ['--name=feature', "--job-template=asdf"]
|
42
42
|
end
|
43
43
|
end
|