hammer_cli_foreman_remote_execution 0.2.3 → 0.3.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.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci_test.yml +22 -0
  3. data/.rubocop.yml +7 -4
  4. data/.rubocop_todo.yml +81 -0
  5. data/.tx/config +5 -4
  6. data/Gemfile +10 -9
  7. data/Rakefile +9 -25
  8. data/hammer_cli_foreman_remote_execution.gemspec +6 -2
  9. data/lib/hammer_cli_foreman_remote_execution/foreign_input_set.rb +2 -0
  10. data/lib/hammer_cli_foreman_remote_execution/i18n.rb +5 -7
  11. data/lib/hammer_cli_foreman_remote_execution/interface_extensions.rb +2 -2
  12. data/lib/hammer_cli_foreman_remote_execution/job_invocation.rb +6 -4
  13. data/lib/hammer_cli_foreman_remote_execution/job_template.rb +8 -6
  14. data/lib/hammer_cli_foreman_remote_execution/options/normalizers.rb +5 -3
  15. data/lib/hammer_cli_foreman_remote_execution/remote_execution_feature.rb +4 -1
  16. data/lib/hammer_cli_foreman_remote_execution/subnet_extensions.rb +3 -1
  17. data/lib/hammer_cli_foreman_remote_execution/template_input.rb +2 -0
  18. data/lib/hammer_cli_foreman_remote_execution/version.rb +3 -1
  19. data/lib/hammer_cli_foreman_remote_execution.rb +2 -0
  20. data/locale/Makefile +2 -53
  21. data/locale/ca/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo +0 -0
  22. data/locale/ca/hammer_cli_foreman_remote_execution.po +311 -0
  23. data/locale/cs_CZ/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo +0 -0
  24. data/locale/{de/hammer-cli-foreman-remote-execution.po → cs_CZ/hammer_cli_foreman_remote_execution.po} +104 -67
  25. data/locale/de/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo +0 -0
  26. data/locale/de/hammer_cli_foreman_remote_execution.po +311 -0
  27. data/locale/en/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo +0 -0
  28. data/locale/en/{hammer-cli-foreman-remote-execution.po → hammer_cli_foreman_remote_execution.po} +55 -16
  29. data/locale/es/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo +0 -0
  30. data/locale/es/hammer_cli_foreman_remote_execution.po +308 -0
  31. data/locale/fr/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo +0 -0
  32. data/locale/fr/hammer_cli_foreman_remote_execution.po +315 -0
  33. data/locale/{hammer-cli-foreman-remote-execution.pot → hammer_cli_foreman_remote_execution.pot} +113 -57
  34. data/locale/it/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo +0 -0
  35. data/locale/it/{hammer-cli-foreman-remote-execution.po → hammer_cli_foreman_remote_execution.po} +74 -37
  36. data/locale/ja/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo +0 -0
  37. data/locale/ja/hammer_cli_foreman_remote_execution.po +306 -0
  38. data/locale/ka/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo +0 -0
  39. data/locale/ka/hammer_cli_foreman_remote_execution.po +307 -0
  40. data/locale/ko/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo +0 -0
  41. data/locale/ko/hammer_cli_foreman_remote_execution.po +305 -0
  42. data/locale/pt_BR/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo +0 -0
  43. data/locale/pt_BR/hammer_cli_foreman_remote_execution.po +308 -0
  44. data/locale/ru/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo +0 -0
  45. data/locale/ru/hammer_cli_foreman_remote_execution.po +311 -0
  46. data/locale/zh_CN/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo +0 -0
  47. data/locale/zh_CN/hammer_cli_foreman_remote_execution.po +303 -0
  48. data/locale/zh_TW/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo +0 -0
  49. data/locale/zh_TW/{hammer-cli-foreman-remote-execution.po → hammer_cli_foreman_remote_execution.po} +113 -73
  50. data/test/unit/foreign_input_set_test.rb +11 -9
  51. data/test/unit/job_invocation_test.rb +20 -16
  52. data/test/unit/job_template_test.rb +27 -22
  53. data/test/unit/remote_execution_feature_test.rb +9 -8
  54. data/test/unit/template_input_test.rb +13 -11
  55. metadata +39 -17
  56. data/locale/es/hammer-cli-foreman-remote-execution.po +0 -262
  57. data/locale/fr/hammer-cli-foreman-remote-execution.po +0 -262
  58. data/locale/ja/hammer-cli-foreman-remote-execution.po +0 -262
  59. data/locale/ko/hammer-cli-foreman-remote-execution.po +0 -262
  60. data/locale/pt_BR/hammer-cli-foreman-remote-execution.po +0 -263
  61. data/locale/ru/hammer-cli-foreman-remote-execution.po +0 -264
  62. data/locale/zh_CN/hammer-cli-foreman-remote-execution.po +0 -263
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  ENV['TEST_API_VERSION'] = '1.17'
2
4
 
3
5
  require File.join(Gem.loaded_specs['hammer_cli_foreman'].full_gem_path, 'test/unit/test_helper')
@@ -7,10 +9,10 @@ require 'hammer_cli_foreman_remote_execution/remote_execution_feature'
7
9
  describe HammerCLIForemanRemoteExecution::RemoteExecutionFeature do
8
10
  include CommandTestHelper
9
11
 
10
- context 'ListCommand' do
12
+ describe 'ListCommand' do
11
13
  let(:cmd) { HammerCLIForemanRemoteExecution::RemoteExecutionFeature::ListCommand.new('', ctx) }
12
14
 
13
- context 'output' do
15
+ describe 'output' do
14
16
  with_params [] do
15
17
  let(:expected_record_count) { cmd.resource.call(:index)['results'].length }
16
18
  it_should_print_n_records
@@ -19,25 +21,24 @@ describe HammerCLIForemanRemoteExecution::RemoteExecutionFeature do
19
21
  end
20
22
  end
21
23
 
22
- context 'InfoCommand' do
24
+ describe 'InfoCommand' do
23
25
  let(:cmd) { HammerCLIForemanRemoteExecution::RemoteExecutionFeature::InfoCommand.new('', ctx) }
24
26
 
25
- context 'parameters' do
27
+ describe 'parameters' do
26
28
  it_should_accept 'required parameters', ['--name=foo']
27
29
  end
28
30
 
29
- context 'output' do
31
+ describe 'output' do
30
32
  with_params ['--id=1'] do
31
33
  it_should_print_columns ['ID', 'Label', 'Name', 'Description', 'Job template ID', 'Job template name']
32
34
  end
33
35
  end
34
36
  end
35
37
 
36
-
37
- context 'CreateCommand' do
38
+ describe 'CreateCommand' do
38
39
  let(:cmd) { HammerCLIForemanRemoteExecution::RemoteExecutionFeature::UpdateCommand.new('', ctx) }
39
40
 
40
- context 'parameters' do
41
+ describe 'parameters' do
41
42
  it_should_accept 'create options', ['--name=feature', "--job-template=asdf"]
42
43
  end
43
44
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  ENV['TEST_API_VERSION'] = '1.17'
2
4
 
3
5
  require File.join(Gem.loaded_specs['hammer_cli_foreman'].full_gem_path, 'test/unit/test_helper')
@@ -7,10 +9,10 @@ require 'hammer_cli_foreman_remote_execution/template_input'
7
9
  describe HammerCLIForemanRemoteExecution::TemplateInput do
8
10
  include CommandTestHelper
9
11
 
10
- context 'ListCommand' do
12
+ describe 'ListCommand' do
11
13
  let(:cmd) { HammerCLIForemanRemoteExecution::TemplateInput::ListCommand.new('', ctx) }
12
14
 
13
- context 'output' do
15
+ describe 'output' do
14
16
  with_params ['--template-id=1'] do
15
17
  let(:expected_record_count) { cmd.resource.call(:index, :template_id => 1)['results'].length }
16
18
  it_should_print_n_records
@@ -19,40 +21,40 @@ describe HammerCLIForemanRemoteExecution::TemplateInput do
19
21
  end
20
22
  end
21
23
 
22
- context 'InfoCommand' do
24
+ describe 'InfoCommand' do
23
25
  let(:cmd) { HammerCLIForemanRemoteExecution::TemplateInput::InfoCommand.new('', ctx) }
24
26
 
25
- context 'parameters' do
27
+ describe 'parameters' do
26
28
  it_should_accept 'required parameters', ['--template-id=template', '--name=foo']
27
29
  end
28
30
 
29
- context 'output' do
31
+ describe 'output' do
30
32
  with_params ['--template-id=1', '--id=1'] do
31
33
  it_should_print_columns ['ID', 'Name', 'Input type', 'Fact name', 'Variable name', 'Puppet parameter name']
32
34
  end
33
35
  end
34
36
  end
35
37
 
36
- context 'DeleteCommand' do
38
+ describe 'DeleteCommand' do
37
39
  let(:cmd) { HammerCLIForemanRemoteExecution::TemplateInput::DeleteCommand.new('', ctx) }
38
40
 
39
- context 'parameters' do
41
+ describe 'parameters' do
40
42
  it_should_accept 'required parameters', ['--template-id=template', '--name=foo']
41
43
  end
42
44
  end
43
45
 
44
- context 'CreateCommand' do
46
+ describe 'CreateCommand' do
45
47
  let(:cmd) { HammerCLIForemanRemoteExecution::TemplateInput::CreateCommand.new('', ctx) }
46
48
 
47
- context 'parameters' do
49
+ describe 'parameters' do
48
50
  it_should_accept 'create options', ['--template-id=1', "--name=asdf", '--input-type=user']
49
51
  end
50
52
  end
51
53
 
52
- context 'UpdateCommand' do
54
+ describe 'UpdateCommand' do
53
55
  let(:cmd) { HammerCLIForemanRemoteExecution::TemplateInput::UpdateCommand.new('', ctx) }
54
56
 
55
- context 'parameters' do
57
+ describe 'parameters' do
56
58
  it_should_accept 'update options', ['--template-id=1', '--name=asdf', '--input-type=user', '--new-name=fdsa']
57
59
  end
58
60
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hammer_cli_foreman_remote_execution
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Foreman Remote Execution team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-23 00:00:00.000000000 Z
11
+ date: 2025-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hammer_cli_foreman
@@ -44,7 +44,7 @@ dependencies:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
46
  version: 0.0.3
47
- description: CLI for the Foreman remote execution plugin
47
+ description: This gem provides CLI support for the Foreman remote execution plugin
48
48
  email:
49
49
  - foreman-dev@googlegroups.com
50
50
  executables: []
@@ -53,8 +53,10 @@ extra_rdoc_files:
53
53
  - README.md
54
54
  - LICENSE
55
55
  files:
56
+ - ".github/workflows/ci_test.yml"
56
57
  - ".gitignore"
57
58
  - ".rubocop.yml"
59
+ - ".rubocop_todo.yml"
58
60
  - ".travis.yml"
59
61
  - ".tx/config"
60
62
  - Gemfile
@@ -76,18 +78,35 @@ files:
76
78
  - lib/hammer_cli_foreman_remote_execution/version.rb
77
79
  - locale/Makefile
78
80
  - locale/README.md
79
- - locale/de/hammer-cli-foreman-remote-execution.po
80
- - locale/en/hammer-cli-foreman-remote-execution.po
81
- - locale/es/hammer-cli-foreman-remote-execution.po
82
- - locale/fr/hammer-cli-foreman-remote-execution.po
83
- - locale/hammer-cli-foreman-remote-execution.pot
84
- - locale/it/hammer-cli-foreman-remote-execution.po
85
- - locale/ja/hammer-cli-foreman-remote-execution.po
86
- - locale/ko/hammer-cli-foreman-remote-execution.po
87
- - locale/pt_BR/hammer-cli-foreman-remote-execution.po
88
- - locale/ru/hammer-cli-foreman-remote-execution.po
89
- - locale/zh_CN/hammer-cli-foreman-remote-execution.po
90
- - locale/zh_TW/hammer-cli-foreman-remote-execution.po
81
+ - locale/ca/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo
82
+ - locale/ca/hammer_cli_foreman_remote_execution.po
83
+ - locale/cs_CZ/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo
84
+ - locale/cs_CZ/hammer_cli_foreman_remote_execution.po
85
+ - locale/de/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo
86
+ - locale/de/hammer_cli_foreman_remote_execution.po
87
+ - locale/en/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo
88
+ - locale/en/hammer_cli_foreman_remote_execution.po
89
+ - locale/es/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo
90
+ - locale/es/hammer_cli_foreman_remote_execution.po
91
+ - locale/fr/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo
92
+ - locale/fr/hammer_cli_foreman_remote_execution.po
93
+ - locale/hammer_cli_foreman_remote_execution.pot
94
+ - locale/it/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo
95
+ - locale/it/hammer_cli_foreman_remote_execution.po
96
+ - locale/ja/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo
97
+ - locale/ja/hammer_cli_foreman_remote_execution.po
98
+ - locale/ka/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo
99
+ - locale/ka/hammer_cli_foreman_remote_execution.po
100
+ - locale/ko/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo
101
+ - locale/ko/hammer_cli_foreman_remote_execution.po
102
+ - locale/pt_BR/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo
103
+ - locale/pt_BR/hammer_cli_foreman_remote_execution.po
104
+ - locale/ru/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo
105
+ - locale/ru/hammer_cli_foreman_remote_execution.po
106
+ - locale/zh_CN/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo
107
+ - locale/zh_CN/hammer_cli_foreman_remote_execution.po
108
+ - locale/zh_TW/LC_MESSAGES/hammer_cli_foreman_remote_execution.mo
109
+ - locale/zh_TW/hammer_cli_foreman_remote_execution.po
91
110
  - test/data/1.14/foreman_api.json
92
111
  - test/data/1.16/foreman_api.json
93
112
  - test/data/1.17/foreman_api.json
@@ -110,14 +129,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
110
129
  requirements:
111
130
  - - ">="
112
131
  - !ruby/object:Gem::Version
113
- version: '0'
132
+ version: '2.7'
133
+ - - "<"
134
+ - !ruby/object:Gem::Version
135
+ version: '4'
114
136
  required_rubygems_version: !ruby/object:Gem::Requirement
115
137
  requirements:
116
138
  - - ">="
117
139
  - !ruby/object:Gem::Version
118
140
  version: '0'
119
141
  requirements: []
120
- rubygems_version: 3.3.20
142
+ rubygems_version: 3.2.33
121
143
  signing_key:
122
144
  specification_version: 4
123
145
  summary: CLI for the Foreman remote execution plugin
@@ -1,262 +0,0 @@
1
- # SOME DESCRIPTIVE TITLE.
2
- # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
- # This file is distributed under the same license as the hammer_cli_foreman_tasks package.
4
- # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
- #
6
- msgid ""
7
- msgstr ""
8
- "Project-Id-Version: hammer-cli-foreman-remote-execution 0.2.0\n"
9
- "Report-Msgid-Bugs-To: \n"
10
- "PO-Revision-Date: 2016-02-18 10:36-0500\n"
11
- "Last-Translator: Carmela Rubiños <carmela.rubinos@gmail.com>, 2017\n"
12
- "Language-Team: Spanish (https://www.transifex.com/foreman/teams/114/es/)\n"
13
- "MIME-Version: 1.0\n"
14
- "Content-Type: text/plain; charset=UTF-8\n"
15
- "Content-Transfer-Encoding: 8bit\n"
16
- "Language: es\n"
17
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
-
19
- msgid "Manage foreign input sets"
20
- msgstr ""
21
-
22
- msgid "ID"
23
- msgstr "ID"
24
-
25
- #, fuzzy
26
- msgid "Target template ID"
27
- msgstr "ID"
28
-
29
- msgid "Target template name"
30
- msgstr ""
31
-
32
- msgid "Name"
33
- msgstr "Nombre"
34
-
35
- msgid "Include all"
36
- msgstr ""
37
-
38
- msgid "Include"
39
- msgstr ""
40
-
41
- msgid "Exclude"
42
- msgstr ""
43
-
44
- msgid "Foreign input set updated"
45
- msgstr ""
46
-
47
- msgid "Could not update the input set"
48
- msgstr ""
49
-
50
- msgid "Foreign input set created"
51
- msgstr ""
52
-
53
- msgid "Could not create the input set"
54
- msgstr ""
55
-
56
- msgid "Foreign input set deleted"
57
- msgstr ""
58
-
59
- msgid "Could not delete the input set"
60
- msgstr ""
61
-
62
- msgid "Description"
63
- msgstr ""
64
-
65
- #, fuzzy
66
- msgid "Status"
67
- msgstr "Estado"
68
-
69
- msgid "Success"
70
- msgstr ""
71
-
72
- msgid "Failed"
73
- msgstr ""
74
-
75
- msgid "Pending"
76
- msgstr ""
77
-
78
- msgid "Total"
79
- msgstr ""
80
-
81
- #, fuzzy
82
- msgid "Start"
83
- msgstr "Estado"
84
-
85
- msgid "Job Category"
86
- msgstr ""
87
-
88
- msgid "Mode"
89
- msgstr ""
90
-
91
- msgid "Cron line"
92
- msgstr "Línea Cron"
93
-
94
- #, fuzzy
95
- msgid "Recurring logic ID"
96
- msgstr "ID"
97
-
98
- msgid "Hosts"
99
- msgstr ""
100
-
101
- msgid "View the output for a host"
102
- msgstr ""
103
-
104
- msgid "Do not wait for job to complete, shows current output only"
105
- msgstr ""
106
-
107
- msgid "The job is scheduled to start at %{timestamp}"
108
- msgstr ""
109
-
110
- msgid "Job invocation %{id} created"
111
- msgstr ""
112
-
113
- msgid "Schedule the execution for a later time"
114
- msgstr ""
115
-
116
- msgid "Execution should be cancelled if it cannot be started before --start-at"
117
- msgstr ""
118
-
119
- msgid "Create a recurring execution"
120
- msgstr ""
121
-
122
- msgid "Perform no more executions after this time, used with --cron-line"
123
- msgstr ""
124
-
125
- msgid "Specify inputs from command line"
126
- msgstr ""
127
-
128
- msgid "Read input values from files"
129
- msgstr ""
130
-
131
- msgid "Dynamic search queries are evaluated at run time"
132
- msgstr ""
133
-
134
- msgid "Cancel the job"
135
- msgstr ""
136
-
137
- msgid "Job invocation %{id} cancelled"
138
- msgstr ""
139
-
140
- msgid "Could not cancel the job invocation"
141
- msgstr ""
142
-
143
- msgid "Rerun the job"
144
- msgstr ""
145
-
146
- msgid "Job invocation was rerun as %{id}"
147
- msgstr ""
148
-
149
- msgid "Manage job invocations"
150
- msgstr ""
151
-
152
- msgid "Provider"
153
- msgstr ""
154
-
155
- msgid "Type"
156
- msgstr ""
157
-
158
- msgid "Inputs"
159
- msgstr ""
160
-
161
- msgid "View job template content"
162
- msgstr ""
163
-
164
- msgid "Path to a file that contains the template"
165
- msgstr ""
166
-
167
- msgid "Job template created"
168
- msgstr ""
169
-
170
- msgid "Could not create the job template"
171
- msgstr ""
172
-
173
- msgid "Path to a file that contains the template - must include ERB metadata"
174
- msgstr ""
175
-
176
- msgid "Job template imported"
177
- msgstr ""
178
-
179
- msgid "Could not import the job template"
180
- msgstr ""
181
-
182
- msgid "Export a template including all metadata"
183
- msgstr ""
184
-
185
- msgid "Job template updated"
186
- msgstr ""
187
-
188
- msgid "Could not update the job template"
189
- msgstr ""
190
-
191
- msgid "Job template deleted"
192
- msgstr ""
193
-
194
- msgid "Could not delete the job template"
195
- msgstr ""
196
-
197
- msgid "Manage job templates"
198
- msgstr ""
199
-
200
- msgid ""
201
- "Comma-separated list of key=file, where file is a path to a text file to be re"
202
- "ad"
203
- msgstr ""
204
-
205
- #, fuzzy
206
- msgid ""
207
- "Cron line format 'a b c d e', where:\n"
208
- " a. is minute (range: 0-59)\n"
209
- " b. is hour (range: 0-23)\n"
210
- " c. is day of month (range: 1-31)\n"
211
- " d. is month (range: 1-12)\n"
212
- " e. is day of week (range: 0-6)"
213
- msgstr "Línea Cron"
214
-
215
- msgid "Manage remote execution features"
216
- msgstr ""
217
-
218
- msgid "Job template name"
219
- msgstr ""
220
-
221
- msgid "Label"
222
- msgstr ""
223
-
224
- #, fuzzy
225
- msgid "Job template ID"
226
- msgstr "ID"
227
-
228
- msgid "Remote execution feature updated"
229
- msgstr ""
230
-
231
- msgid "Could not update the remote execution feature"
232
- msgstr ""
233
-
234
- msgid "Manage template inputs"
235
- msgstr ""
236
-
237
- msgid "Input type"
238
- msgstr ""
239
-
240
- msgid "Fact name"
241
- msgstr ""
242
-
243
- msgid "Variable name"
244
- msgstr ""
245
-
246
- msgid "Puppet parameter name"
247
- msgstr ""
248
-
249
- msgid "Options"
250
- msgstr ""
251
-
252
- msgid "Template input created"
253
- msgstr ""
254
-
255
- msgid "Could not create the template input"
256
- msgstr ""
257
-
258
- msgid "Template input deleted"
259
- msgstr ""
260
-
261
- msgid "Could not delete the template input"
262
- msgstr ""