foreman_remote_execution 1.4.1 → 1.4.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 +5 -5
- data/.rubocop.yml +11 -9
- data/.rubocop_todo.yml +146 -116
- data/app/controllers/api/v2/job_invocations_controller.rb +6 -1
- data/app/controllers/api/v2/job_templates_controller.rb +0 -1
- data/app/controllers/job_invocations_controller.rb +6 -1
- data/app/lib/actions/remote_execution/run_host_job.rb +1 -1
- data/app/models/concerns/foreman_remote_execution/errors_flattener.rb +3 -0
- data/app/models/concerns/foreman_remote_execution/host_extensions.rb +1 -1
- data/app/models/concerns/foreman_remote_execution/subnet_extensions.rb +1 -1
- data/app/models/foreign_input_set.rb +1 -1
- data/app/models/job_invocation.rb +1 -1
- data/app/models/job_invocation_composer.rb +2 -2
- data/app/models/job_invocation_task_group.rb +1 -1
- data/app/models/job_template.rb +3 -3
- data/app/models/job_template_effective_user.rb +1 -1
- data/app/models/remote_execution_feature.rb +1 -1
- data/app/models/target_remote_execution_proxy.rb +1 -1
- data/app/models/targeting.rb +2 -2
- data/app/models/targeting_host.rb +1 -1
- data/app/models/template_input.rb +1 -1
- data/app/models/template_invocation.rb +1 -1
- data/app/models/template_invocation_input_value.rb +1 -1
- data/db/migrate/20150612121541_add_job_template_to_template.rb +1 -1
- data/db/migrate/20150616080015_create_template_input.rb +1 -1
- data/db/migrate/20150708133241_add_targeting.rb +1 -1
- data/db/migrate/20150708133242_add_invocation.rb +1 -1
- data/db/migrate/20150708133305_add_template_invocation.rb +1 -1
- data/db/migrate/20150812110800_add_resolved_at_to_targeting.rb +1 -1
- data/db/migrate/20150812145900_add_last_task_id_to_job_invocation.rb +1 -1
- data/db/migrate/20150826191632_create_target_remote_execution_proxies.rb +1 -1
- data/db/migrate/20150827144500_change_targeting_search_query_type.rb +1 -1
- data/db/migrate/20150827152730_add_options_to_template_input.rb +1 -1
- data/db/migrate/20150903192731_add_execution_to_interface.rb +2 -2
- data/db/migrate/20150923125825_add_job_invocation_task_group.rb +1 -1
- data/db/migrate/20151013135415_add_pub_key_to_smart_proxy.rb +1 -1
- data/db/migrate/20151022105508_rename_last_task_id_column.rb +1 -1
- data/db/migrate/20151116105412_add_triggering_to_job_invocation.rb +1 -1
- data/db/migrate/20151120171100_add_effective_user_to_template_invocation.rb +1 -1
- data/db/migrate/20151124162300_create_job_template_effective_users.rb +1 -1
- data/db/migrate/20151203100824_add_description_to_job_invocation.rb +1 -1
- data/db/migrate/20151215114631_add_host_id_to_template_invocation.rb +2 -2
- data/db/migrate/20151217092555_migrate_to_task_groups.rb +2 -2
- data/db/migrate/20160108134600_create_template_input_sets.rb +1 -1
- data/db/migrate/20160108141144_make_job_name_default_to_something.rb +1 -1
- data/db/migrate/20160111113032_upcase_ssh_feature.rb +2 -2
- data/db/migrate/20160113161916_add_run_host_job_task_id_to_template_invocation.rb +1 -1
- data/db/migrate/20160113162007_expand_all_template_invocations.rb +3 -3
- data/db/migrate/20160114120200_rename_job_categories.rb +1 -1
- data/db/migrate/20160114125628_rename_job_name_to_job_category.rb +1 -1
- data/db/migrate/20160118124600_create_remote_execution_features.rb +1 -1
- data/db/migrate/20160125155108_make_job_template_name_unique.rb +1 -1
- data/db/migrate/20160127134031_add_advanced_to_template_input.rb +1 -1
- data/db/migrate/20160127162711_reword_puppet_template_description.rb +1 -1
- data/db/migrate/20160203104056_add_concurrency_options_to_job_invocation.rb +1 -1
- data/db/migrate/20160926225841_update_template_input_value.rb +1 -1
- data/db/migrate/20170110145641_add_host_action_button_to_remote_execution_feature.rb +1 -1
- data/db/migrate/20170613101039_add_timeout_to_job_templates_and_job_invocations.rb +1 -1
- data/db/migrate/20180110104432_rename_template_invocation_permission.rb +25 -0
- data/db/migrate/20180112125015_fix_taxable_taxonomies_job_template.rb +14 -0
- data/db/seeds.d/90-bookmarks.rb +1 -1
- data/foreman_remote_execution.gemspec +2 -1
- data/lib/foreman_remote_execution/engine.rb +3 -3
- data/lib/foreman_remote_execution/version.rb +1 -1
- data/test/benchmark/run_hosts_job_benchmark.rb +10 -10
- data/test/benchmark/targeting_benchmark.rb +6 -6
- data/test/factories/foreman_remote_execution_factories.rb +14 -14
- data/test/functional/api/v2/foreign_input_sets_controller_test.rb +10 -15
- data/test/functional/api/v2/job_invocations_controller_test.rb +19 -8
- data/test/functional/api/v2/job_templates_controller_test.rb +12 -16
- data/test/functional/api/v2/remote_execution_features_controller_test.rb +3 -4
- data/test/functional/api/v2/template_inputs_controller_test.rb +8 -13
- data/test/test_plugin_helper.rb +4 -4
- data/test/unit/actions/run_hosts_job_test.rb +3 -3
- data/test/unit/concerns/exportable_test.rb +1 -1
- data/test/unit/concerns/foreman_tasks_cleaner_extensions_test.rb +2 -2
- data/test/unit/concerns/host_extensions_test.rb +20 -20
- data/test/unit/concerns/nic_extensions_test.rb +1 -1
- data/test/unit/input_template_renderer_test.rb +86 -86
- data/test/unit/job_invocation_composer_test.rb +17 -16
- data/test/unit/job_invocation_test.rb +10 -10
- data/test/unit/job_template_effective_user_test.rb +2 -2
- data/test/unit/job_template_importer_test.rb +3 -3
- data/test/unit/job_template_test.rb +15 -15
- data/test/unit/remote_execution_feature_test.rb +3 -3
- data/test/unit/remote_execution_provider_test.rb +15 -15
- data/test/unit/targeting_test.rb +3 -3
- data/test/unit/template_input_test.rb +1 -1
- data/test/unit/template_invocation_input_value_test.rb +17 -17
- metadata +19 -77
- data/doc/.gitignore +0 -7
- data/doc/Gemfile +0 -7
- data/doc/Rakefile +0 -41
- data/doc/_config.yml +0 -33
- data/doc/plugins/alert_block.rb +0 -27
- data/doc/plugins/div_tag.rb +0 -24
- data/doc/plugins/graphviz.rb +0 -121
- data/doc/plugins/plantuml.rb +0 -84
- data/doc/plugins/play.rb +0 -13
- data/doc/plugins/tags.rb +0 -137
- data/doc/plugins/toc.rb +0 -19
- data/doc/source/.nojekyll +0 -0
- data/doc/source/404.md +0 -6
- data/doc/source/_includes/footer.html +0 -21
- data/doc/source/_includes/header.html +0 -59
- data/doc/source/_includes/tocify.html +0 -6
- data/doc/source/_layouts/default.html +0 -9
- data/doc/source/_layouts/page.html +0 -25
- data/doc/source/atom.xml +0 -32
- data/doc/source/design/index.md +0 -1322
- data/doc/source/design/wireframes.pdf +0 -0
- data/doc/source/index.md +0 -18
- data/doc/source/static/css/bootstrap-responsive.min.css +0 -9
- data/doc/source/static/css/bootstrap.min.css +0 -866
- data/doc/source/static/css/jquery.tocify.css +0 -128
- data/doc/source/static/css/style.css +0 -285
- data/doc/source/static/css/syntax.css +0 -60
- data/doc/source/static/images/foreman.png +0 -0
- data/doc/source/static/images/glyphicons-halflings-white.png +0 -0
- data/doc/source/static/images/glyphicons-halflings.png +0 -0
- data/doc/source/static/js/bootstrap.min.js +0 -7
- data/doc/source/static/js/jquery-ui-1.9.2.custom.min.js +0 -6
- data/doc/source/static/js/jquery.js +0 -2
- data/doc/source/static/js/jquery.tocify.min.js +0 -3
- data/doc/source/static/js/scroll.js +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 692272aa7e7c8d5bc38a8bcf9373d387dcdff4afa82709909bf77d389b29edee
|
4
|
+
data.tar.gz: 0c3e0531fb299378345f13bc4d7b4bc870cf7d659ba84e0363c283ca974b32b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 724ac1dd282ba907819d8adde27ad8ba8eab5aa1aceb5ecaaeaeba7fedf9c05087b4fa42522ec669db28e398f18d397d45c05c005f9c2a40bfe6a090d2ed790e
|
7
|
+
data.tar.gz: f3a9a2b127a21c8bebb0e3955d314ea57b829b4588347bbc93c3ffb51e90579eed00990143799243a9958c5339428f884f6258ed687e12bf5f12f6f70097698a
|
data/.rubocop.yml
CHANGED
@@ -11,9 +11,6 @@ Rails:
|
|
11
11
|
Rails/Date:
|
12
12
|
Enabled: false
|
13
13
|
|
14
|
-
Rails/HttpPositionalArguments:
|
15
|
-
Enabled: false
|
16
|
-
|
17
14
|
# Don't enforce documentation
|
18
15
|
Style/Documentation:
|
19
16
|
Enabled: false
|
@@ -27,7 +24,7 @@ Style/TrailingCommaInLiteral:
|
|
27
24
|
#Style/TrailingCommaInArguments:
|
28
25
|
#Enabled: false
|
29
26
|
|
30
|
-
|
27
|
+
Naming/AccessorMethodName:
|
31
28
|
Enabled: false
|
32
29
|
|
33
30
|
Style/RedundantSelf:
|
@@ -38,7 +35,7 @@ Metrics/ClassLength:
|
|
38
35
|
Exclude:
|
39
36
|
- 'test/**/*'
|
40
37
|
|
41
|
-
|
38
|
+
Naming/FileName:
|
42
39
|
Exclude:
|
43
40
|
- 'db/seeds.d/*'
|
44
41
|
|
@@ -69,7 +66,7 @@ Metrics/BlockLength:
|
|
69
66
|
Metrics/ParameterLists:
|
70
67
|
Enabled: false
|
71
68
|
|
72
|
-
|
69
|
+
Naming/VariableNumber:
|
73
70
|
Enabled: false
|
74
71
|
|
75
72
|
# a == 0 is not the same as a.zero?, when a is not a number
|
@@ -85,9 +82,14 @@ Rails/SkipsModelValidations:
|
|
85
82
|
Style/SymbolArray:
|
86
83
|
Enabled: false
|
87
84
|
|
88
|
-
|
89
|
-
Rails/ApplicationRecord:
|
85
|
+
Style/FormatString:
|
90
86
|
Enabled: false
|
91
87
|
|
92
|
-
|
88
|
+
Naming/HeredocDelimiterNaming:
|
89
|
+
Enabled: false
|
90
|
+
|
91
|
+
Style/RescueStandardError:
|
92
|
+
Enabled: false
|
93
|
+
|
94
|
+
Lint/BooleanSymbol:
|
93
95
|
Enabled: false
|
data/.rubocop_todo.yml
CHANGED
@@ -1,198 +1,228 @@
|
|
1
1
|
# This configuration was generated by
|
2
|
-
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
2
|
+
# `rubocop --auto-gen-config --exclude-limit 0`
|
3
|
+
# on 2017-12-25 00:41:15 +0100 using RuboCop version 0.52.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count:
|
9
|
+
# Offense count: 2
|
10
10
|
# Cop supports --auto-correct.
|
11
|
-
# Configuration parameters:
|
12
|
-
|
11
|
+
# Configuration parameters: Include, TreatCommentsAsGroupSeparators.
|
12
|
+
# Include: **/*.gemspec
|
13
|
+
Gemspec/OrderedDependencies:
|
13
14
|
Enabled: false
|
14
15
|
|
15
|
-
# Offense count:
|
16
|
+
# Offense count: 16
|
16
17
|
# Cop supports --auto-correct.
|
17
|
-
# Configuration parameters:
|
18
|
-
|
18
|
+
# Configuration parameters: EnforcedStyle, IndentOneStep, IndentationWidth.
|
19
|
+
# SupportedStyles: case, end
|
20
|
+
Layout/CaseIndentation:
|
21
|
+
Enabled: false
|
22
|
+
|
23
|
+
# Offense count: 6
|
24
|
+
# Cop supports --auto-correct.
|
25
|
+
Layout/EmptyLines:
|
19
26
|
Enabled: false
|
20
27
|
|
21
28
|
# Offense count: 1
|
22
|
-
|
29
|
+
# Cop supports --auto-correct.
|
30
|
+
Layout/EmptyLinesAroundArguments:
|
23
31
|
Enabled: false
|
24
32
|
|
25
|
-
# Offense count:
|
26
|
-
|
27
|
-
|
33
|
+
# Offense count: 8
|
34
|
+
# Cop supports --auto-correct.
|
35
|
+
# Configuration parameters: EnforcedStyle.
|
36
|
+
# SupportedStyles: empty_lines, no_empty_lines
|
37
|
+
Layout/EmptyLinesAroundBlockBody:
|
38
|
+
Enabled: false
|
39
|
+
|
40
|
+
# Offense count: 22
|
41
|
+
# Cop supports --auto-correct.
|
42
|
+
# Configuration parameters: EnforcedStyle.
|
43
|
+
# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
|
44
|
+
Layout/EmptyLinesAroundClassBody:
|
45
|
+
Enabled: false
|
28
46
|
|
29
47
|
# Offense count: 3
|
30
|
-
|
31
|
-
|
48
|
+
# Cop supports --auto-correct.
|
49
|
+
# Configuration parameters: EnforcedStyle.
|
50
|
+
# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
|
51
|
+
Layout/EmptyLinesAroundModuleBody:
|
52
|
+
Enabled: false
|
32
53
|
|
33
|
-
# Offense count:
|
34
|
-
# Configuration parameters: AllowURI, URISchemes.
|
54
|
+
# Offense count: 907
|
55
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
56
|
+
# URISchemes: http, https
|
35
57
|
Metrics/LineLength:
|
36
58
|
Max: 204
|
37
59
|
|
38
|
-
# Offense count:
|
39
|
-
|
40
|
-
|
60
|
+
# Offense count: 1
|
61
|
+
# Cop supports --auto-correct.
|
62
|
+
# Configuration parameters: Width, IgnoredPatterns.
|
63
|
+
Layout/IndentationWidth:
|
64
|
+
Enabled: false
|
41
65
|
|
42
|
-
# Offense count:
|
43
|
-
#
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
66
|
+
# Offense count: 8
|
67
|
+
# Cop supports --auto-correct.
|
68
|
+
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
69
|
+
# SupportedStyles: aligned, indented
|
70
|
+
Layout/MultilineOperationIndentation:
|
71
|
+
Enabled: false
|
48
72
|
|
49
|
-
# Offense count:
|
73
|
+
# Offense count: 2
|
50
74
|
# Cop supports --auto-correct.
|
51
|
-
|
52
|
-
Style/CaseIndentation:
|
75
|
+
Layout/SpaceAfterComma:
|
53
76
|
Enabled: false
|
54
77
|
|
55
78
|
# Offense count: 4
|
56
79
|
# Cop supports --auto-correct.
|
57
|
-
# Configuration parameters:
|
58
|
-
|
80
|
+
# Configuration parameters: AllowForAlignment.
|
81
|
+
Layout/SpaceAroundOperators:
|
59
82
|
Enabled: false
|
60
83
|
|
61
|
-
# Offense count:
|
62
|
-
|
63
|
-
|
64
|
-
|
84
|
+
# Offense count: 44
|
85
|
+
# Cop supports --auto-correct.
|
86
|
+
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBrackets.
|
87
|
+
# SupportedStyles: space, no_space, compact
|
88
|
+
# SupportedStylesForEmptyBrackets: space, no_space
|
89
|
+
Layout/SpaceInsideArrayLiteralBrackets:
|
90
|
+
Enabled: false
|
65
91
|
|
66
|
-
# Offense count:
|
92
|
+
# Offense count: 97
|
67
93
|
# Cop supports --auto-correct.
|
68
|
-
|
94
|
+
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
|
95
|
+
# SupportedStyles: space, no_space, compact
|
96
|
+
# SupportedStylesForEmptyBraces: space, no_space
|
97
|
+
Layout/SpaceInsideHashLiteralBraces:
|
69
98
|
Enabled: false
|
70
99
|
|
71
|
-
# Offense count:
|
100
|
+
# Offense count: 6
|
101
|
+
# Configuration parameters: MaximumRangeSize.
|
102
|
+
Lint/MissingCopEnableDirective:
|
103
|
+
Enabled: false
|
104
|
+
|
105
|
+
# Offense count: 11
|
72
106
|
# Cop supports --auto-correct.
|
73
|
-
# Configuration parameters:
|
74
|
-
|
107
|
+
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
|
108
|
+
Lint/UnusedBlockArgument:
|
75
109
|
Enabled: false
|
76
110
|
|
77
|
-
# Offense count:
|
111
|
+
# Offense count: 15
|
78
112
|
# Cop supports --auto-correct.
|
79
|
-
# Configuration parameters:
|
80
|
-
|
113
|
+
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
|
114
|
+
Lint/UnusedMethodArgument:
|
115
|
+
Enabled: false
|
116
|
+
|
117
|
+
# Offense count: 1
|
118
|
+
Lint/UselessAssignment:
|
81
119
|
Enabled: false
|
82
120
|
|
121
|
+
# Offense count: 42
|
122
|
+
Metrics/AbcSize:
|
123
|
+
Max: 40
|
124
|
+
|
83
125
|
# Offense count: 3
|
84
|
-
|
85
|
-
|
86
|
-
|
126
|
+
Metrics/CyclomaticComplexity:
|
127
|
+
Max: 8
|
128
|
+
|
129
|
+
# Offense count: 7
|
130
|
+
# Configuration parameters: Include.
|
131
|
+
# Include: db/migrate/*.rb
|
132
|
+
Rails/CreateTableWithTimestamps:
|
87
133
|
Enabled: false
|
88
134
|
|
89
|
-
# Offense count:
|
90
|
-
# Configuration parameters:
|
91
|
-
|
92
|
-
|
93
|
-
- 'app/controllers/job_templates_controller.rb'
|
94
|
-
- 'app/lib/actions/remote_execution/run_hosts_job.rb'
|
95
|
-
|
96
|
-
# Offense count: 9
|
97
|
-
# Configuration parameters: MinBodyLength.
|
98
|
-
Style/GuardClause:
|
99
|
-
Exclude:
|
100
|
-
- 'app/controllers/api/v2/template_inputs_controller.rb'
|
101
|
-
- 'app/models/concerns/foreman_remote_execution/errors_flattener.rb'
|
102
|
-
- 'app/models/concerns/foreman_remote_execution/nic_extensions.rb'
|
103
|
-
- 'app/models/job_template.rb'
|
104
|
-
- 'app/models/targeting.rb'
|
105
|
-
- 'app/models/template_invocation.rb'
|
106
|
-
|
107
|
-
# Offense count: 1299
|
108
|
-
# Cop supports --auto-correct.
|
109
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues.
|
110
|
-
Style/HashSyntax:
|
135
|
+
# Offense count: 27
|
136
|
+
# Configuration parameters: Include.
|
137
|
+
# Include: app/models/**/*.rb
|
138
|
+
Rails/InverseOf:
|
111
139
|
Enabled: false
|
112
140
|
|
113
141
|
# Offense count: 1
|
114
|
-
#
|
115
|
-
#
|
116
|
-
|
117
|
-
|
118
|
-
- 'app/models/template_invocation.rb'
|
142
|
+
# Configuration parameters: Include.
|
143
|
+
# Include: app/controllers/**/*.rb
|
144
|
+
Rails/LexicallyScopedActionFilter:
|
145
|
+
Enabled: false
|
119
146
|
|
120
|
-
# Offense count:
|
147
|
+
# Offense count: 3
|
121
148
|
# Cop supports --auto-correct.
|
122
|
-
|
149
|
+
Rails/Presence:
|
123
150
|
Enabled: false
|
124
151
|
|
125
|
-
# Offense count:
|
126
|
-
#
|
127
|
-
#
|
128
|
-
|
152
|
+
# Offense count: 3
|
153
|
+
# Configuration parameters: EnforcedStyle.
|
154
|
+
# SupportedStyles: strict, flexible
|
155
|
+
Rails/TimeZone:
|
129
156
|
Enabled: false
|
130
157
|
|
131
|
-
# Offense count:
|
158
|
+
# Offense count: 3
|
132
159
|
# Cop supports --auto-correct.
|
133
|
-
# Configuration parameters:
|
134
|
-
|
160
|
+
# Configuration parameters: Keywords.
|
161
|
+
# Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW
|
162
|
+
Style/CommentAnnotation:
|
135
163
|
Enabled: false
|
136
164
|
|
137
165
|
# Offense count: 1
|
138
|
-
|
139
|
-
Style/RaiseArgs:
|
166
|
+
Style/DoubleNegation:
|
140
167
|
Enabled: false
|
141
168
|
|
142
|
-
# Offense count:
|
169
|
+
# Offense count: 1
|
143
170
|
# Cop supports --auto-correct.
|
144
|
-
|
145
|
-
|
171
|
+
Style/Encoding:
|
172
|
+
Enabled: false
|
173
|
+
|
174
|
+
# Offense count: 18
|
175
|
+
# Configuration parameters: EnforcedStyle.
|
176
|
+
# SupportedStyles: annotated, template, unannotated
|
177
|
+
Style/FormatStringToken:
|
146
178
|
Enabled: false
|
147
179
|
|
148
|
-
# Offense count:
|
180
|
+
# Offense count: 1481
|
149
181
|
# Cop supports --auto-correct.
|
150
|
-
# Configuration parameters: EnforcedStyle,
|
151
|
-
|
182
|
+
# Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
|
183
|
+
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
|
184
|
+
Style/HashSyntax:
|
152
185
|
Enabled: false
|
153
186
|
|
154
|
-
# Offense count:
|
155
|
-
#
|
156
|
-
Style/
|
157
|
-
|
158
|
-
- 'app/models/job_template.rb'
|
187
|
+
# Offense count: 14
|
188
|
+
# Cop supports --auto-correct.
|
189
|
+
Style/IfUnlessModifier:
|
190
|
+
Enabled: false
|
159
191
|
|
160
|
-
# Offense count:
|
192
|
+
# Offense count: 12
|
161
193
|
# Cop supports --auto-correct.
|
162
|
-
Style/
|
163
|
-
|
164
|
-
- 'test/functional/api/v2/job_invocations_controller_test.rb'
|
194
|
+
Style/LineEndConcatenation:
|
195
|
+
Enabled: false
|
165
196
|
|
166
|
-
# Offense count:
|
197
|
+
# Offense count: 17
|
167
198
|
# Cop supports --auto-correct.
|
168
|
-
# Configuration parameters:
|
169
|
-
Style/
|
170
|
-
|
171
|
-
- 'db/migrate/20150708133242_add_invocation.rb'
|
172
|
-
- 'test/unit/input_template_renderer_test.rb'
|
173
|
-
- 'test/unit/job_invocation_composer_test.rb'
|
199
|
+
# Configuration parameters: PreferredDelimiters.
|
200
|
+
Style/PercentLiteralDelimiters:
|
201
|
+
Enabled: false
|
174
202
|
|
175
|
-
# Offense count:
|
203
|
+
# Offense count: 1
|
176
204
|
# Cop supports --auto-correct.
|
177
|
-
|
205
|
+
# Configuration parameters: EnforcedStyle.
|
206
|
+
# SupportedStyles: compact, exploded
|
207
|
+
Style/RaiseArgs:
|
178
208
|
Enabled: false
|
179
209
|
|
180
|
-
# Offense count:
|
210
|
+
# Offense count: 14
|
181
211
|
# Cop supports --auto-correct.
|
182
|
-
# Configuration parameters:
|
183
|
-
Style/
|
212
|
+
# Configuration parameters: AllowMultipleReturnValues.
|
213
|
+
Style/RedundantReturn:
|
184
214
|
Enabled: false
|
185
215
|
|
186
|
-
# Offense count:
|
216
|
+
# Offense count: 4
|
187
217
|
# Cop supports --auto-correct.
|
188
|
-
# Configuration parameters: EnforcedStyle,
|
218
|
+
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
219
|
+
# SupportedStyles: single_quotes, double_quotes
|
189
220
|
Style/StringLiterals:
|
190
|
-
|
191
|
-
- 'locale/action_names.rb'
|
221
|
+
Enabled: false
|
192
222
|
|
193
223
|
# Offense count: 1
|
194
224
|
# Cop supports --auto-correct.
|
195
225
|
# Configuration parameters: IgnoredMethods.
|
226
|
+
# IgnoredMethods: respond_to, define_method
|
196
227
|
Style/SymbolProc:
|
197
|
-
|
198
|
-
- 'app/models/concerns/foreman_remote_execution/host_extensions.rb'
|
228
|
+
Enabled: false
|
@@ -2,7 +2,6 @@ module Api
|
|
2
2
|
module V2
|
3
3
|
class JobInvocationsController < ::Api::V2::BaseController
|
4
4
|
include ::Api::Version2
|
5
|
-
include ::Api::TaxonomyScope
|
6
5
|
include ::Foreman::Renderer
|
7
6
|
|
8
7
|
before_action :find_optional_nested_object
|
@@ -71,6 +70,10 @@ module Api
|
|
71
70
|
param :host_id, :identifier, :required => true
|
72
71
|
param :since, String, :required => false
|
73
72
|
def output
|
73
|
+
if @nested_obj.task.delayed?
|
74
|
+
render :json => { :refresh => true, :output => [], :delayed => true, :start_at => @nested_obj.task.start_at }
|
75
|
+
return
|
76
|
+
end
|
74
77
|
task = @nested_obj.sub_task_for_host(@host)
|
75
78
|
refresh = task.pending?
|
76
79
|
since = params[:since].to_f if params[:since].present?
|
@@ -111,6 +114,8 @@ module Api
|
|
111
114
|
def job_invocation_params
|
112
115
|
job_invocation_params = params.fetch(:job_invocation, {}).dup
|
113
116
|
job_invocation_params.merge!(job_invocation_params.delete(:ssh)) if job_invocation_params.key?(:ssh)
|
117
|
+
job_invocation_params[:inputs] ||= {}
|
118
|
+
job_invocation_params[:inputs].permit!
|
114
119
|
job_invocation_params
|
115
120
|
end
|
116
121
|
end
|
@@ -2,7 +2,6 @@ module Api
|
|
2
2
|
module V2
|
3
3
|
class JobTemplatesController < ::Api::V2::BaseController
|
4
4
|
include ::Api::Version2
|
5
|
-
include ::Api::TaxonomyScope
|
6
5
|
include ::Foreman::Renderer
|
7
6
|
include ::Foreman::Controller::ProvisioningTemplates
|
8
7
|
include ::Foreman::Controller::Parameters::JobTemplate
|
@@ -89,7 +89,12 @@ class JobInvocationsController < ApplicationController
|
|
89
89
|
if params[:feature].present?
|
90
90
|
JobInvocationComposer.for_feature(params[:feature], params[:host_ids], {})
|
91
91
|
else
|
92
|
-
|
92
|
+
# triggering_params is a Hash
|
93
|
+
# when a hash is merged into ActionController::Parameters,
|
94
|
+
# it is assumed not to be #permitted?
|
95
|
+
with_triggering = params.merge(:triggering => triggering_params)
|
96
|
+
with_triggering[:triggering].permit!
|
97
|
+
JobInvocationComposer.from_ui_params(with_triggering)
|
93
98
|
end
|
94
99
|
end
|
95
100
|
end
|