foreman_remote_execution 0.1.2 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +3 -0
  3. data/.rubocop_todo.yml +0 -6
  4. data/app/assets/javascripts/template_input.js +5 -0
  5. data/app/assets/javascripts/template_invocation.js +44 -12
  6. data/app/controllers/api/v2/foreign_input_sets_controller.rb +80 -0
  7. data/app/controllers/api/v2/job_invocations_controller.rb +28 -14
  8. data/app/controllers/api/v2/job_templates_controller.rb +24 -20
  9. data/app/controllers/api/v2/template_inputs_controller.rb +10 -7
  10. data/app/controllers/job_invocations_controller.rb +18 -6
  11. data/app/controllers/job_templates_controller.rb +14 -4
  12. data/app/controllers/template_invocations_controller.rb +5 -3
  13. data/app/helpers/concerns/foreman_remote_execution/hosts_helper_extensions.rb +1 -1
  14. data/app/helpers/concerns/foreman_remote_execution/job_templates_extensions.rb +19 -0
  15. data/app/helpers/remote_execution_helper.rb +88 -39
  16. data/app/lib/actions/remote_execution/run_host_job.rb +11 -8
  17. data/app/lib/actions/remote_execution/run_hosts_job.rb +5 -2
  18. data/app/lib/actions/remote_execution/run_proxy_command.rb +9 -4
  19. data/app/models/concerns/foreman_remote_execution/errors_flattener.rb +2 -2
  20. data/app/models/concerns/foreman_remote_execution/host_extensions.rb +2 -2
  21. data/app/models/concerns/foreman_remote_execution/smart_proxy_extensions.rb +1 -1
  22. data/app/models/concerns/foreman_remote_execution/template_extensions.rb +9 -1
  23. data/app/models/foreign_input_set.rb +49 -0
  24. data/app/models/host_status/execution_status.rb +50 -5
  25. data/app/models/input_template_renderer.rb +52 -7
  26. data/app/models/job_invocation.rb +89 -32
  27. data/app/models/job_invocation_composer.rb +71 -55
  28. data/app/models/job_template.rb +43 -7
  29. data/app/models/remote_execution_provider.rb +1 -1
  30. data/app/models/setting/remote_execution.rb +7 -7
  31. data/app/models/ssh_execution_provider.rb +1 -1
  32. data/app/models/targeting.rb +1 -1
  33. data/app/models/template_invocation.rb +9 -4
  34. data/app/views/api/v2/foreign_input_sets/base.json.rabl +3 -0
  35. data/app/views/api/v2/foreign_input_sets/create.json.rabl +3 -0
  36. data/app/views/api/v2/foreign_input_sets/index.json.rabl +3 -0
  37. data/app/views/api/v2/foreign_input_sets/main.json.rabl +5 -0
  38. data/app/views/api/v2/foreign_input_sets/show.json.rabl +3 -0
  39. data/app/views/api/v2/job_invocations/base.json.rabl +10 -1
  40. data/app/views/api/v2/job_invocations/main.json.rabl +14 -1
  41. data/app/views/api/v2/job_templates/base.json.rabl +1 -1
  42. data/app/views/api/v2/job_templates/main.json.rabl +9 -1
  43. data/app/views/api/v2/job_templates/show.json.rabl +0 -10
  44. data/app/views/api/v2/template_inputs/main.json.rabl +2 -1
  45. data/app/views/job_invocation_task_groups/_job_invocation_task_group.html.erb +1 -1
  46. data/app/views/job_invocations/_description_fields.html.erb +4 -0
  47. data/app/views/job_invocations/_form.html.erb +73 -91
  48. data/app/views/job_invocations/_host_actions_td.html.erb +2 -2
  49. data/app/views/job_invocations/_host_name_td.html.erb +7 -0
  50. data/app/views/job_invocations/_tab_hosts.html.erb +6 -6
  51. data/app/views/job_invocations/_tab_overview.html.erb +3 -3
  52. data/app/views/job_invocations/index.html.erb +6 -4
  53. data/app/views/job_invocations/refresh.js.erb +1 -0
  54. data/app/views/job_invocations/show.html.erb +1 -1
  55. data/app/views/job_invocations/show.js.erb +6 -3
  56. data/app/views/job_templates/_custom_tabs.html.erb +24 -14
  57. data/app/views/job_templates/index.html.erb +3 -1
  58. data/app/views/template_inputs/_foreign_input_set_form.html.erb +12 -0
  59. data/app/views/template_inputs/_form.html.erb +11 -12
  60. data/app/views/template_invocations/show.html.erb +2 -2
  61. data/app/views/templates/package_action.erb +2 -2
  62. data/app/views/templates/puppet_run_once.erb +3 -3
  63. data/app/views/templates/run_command.erb +3 -3
  64. data/app/views/templates/service_action.erb +2 -2
  65. data/app/views/unattended/snippets/_remote_execution_ssh_keys.erb +1 -1
  66. data/config/routes.rb +5 -3
  67. data/db/migrate/20150616080015_create_template_input.rb +1 -1
  68. data/db/migrate/20150708133241_add_targeting.rb +7 -7
  69. data/db/migrate/20150708133242_add_invocation.rb +2 -2
  70. data/db/migrate/20150708133305_add_template_invocation.rb +6 -6
  71. data/db/migrate/20151215114631_add_host_id_to_template_invocation.rb +3 -3
  72. data/db/migrate/20151217092555_migrate_to_task_groups.rb +1 -1
  73. data/db/migrate/20160108134600_create_template_input_sets.rb +16 -0
  74. data/db/migrate/20160108141144_make_job_name_default_to_something.rb +9 -0
  75. data/db/migrate/20160111113032_upcase_ssh_feature.rb +19 -0
  76. data/db/migrate/20160113161916_add_run_host_job_task_id_to_template_invocation.rb +6 -0
  77. data/db/migrate/20160113162007_expand_all_template_invocations.rb +45 -0
  78. data/db/migrate/20160114120200_rename_job_categories.rb +20 -0
  79. data/db/migrate/20160114125628_rename_job_name_to_job_category.rb +19 -0
  80. data/db/seeds.d/60-ssh_proxy_feature.rb +1 -1
  81. data/db/seeds.d/80-provision_templates.rb +2 -2
  82. data/db/seeds.d/90-bookmarks.rb +19 -0
  83. data/doc/plugins/graphviz.rb +5 -5
  84. data/doc/plugins/plantuml.rb +6 -6
  85. data/doc/plugins/tags.rb +4 -4
  86. data/foreman_remote_execution.gemspec +3 -4
  87. data/lib/foreman_remote_execution/engine.rb +12 -9
  88. data/lib/foreman_remote_execution/version.rb +1 -1
  89. data/test/factories/foreman_remote_execution_factories.rb +11 -9
  90. data/test/functional/api/v2/foreign_input_sets_controller_test.rb +63 -0
  91. data/test/functional/api/v2/job_invocations_controller_test.rb +45 -13
  92. data/test/functional/api/v2/job_templates_controller_test.rb +6 -6
  93. data/test/functional/api/v2/template_inputs_controller_test.rb +3 -3
  94. data/test/unit/actions/run_hosts_job_test.rb +3 -4
  95. data/test/unit/actions/run_proxy_command_test.rb +7 -7
  96. data/test/unit/concerns/host_extensions_test.rb +1 -1
  97. data/test/unit/execution_task_status_mapper_test.rb +93 -0
  98. data/test/unit/input_template_renderer_test.rb +182 -9
  99. data/test/unit/job_invocation_composer_test.rb +144 -168
  100. data/test/unit/job_invocation_test.rb +67 -15
  101. data/test/unit/job_template_effective_user_test.rb +2 -2
  102. data/test/unit/job_template_test.rb +36 -12
  103. data/test/unit/remote_execution_provider_test.rb +6 -6
  104. data/test/unit/targeting_test.rb +2 -2
  105. metadata +27 -21
  106. data/app/models/concerns/foreman_remote_execution/template_relations.rb +0 -10
  107. data/app/views/job_invocations/_host_provider_td.html.erb +0 -3
  108. data/app/views/job_templates/auto_complete_job_name.json.erb +0 -3
@@ -5,41 +5,55 @@ describe JobInvocation do
5
5
  let(:job_invocation) { FactoryGirl.build(:job_invocation) }
6
6
  let(:template) { FactoryGirl.create(:job_template, :with_input) }
7
7
 
8
- context 'Search for job invocations' do
8
+ context 'search for job invocations' do
9
9
  before do
10
10
  job_invocation.save
11
11
  end
12
12
 
13
13
  it 'is able to perform search through job invocations' do
14
- found_jobs = JobInvocation.search_for(%{job_name = "#{job_invocation.job_name}"}).paginate(:page => 1).with_task.order('job_invocations.id DESC')
14
+ found_jobs = JobInvocation.search_for(%{job_category = "#{job_invocation.job_category}"}).paginate(:page => 1).with_task.order('job_invocations.id DESC')
15
15
  found_jobs.must_equal [job_invocation]
16
16
  end
17
17
  end
18
18
 
19
- context 'Able to be created' do
19
+ context 'able to be created' do
20
20
  it { assert job_invocation.save }
21
21
  end
22
22
 
23
- context 'Requires targeting' do
23
+ context 'requires targeting' do
24
24
  before { job_invocation.targeting = nil }
25
25
 
26
26
  it { refute_valid job_invocation }
27
27
  end
28
28
 
29
+ context 'can delete a host' do
30
+ let(:host) do
31
+ FactoryGirl.create(:host)
32
+ end
33
+
34
+ it 'can remove a host' do
35
+ job_invocation.template_invocations.build(:host_id => host.id, :template_id => template.id)
36
+ job_invocation.save!
37
+ host.destroy
38
+ job_invocation.reload
39
+ job_invocation.template_invocations.must_be_empty
40
+ end
41
+ end
42
+
29
43
  context 'has template invocations with input values' do
30
44
  let(:job_invocation) { FactoryGirl.create(:job_invocation, :with_template) }
31
45
 
32
46
  before do
33
- input = job_invocation.template_invocations.first.template.template_inputs.create!(:name => 'foo', :required => true, :input_type => 'user')
47
+ input = job_invocation.pattern_template_invocations.first.template.template_inputs.create!(:name => 'foo', :required => true, :input_type => 'user')
34
48
  @input_value = FactoryGirl.create(:template_invocation_input_value,
35
- :template_invocation => job_invocation.template_invocations.first,
36
- :template_input => input)
49
+ :template_invocation => job_invocation.pattern_template_invocations.first,
50
+ :template_input => input)
37
51
  job_invocation.reload
38
- job_invocation.template_invocations.first.reload
52
+ job_invocation.pattern_template_invocations.first.reload
39
53
  end
40
54
 
41
- it { refute job_invocation.reload.template_invocations.empty? }
42
- it { refute job_invocation.reload.template_invocations.first.input_values.empty? }
55
+ it { refute job_invocation.reload.pattern_template_invocations.empty? }
56
+ it { refute job_invocation.reload.pattern_template_invocations.first.input_values.empty? }
43
57
 
44
58
  it 'validates required inputs have values' do
45
59
  assert job_invocation.valid?
@@ -50,27 +64,65 @@ describe JobInvocation do
50
64
  describe 'descriptions' do
51
65
  it 'generates description from input values' do
52
66
  job_invocation.expects(:save!)
53
- job_invocation.description_format = '%{job_name} - %{foo}'
67
+ job_invocation.description_format = '%{job_category} - %{foo}'
54
68
  job_invocation.generate_description!
55
- job_invocation.description.must_equal "#{job_invocation.job_name} - #{@input_value.value}"
69
+ job_invocation.description.must_equal "#{job_invocation.job_category} - #{@input_value.value}"
56
70
  end
57
71
 
58
72
  it 'handles missing keys correctly' do
59
73
  job_invocation.expects(:save!)
60
- job_invocation.description_format = '%{job_name} - %{missing_key}'
74
+ job_invocation.description_format = '%{job_category} - %{missing_key}'
75
+ job_invocation.generate_description!
76
+ job_invocation.description.must_equal "#{job_invocation.job_category} - %{missing_key}"
77
+ end
78
+
79
+ it 'truncates generated description to 255 characters' do
80
+ column_limit = 255
81
+ expected_result = 'a' * column_limit
82
+ JobInvocation.columns_hash['description'].expects(:limit).returns(column_limit)
83
+ job_invocation.expects(:save!)
84
+ job_invocation.description_format = '%{job_category}'
85
+ job_invocation.job_category = 'a' * 1000
61
86
  job_invocation.generate_description!
62
- job_invocation.description.must_equal "#{job_invocation.job_name} - %{missing_key}"
87
+ job_invocation.description.must_equal expected_result
63
88
  end
64
89
  end
65
90
  end
66
91
 
67
92
  context 'future execution' do
68
-
69
93
  it 'can report host count' do
70
94
  job_invocation.total_hosts_count.must_equal 'N/A'
71
95
  job_invocation.targeting.expects(:resolved_at).returns(Time.now)
72
96
  job_invocation.total_hosts_count.must_equal 0
73
97
  end
74
98
 
99
+ # task does not exist
100
+ specify { job_invocation.status.must_equal HostStatus::ExecutionStatus::QUEUED }
101
+ specify { job_invocation.status_label.must_equal HostStatus::ExecutionStatus::STATUS_NAMES[HostStatus::ExecutionStatus::QUEUED] }
102
+ specify { job_invocation.progress.must_equal 0 }
103
+ end
104
+
105
+ context 'with task' do
106
+ let(:task) { ForemanTasks::Task.new }
107
+ before { job_invocation.task = task }
108
+
109
+ context 'which is scheduled' do
110
+ before { task.state = 'scheduled' }
111
+
112
+ specify { job_invocation.status.must_equal HostStatus::ExecutionStatus::QUEUED }
113
+ specify { job_invocation.queued?.must_equal true }
114
+ specify { job_invocation.progress.must_equal 0 }
115
+ end
116
+
117
+ context 'with succeeded task' do
118
+ before do
119
+ task.state = 'stopped'
120
+ task.result = 'success'
121
+ end
122
+
123
+ specify { job_invocation.status.must_equal HostStatus::ExecutionStatus::OK }
124
+ specify { job_invocation.queued?.must_equal false }
125
+ specify { job_invocation.progress.must_equal 100 }
126
+ end
75
127
  end
76
128
  end
@@ -1,7 +1,7 @@
1
1
  require 'test_plugin_helper'
2
2
 
3
3
  describe JobTemplateEffectiveUser do
4
- let(:job_template) { FactoryGirl.build(:job_template, :job_name => '') }
4
+ let(:job_template) { FactoryGirl.build(:job_template, :job_category => '') }
5
5
  let(:effective_user) { job_template.effective_user }
6
6
 
7
7
  before do
@@ -33,7 +33,7 @@ describe JobTemplateEffectiveUser do
33
33
  end
34
34
 
35
35
  it 'returns a default value when no value is specified for the user' do
36
- effective_user.value = ""
36
+ effective_user.value = ''
37
37
  Setting[:remote_execution_effective_user] = 'myuser'
38
38
  effective_user.compute_value.must_equal 'myuser'
39
39
  end
@@ -2,21 +2,35 @@ require 'test_plugin_helper'
2
2
 
3
3
  describe JobTemplate do
4
4
  context 'when creating a template' do
5
- let(:job_template) { FactoryGirl.build(:job_template, :job_name => '') }
5
+ let(:job_template) { FactoryGirl.build(:job_template, :job_category => '') }
6
+ let(:template_with_inputs) do
7
+ FactoryGirl.build(:job_template, :template => 'test').tap do |template|
8
+ template.template_inputs << FactoryGirl.build(:template_input, :name => 'command', :input_type => 'user')
9
+ template.save!
10
+ end
11
+ end
6
12
 
7
- it 'needs a job_name' do
13
+ it 'needs a job_category' do
8
14
  refute job_template.valid?
9
15
  end
10
16
 
11
- it 'does not need a job_name if it is a snippet' do
17
+ it 'does not need a job_category if it is a snippet' do
12
18
  job_template.snippet = true
13
19
  assert job_template.valid?
14
20
  end
21
+
22
+ it 'validates the inputs are uniq in the template' do
23
+ job_template.job_category = 'Miscellaneous'
24
+ job_template.foreign_input_sets << FactoryGirl.build(:foreign_input_set, :target_template => template_with_inputs)
25
+ job_template.foreign_input_sets << FactoryGirl.build(:foreign_input_set, :target_template => template_with_inputs)
26
+ refute job_template.valid?
27
+ job_template.errors.full_messages.first.must_include 'Duplicated inputs detected: ["command"]'
28
+ end
15
29
  end
16
30
 
17
31
  context 'description format' do
18
- let(:template_with_description) { FactoryGirl.build(:job_template, :with_description_format, :job_name => 'test job') }
19
- let(:template) { FactoryGirl.build(:job_template, :with_input, :job_name => 'test job') }
32
+ let(:template_with_description) { FactoryGirl.build(:job_template, :with_description_format, :job_category => 'test job') }
33
+ let(:template) { FactoryGirl.build(:job_template, :with_input, :job_category => 'test job') }
20
34
  let(:minimal_template) { FactoryGirl.build(:job_template) }
21
35
 
22
36
  it 'uses the description_format attribute if set' do
@@ -24,14 +38,14 @@ describe JobTemplate do
24
38
  end
25
39
 
26
40
  it 'uses the job name as description_format if not set or blank and has no inputs' do
27
- minimal_template.generate_description_format.must_equal '%{job_name}'
41
+ minimal_template.generate_description_format.must_equal '%{job_category}'
28
42
  minimal_template.description_format = ''
29
- minimal_template.generate_description_format.must_equal '%{job_name}'
43
+ minimal_template.generate_description_format.must_equal '%{job_category}'
30
44
  end
31
45
 
32
46
  it 'generates the description_format if not set or blank and has inputs' do
33
47
  input_name = template.template_inputs.first.name
34
- expected_result = %Q(%{job_name} with inputs #{input_name}="%{#{input_name}}")
48
+ expected_result = %Q(%{job_category} with inputs #{input_name}="%{#{input_name}}")
35
49
  template.generate_description_format.must_equal expected_result
36
50
  template.description_format = ''
37
51
  template.generate_description_format.must_equal expected_result
@@ -58,8 +72,8 @@ describe JobTemplate do
58
72
  <%#
59
73
  kind: job_template
60
74
  name: Service Restart
61
- job_name: Service Restart
62
- provider_type: Ssh
75
+ job_category: Service Restart
76
+ provider_type: SSH
63
77
  template_inputs:
64
78
  - name: service_name
65
79
  input_type: user
@@ -91,13 +105,23 @@ describe JobTemplate do
91
105
 
92
106
  context 'there is existing template invocation of a job template' do
93
107
  let(:job_invocation) { FactoryGirl.create(:job_invocation, :with_template) }
94
- let(:job_template) { job_invocation.template_invocations.first.template }
108
+ let(:job_template) { job_invocation.pattern_template_invocations.first.template }
95
109
 
96
110
  describe 'job template deletion' do
97
111
  it 'succeeds' do
98
- job_template.template_invocations.wont_be_empty
112
+ job_template.pattern_template_invocations.wont_be_empty
99
113
  assert job_template.destroy
100
114
  end
101
115
  end
102
116
  end
117
+
118
+ context 'template locked' do
119
+ it 'inputs cannot be changed' do
120
+ job_template = FactoryGirl.create(:job_template, :with_input, :locked => true)
121
+ Foreman.expects(:in_rake?).returns(false).at_least_once
122
+ assert_valid job_template
123
+ job_template.template_inputs.first.name = 'something else'
124
+ refute_valid job_template
125
+ end
126
+ end
103
127
  end
@@ -5,10 +5,10 @@ describe RemoteExecutionProvider do
5
5
  let(:providers) { RemoteExecutionProvider.providers }
6
6
  it { providers.must_be_kind_of HashWithIndifferentAccess }
7
7
  it 'makes providers accessible using symbol' do
8
- providers[:Ssh].must_equal SSHExecutionProvider
8
+ providers[:SSH].must_equal SSHExecutionProvider
9
9
  end
10
10
  it 'makes providers accessible using string' do
11
- providers['Ssh'].must_equal SSHExecutionProvider
11
+ providers['SSH'].must_equal SSHExecutionProvider
12
12
  end
13
13
  end
14
14
 
@@ -24,11 +24,11 @@ describe RemoteExecutionProvider do
24
24
 
25
25
  describe '.provider_for' do
26
26
  it 'accepts symbols' do
27
- RemoteExecutionProvider.provider_for(:Ssh).must_equal SSHExecutionProvider
27
+ RemoteExecutionProvider.provider_for(:SSH).must_equal SSHExecutionProvider
28
28
  end
29
29
 
30
30
  it 'accepts strings' do
31
- RemoteExecutionProvider.provider_for('Ssh').must_equal SSHExecutionProvider
31
+ RemoteExecutionProvider.provider_for('SSH').must_equal SSHExecutionProvider
32
32
  end
33
33
  end
34
34
 
@@ -44,7 +44,7 @@ describe RemoteExecutionProvider do
44
44
  context 'provider is registetered under :custom symbol' do
45
45
  before { RemoteExecutionProvider.register(:Custom, String) }
46
46
 
47
- it { provider_names.must_include 'Ssh' }
47
+ it { provider_names.must_include 'SSH' }
48
48
  it { provider_names.must_include 'Custom' }
49
49
  end
50
50
  end
@@ -55,7 +55,7 @@ describe RemoteExecutionProvider do
55
55
  end
56
56
 
57
57
  let(:job_invocation) { FactoryGirl.create(:job_invocation, :with_template) }
58
- let(:template_invocation) { job_invocation.template_invocations.first }
58
+ let(:template_invocation) { job_invocation.pattern_template_invocations.first }
59
59
  let(:host) { FactoryGirl.create(:host) }
60
60
  let(:proxy_options) { SSHExecutionProvider.proxy_command_options(template_invocation, host) }
61
61
 
@@ -6,7 +6,7 @@ describe Targeting do
6
6
  let(:host) { FactoryGirl.create(:host) }
7
7
 
8
8
  before do
9
- bookmark.query = "name = bar"
9
+ bookmark.query = 'name = bar'
10
10
  end
11
11
 
12
12
  describe '#resolved?' do
@@ -23,7 +23,7 @@ describe Targeting do
23
23
  end
24
24
 
25
25
  context 'able to be created with search term' do
26
- before { targeting.search_query = "name = foo" }
26
+ before { targeting.search_query = 'name = foo' }
27
27
  it { assert targeting.save }
28
28
  end
29
29
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_remote_execution
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.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: 2015-12-17 00:00:00.000000000 Z
11
+ date: 2016-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deface
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: rails
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: 3.2.8
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: 3.2.8
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: dynflow
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -58,14 +44,14 @@ dependencies:
58
44
  requirements:
59
45
  - - "~>"
60
46
  - !ruby/object:Gem::Version
61
- version: 0.7.8
47
+ version: 0.7.11
62
48
  type: :runtime
63
49
  prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
52
  - - "~>"
67
53
  - !ruby/object:Gem::Version
68
- version: 0.7.8
54
+ version: 0.7.11
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: rubocop
71
57
  requirement: !ruby/object:Gem::Requirement
@@ -154,6 +140,7 @@ files:
154
140
  - app/assets/javascripts/template_invocation.js
155
141
  - app/assets/stylesheets/job_invocations.css.scss
156
142
  - app/assets/stylesheets/template_invocation.css.scss
143
+ - app/controllers/api/v2/foreign_input_sets_controller.rb
157
144
  - app/controllers/api/v2/job_invocations_controller.rb
158
145
  - app/controllers/api/v2/job_templates_controller.rb
159
146
  - app/controllers/api/v2/template_inputs_controller.rb
@@ -161,6 +148,7 @@ files:
161
148
  - app/controllers/job_templates_controller.rb
162
149
  - app/controllers/template_invocations_controller.rb
163
150
  - app/helpers/concerns/foreman_remote_execution/hosts_helper_extensions.rb
151
+ - app/helpers/concerns/foreman_remote_execution/job_templates_extensions.rb
164
152
  - app/helpers/remote_execution_helper.rb
165
153
  - app/lib/actions/middleware/bind_job_invocation.rb
166
154
  - app/lib/actions/remote_execution/helpers/live_output.rb
@@ -179,8 +167,8 @@ files:
179
167
  - app/models/concerns/foreman_remote_execution/subnet_extensions.rb
180
168
  - app/models/concerns/foreman_remote_execution/taxonomy_extensions.rb
181
169
  - app/models/concerns/foreman_remote_execution/template_extensions.rb
182
- - app/models/concerns/foreman_remote_execution/template_relations.rb
183
170
  - app/models/concerns/foreman_remote_execution/user_extensions.rb
171
+ - app/models/foreign_input_set.rb
184
172
  - app/models/host_status/execution_status.rb
185
173
  - app/models/input_template_renderer.rb
186
174
  - app/models/job_invocation.rb
@@ -203,6 +191,11 @@ files:
203
191
  - app/overrides/foreman/subnets/_rex_tab_pane.html.erb
204
192
  - app/overrides/subnet_proxies.rb
205
193
  - app/services/proxy_load_balancer.rb
194
+ - app/views/api/v2/foreign_input_sets/base.json.rabl
195
+ - app/views/api/v2/foreign_input_sets/create.json.rabl
196
+ - app/views/api/v2/foreign_input_sets/index.json.rabl
197
+ - app/views/api/v2/foreign_input_sets/main.json.rabl
198
+ - app/views/api/v2/foreign_input_sets/show.json.rabl
206
199
  - app/views/api/v2/job_invocations/base.json.rabl
207
200
  - app/views/api/v2/job_invocations/create.json.rabl
208
201
  - app/views/api/v2/job_invocations/index.json.rabl
@@ -222,9 +215,10 @@ files:
222
215
  - app/views/dashboard/.gitkeep
223
216
  - app/views/job_invocation_task_groups/_job_invocation_task_group.html.erb
224
217
  - app/views/job_invocation_task_groups/_job_invocation_task_groups.html.erb
218
+ - app/views/job_invocations/_description_fields.html.erb
225
219
  - app/views/job_invocations/_form.html.erb
226
220
  - app/views/job_invocations/_host_actions_td.html.erb
227
- - app/views/job_invocations/_host_provider_td.html.erb
221
+ - app/views/job_invocations/_host_name_td.html.erb
228
222
  - app/views/job_invocations/_host_status_td.html.erb
229
223
  - app/views/job_invocations/_preview_hosts_list.html.erb
230
224
  - app/views/job_invocations/_preview_hosts_modal.html.erb
@@ -237,10 +231,10 @@ files:
237
231
  - app/views/job_invocations/show.js.erb
238
232
  - app/views/job_templates/_custom_tab_headers.html.erb
239
233
  - app/views/job_templates/_custom_tabs.html.erb
240
- - app/views/job_templates/auto_complete_job_name.json.erb
241
234
  - app/views/job_templates/edit.html.erb
242
235
  - app/views/job_templates/index.html.erb
243
236
  - app/views/job_templates/new.html.erb
237
+ - app/views/template_inputs/_foreign_input_set_form.html.erb
244
238
  - app/views/template_inputs/_form.html.erb
245
239
  - app/views/template_invocations/_output_line_set.html.erb
246
240
  - app/views/template_invocations/_refresh.js.erb
@@ -272,9 +266,17 @@ files:
272
266
  - db/migrate/20151203100824_add_description_to_job_invocation.rb
273
267
  - db/migrate/20151215114631_add_host_id_to_template_invocation.rb
274
268
  - db/migrate/20151217092555_migrate_to_task_groups.rb
269
+ - db/migrate/20160108134600_create_template_input_sets.rb
270
+ - db/migrate/20160108141144_make_job_name_default_to_something.rb
271
+ - db/migrate/20160111113032_upcase_ssh_feature.rb
272
+ - db/migrate/20160113161916_add_run_host_job_task_id_to_template_invocation.rb
273
+ - db/migrate/20160113162007_expand_all_template_invocations.rb
274
+ - db/migrate/20160114120200_rename_job_categories.rb
275
+ - db/migrate/20160114125628_rename_job_name_to_job_category.rb
275
276
  - db/seeds.d/60-ssh_proxy_feature.rb
276
277
  - db/seeds.d/70-job_templates.rb
277
278
  - db/seeds.d/80-provision_templates.rb
279
+ - db/seeds.d/90-bookmarks.rb
278
280
  - doc/.bin/.gitkeep
279
281
  - doc/.gitignore
280
282
  - doc/Gemfile
@@ -322,6 +324,7 @@ files:
322
324
  - locale/foreman_remote_execution.pot
323
325
  - locale/gemspec.rb
324
326
  - test/factories/foreman_remote_execution_factories.rb
327
+ - test/functional/api/v2/foreign_input_sets_controller_test.rb
325
328
  - test/functional/api/v2/job_invocations_controller_test.rb
326
329
  - test/functional/api/v2/job_templates_controller_test.rb
327
330
  - test/functional/api/v2/template_inputs_controller_test.rb
@@ -330,6 +333,7 @@ files:
330
333
  - test/unit/actions/run_proxy_command_test.rb
331
334
  - test/unit/concerns/host_extensions_test.rb
332
335
  - test/unit/concerns/nic_extensions_test.rb
336
+ - test/unit/execution_task_status_mapper_test.rb
333
337
  - test/unit/input_template_renderer_test.rb
334
338
  - test/unit/job_invocation_composer_test.rb
335
339
  - test/unit/job_invocation_test.rb
@@ -366,6 +370,7 @@ summary: A plugin bringing remote execution to the Foreman, completing the confi
366
370
  management functionality with remote management functionality.
367
371
  test_files:
368
372
  - test/factories/foreman_remote_execution_factories.rb
373
+ - test/functional/api/v2/foreign_input_sets_controller_test.rb
369
374
  - test/functional/api/v2/job_invocations_controller_test.rb
370
375
  - test/functional/api/v2/job_templates_controller_test.rb
371
376
  - test/functional/api/v2/template_inputs_controller_test.rb
@@ -374,6 +379,7 @@ test_files:
374
379
  - test/unit/actions/run_proxy_command_test.rb
375
380
  - test/unit/concerns/host_extensions_test.rb
376
381
  - test/unit/concerns/nic_extensions_test.rb
382
+ - test/unit/execution_task_status_mapper_test.rb
377
383
  - test/unit/input_template_renderer_test.rb
378
384
  - test/unit/job_invocation_composer_test.rb
379
385
  - test/unit/job_invocation_test.rb