foreman_remote_execution 0.0.6 → 0.0.7
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 +4 -4
- data/app/assets/javascripts/execution_interface.js +6 -0
- data/app/assets/javascripts/template_invocation.js +18 -0
- data/app/assets/stylesheets/template_invocation.css.scss +53 -0
- data/app/controllers/api/v2/job_invocations_controller.rb +64 -0
- data/app/controllers/job_invocations_controller.rb +11 -2
- data/app/controllers/template_invocations_controller.rb +16 -0
- data/app/helpers/remote_execution_helper.rb +78 -15
- data/app/lib/actions/middleware/bind_job_invocation.rb +29 -0
- data/app/lib/actions/remote_execution/run_host_job.rb +20 -53
- data/app/lib/actions/remote_execution/run_hosts_job.rb +30 -9
- data/app/lib/actions/remote_execution/run_proxy_command.rb +64 -3
- data/app/models/concerns/foreman_remote_execution/host_extensions.rb +43 -5
- data/app/models/concerns/foreman_remote_execution/nic_extensions.rb +25 -0
- data/app/models/concerns/foreman_remote_execution/subnet_extensions.rb +10 -0
- data/app/models/concerns/foreman_remote_execution/taxonomy_extensions.rb +16 -0
- data/app/models/input_template_renderer.rb +5 -1
- data/app/models/job_invocation.rb +74 -7
- data/app/models/job_invocation_api_composer.rb +62 -0
- data/app/models/job_invocation_composer.rb +4 -1
- data/app/models/job_template.rb +2 -4
- data/app/models/setting/remote_execution.rb +6 -2
- data/app/models/target_remote_execution_proxy.rb +4 -0
- data/app/models/template_input.rb +14 -2
- data/app/models/template_invocation.rb +12 -1
- data/app/models/template_invocation_input_value.rb +1 -1
- data/app/overrides/execution_interface.rb +9 -0
- data/app/overrides/foreman/nics/_execution_interface.html.erb +1 -0
- data/app/overrides/foreman/subnets/_rex_tab.html.erb +1 -0
- data/app/overrides/foreman/subnets/_rex_tab_pane.html.erb +5 -0
- data/app/overrides/subnet_proxies.rb +9 -0
- data/app/services/proxy_load_balancer.rb +30 -0
- data/app/views/api/v2/job_invocations/base.json.rabl +3 -0
- data/app/views/api/v2/job_invocations/create.json.rabl +3 -0
- data/app/views/api/v2/job_invocations/index.json.rabl +3 -0
- data/app/views/api/v2/job_invocations/main.json.rabl +3 -0
- data/app/views/api/v2/job_invocations/show.json.rabl +18 -0
- data/app/views/api/v2/job_templates/base.json.rabl +1 -1
- data/app/views/job_invocations/_form.html.erb +9 -0
- data/app/views/job_invocations/_tab_hosts.html.erb +10 -14
- data/app/views/job_invocations/_tab_overview.html.erb +2 -9
- data/app/views/job_invocations/show.html.erb +8 -1
- data/app/views/job_invocations/show.js.erb +6 -0
- data/app/views/template_invocations/_output_line_set.html.erb +7 -0
- data/app/views/template_invocations/_refresh.js.erb +7 -0
- data/app/views/template_invocations/show.html.erb +38 -0
- data/app/views/template_invocations/show.js.erb +16 -0
- data/config/routes.rb +4 -0
- data/db/migrate/20150826191632_create_target_remote_execution_proxies.rb +14 -0
- data/db/migrate/20150903192731_add_execution_to_interface.rb +22 -0
- data/doc/source/design/index.md +5 -0
- data/doc/source/design/wireframes.pdf +0 -0
- data/lib/foreman_remote_execution.rb +1 -1
- data/lib/foreman_remote_execution/engine.rb +13 -4
- data/lib/foreman_remote_execution/version.rb +1 -1
- data/test/factories/foreman_remote_execution_factories.rb +46 -1
- data/test/functional/api/v2/job_invocations_controller_test.rb +45 -0
- data/test/test_plugin_helper.rb +18 -0
- data/test/unit/actions/run_hosts_job_test.rb +13 -8
- data/test/unit/actions/run_proxy_command_test.rb +109 -5
- data/test/unit/concerns/host_extensions_test.rb +90 -0
- data/test/unit/concerns/nic_extensions_test.rb +9 -0
- data/test/unit/input_template_renderer_test.rb +24 -10
- data/test/unit/job_invocation_api_composer_test.rb +117 -0
- data/test/unit/job_invocation_composer_test.rb +16 -1
- data/test/unit/job_invocation_test.rb +48 -3
- data/test/unit/proxy_load_balancer_test.rb +25 -0
- metadata +57 -4
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
require 'test_plugin_helper'
|
|
2
|
+
|
|
3
|
+
describe ForemanRemoteExecution::NicExtensions do
|
|
4
|
+
let(:host) { FactoryGirl.create(:host) }
|
|
5
|
+
|
|
6
|
+
it 'sets the first primary interface as the execution interface' do
|
|
7
|
+
host.execution_interface.must_equal host.interfaces.first
|
|
8
|
+
end
|
|
9
|
+
end
|
|
@@ -50,37 +50,50 @@ describe InputTemplateRenderer do
|
|
|
50
50
|
before do
|
|
51
51
|
template.template_inputs << FactoryGirl.build(:template_input, :name => 'service_name', :input_type => 'user')
|
|
52
52
|
job_invocation.template_invocations << template_invocation
|
|
53
|
-
renderer.invocation = template_invocation
|
|
54
53
|
end
|
|
55
54
|
|
|
56
55
|
describe 'rendering' do
|
|
57
|
-
it '
|
|
56
|
+
it 'cannot render the content without job invocation' do
|
|
58
57
|
refute result
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
it 'registers an error' do
|
|
62
|
-
result # let is lazy
|
|
63
58
|
renderer.error_message.wont_be_nil
|
|
64
59
|
renderer.error_message.wont_be_empty
|
|
65
60
|
end
|
|
66
61
|
|
|
62
|
+
it 'can preview' do
|
|
63
|
+
renderer.preview.must_equal 'service restart $USER_INPUT[service_name]'
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
context 'with invocation specified and a required input' do
|
|
67
|
+
before do
|
|
68
|
+
template.template_inputs.first.update_attributes(:required => true)
|
|
69
|
+
renderer.invocation = template_invocation
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
it 'cannot render the content' do
|
|
73
|
+
refute result
|
|
74
|
+
renderer.error_message.wont_be_nil
|
|
75
|
+
renderer.error_message.wont_be_empty
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
67
79
|
context 'with invocation specified' do
|
|
68
80
|
before do
|
|
69
81
|
FactoryGirl.create(:template_invocation_input_value,
|
|
70
82
|
:template_invocation => template_invocation,
|
|
71
83
|
:template_input => template.template_inputs.first,
|
|
72
84
|
:value => 'foreman')
|
|
85
|
+
renderer.invocation = template_invocation
|
|
86
|
+
renderer.invocation.reload
|
|
73
87
|
end
|
|
74
88
|
|
|
75
89
|
it 'can render with job invocation with corresponding value' do
|
|
76
90
|
renderer.render.must_equal 'service restart foreman'
|
|
77
91
|
end
|
|
78
92
|
end
|
|
79
|
-
end
|
|
80
93
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
renderer.
|
|
94
|
+
it 'renders even without an input value' do
|
|
95
|
+
renderer.invocation = template_invocation
|
|
96
|
+
renderer.render.must_equal 'service restart '
|
|
84
97
|
end
|
|
85
98
|
end
|
|
86
99
|
end
|
|
@@ -104,6 +117,7 @@ describe InputTemplateRenderer do
|
|
|
104
117
|
:template_invocation => template_invocation,
|
|
105
118
|
:template_input => template.template_inputs.first,
|
|
106
119
|
:value => 'foreman')
|
|
120
|
+
renderer.invocation.reload
|
|
107
121
|
end
|
|
108
122
|
|
|
109
123
|
it 'can render with job invocation with corresponding value' do
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
require 'test_plugin_helper'
|
|
2
|
+
|
|
3
|
+
describe JobInvocationApiComposer do
|
|
4
|
+
before do
|
|
5
|
+
permission1 = FactoryGirl.create(:permission, :name => 'view_job_templates', :resource_type => 'JobTemplate')
|
|
6
|
+
permission2 = Permission.find_by_name('view_bookmarks')
|
|
7
|
+
permission3 = Permission.find_by_name('view_hosts')
|
|
8
|
+
filter1 = FactoryGirl.build(:filter, :permissions => [permission1], :search => 'name ~ testing*')
|
|
9
|
+
filter2 = FactoryGirl.build(:filter, :permissions => [permission2])
|
|
10
|
+
filter3 = FactoryGirl.build(:filter, :permissions => [permission3])
|
|
11
|
+
filter1.save
|
|
12
|
+
filter2.save
|
|
13
|
+
filter3.save
|
|
14
|
+
role = FactoryGirl.build(:role)
|
|
15
|
+
role.filters = filter1, filter2, filter3
|
|
16
|
+
role.save
|
|
17
|
+
User.current = FactoryGirl.build(:user)
|
|
18
|
+
User.current.roles<< role
|
|
19
|
+
User.current.save
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
let(:testing_job_template_1) { FactoryGirl.create(:job_template, :job_name => 'testing_job_template_1', :name => 'testing1', :provider_type => 'Ssh') }
|
|
23
|
+
let(:testing_job_template_2) { FactoryGirl.create(:job_template, :job_name => 'testing_job_template_2', :name => 'testing2', :provider_type => 'Mcollective') }
|
|
24
|
+
let(:testing_job_template_3) { FactoryGirl.create(:job_template, :job_name => 'testing_job_template_1', :name => 'testing3', :provider_type => 'Ssh') }
|
|
25
|
+
let(:unauthorized_job_template_1) { FactoryGirl.create(:job_template, :job_name => 'testing_job_template_1', :name => 'unauth1', :provider_type => 'Ssh') }
|
|
26
|
+
let(:unauthorized_job_template_2) { FactoryGirl.create(:job_template, :job_name => 'unauthorized_job_template_2', :name => 'unauth2', :provider_type => 'Ansible') }
|
|
27
|
+
|
|
28
|
+
let(:input1) { FactoryGirl.create(:template_input, :template => testing_job_template_1, :input_type => 'user') }
|
|
29
|
+
let(:input2) { FactoryGirl.create(:template_input, :template => testing_job_template_3, :input_type => 'user') }
|
|
30
|
+
let(:unauthorized_input1) { FactoryGirl.create(:template_input, :template => unauthorized_job_template_1, :input_type => 'user') }
|
|
31
|
+
|
|
32
|
+
let(:bookmark) { bookmarks(:one) }
|
|
33
|
+
let(:providers_params) { { :providers => { :ansible => ansible_params, :ssh => ssh_params, :mcollective => mcollective_params } } }
|
|
34
|
+
|
|
35
|
+
context 'composer' do
|
|
36
|
+
it "creates invocation with a bookmark" do
|
|
37
|
+
params = {:job_name => testing_job_template_1.job_name,
|
|
38
|
+
:template_id => testing_job_template_1.id,
|
|
39
|
+
:targeting_type => "static_query",
|
|
40
|
+
:bookmark_id => bookmark.id}
|
|
41
|
+
ji = JobInvocation.new
|
|
42
|
+
|
|
43
|
+
composer = JobInvocationApiComposer.new(ji, User.current, params)
|
|
44
|
+
assert composer.save!
|
|
45
|
+
assert_equal bookmark, ji.targeting.bookmark
|
|
46
|
+
assert_equal ji.targeting.user, User.current
|
|
47
|
+
refute_empty ji.template_invocations
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
it "creates invocation with a search query" do
|
|
51
|
+
params = {:job_name => testing_job_template_1.job_name,
|
|
52
|
+
:template_id => testing_job_template_1.id,
|
|
53
|
+
:targeting_type => "static_query",
|
|
54
|
+
:search_query => "some hosts"}
|
|
55
|
+
ji = JobInvocation.new
|
|
56
|
+
|
|
57
|
+
composer = JobInvocationApiComposer.new(ji, User.current, params)
|
|
58
|
+
assert composer.save!
|
|
59
|
+
assert_equal "some hosts", ji.targeting.search_query
|
|
60
|
+
refute_empty ji.template_invocations
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
it "creates invocation with inputs" do
|
|
64
|
+
params = {:job_name => testing_job_template_1.job_name,
|
|
65
|
+
:template_id => testing_job_template_1.id,
|
|
66
|
+
:targeting_type => "static_query",
|
|
67
|
+
:search_query => "some hosts",
|
|
68
|
+
:inputs => [{:name => input1.name, :value => "some_value"}]}
|
|
69
|
+
ji = JobInvocation.new
|
|
70
|
+
|
|
71
|
+
composer = JobInvocationApiComposer.new(ji, User.current, params)
|
|
72
|
+
assert composer.save!
|
|
73
|
+
assert_equal 1, ji.template_invocations.first.input_values.count
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
it "handles errors on invalid targeting" do
|
|
77
|
+
params = {:job_name => testing_job_template_1.job_name,
|
|
78
|
+
:template_id => testing_job_template_1.id,
|
|
79
|
+
:search_query => "some hosts",
|
|
80
|
+
:inputs => [{:name => input1.name, :value => "some_value"}]}
|
|
81
|
+
ji = JobInvocation.new
|
|
82
|
+
|
|
83
|
+
composer = JobInvocationApiComposer.new(ji, User.current, params)
|
|
84
|
+
assert_raises(ActiveRecord::RecordInvalid) do
|
|
85
|
+
composer.save!
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
it "handles errors with both bookmark and search_query" do
|
|
90
|
+
params = {:job_name => testing_job_template_1.job_name,
|
|
91
|
+
:template_id => testing_job_template_1.id,
|
|
92
|
+
:targeting_type => "static_query",
|
|
93
|
+
:search_query => "some hosts",
|
|
94
|
+
:bookmark_id => bookmark.id,
|
|
95
|
+
:inputs => [{:name => input1.name, :value => "some_value"}]}
|
|
96
|
+
ji = JobInvocation.new
|
|
97
|
+
|
|
98
|
+
assert_raises(Foreman::Exception) do
|
|
99
|
+
JobInvocationApiComposer.new(ji, User.current, params)
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
it "handles errors on invalid inputs" do
|
|
104
|
+
params = {:job_name => testing_job_template_1.job_name,
|
|
105
|
+
:template_id => testing_job_template_1.id,
|
|
106
|
+
:targeting_type => "static_query",
|
|
107
|
+
:search_query => "some hosts",
|
|
108
|
+
:inputs => [{:name => input1.name}]}
|
|
109
|
+
ji = JobInvocation.new
|
|
110
|
+
|
|
111
|
+
composer = JobInvocationApiComposer.new(ji, User.current, params)
|
|
112
|
+
assert_raises(ActiveRecord::RecordInvalid) do
|
|
113
|
+
composer.save!
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
end
|
|
@@ -38,7 +38,7 @@ describe JobInvocationComposer do
|
|
|
38
38
|
|
|
39
39
|
context 'with general new invocation and empty params' do
|
|
40
40
|
let(:params) { {} }
|
|
41
|
-
let(:job_invocation) { JobInvocation.new }
|
|
41
|
+
let(:job_invocation) { JobInvocation.new.tap { |job_invocation| job_invocation.stubs(:trigger_mode=) } }
|
|
42
42
|
let(:composer) { JobInvocationComposer.new(job_invocation).compose_from_params(params) }
|
|
43
43
|
|
|
44
44
|
describe '#available_templates' do
|
|
@@ -299,6 +299,21 @@ describe JobInvocationComposer do
|
|
|
299
299
|
Bookmark.expects(:authorized).with(:view_bookmarks).returns(Bookmark.scoped)
|
|
300
300
|
composer.available_bookmarks
|
|
301
301
|
end
|
|
302
|
+
|
|
303
|
+
context 'there are hostgroups and hosts bookmark' do
|
|
304
|
+
let(:hostgroups) { Bookmark.create(:name => 'hostgroups', :query => 'name = x', :controller => 'hostgroups') }
|
|
305
|
+
let(:hosts) { Bookmark.create(:name => 'hosts', :query => 'name = x', :controller => 'hosts') }
|
|
306
|
+
let(:dashboard) { Bookmark.create(:name => 'dashboard', :query => 'name = x', :controller => 'dashboard') }
|
|
307
|
+
|
|
308
|
+
it 'finds only host related bookmarks' do
|
|
309
|
+
hosts
|
|
310
|
+
dashboard
|
|
311
|
+
hostgroups
|
|
312
|
+
composer.available_bookmarks.must_include hosts
|
|
313
|
+
composer.available_bookmarks.must_include dashboard
|
|
314
|
+
composer.available_bookmarks.wont_include hostgroups
|
|
315
|
+
end
|
|
316
|
+
end
|
|
302
317
|
end
|
|
303
318
|
|
|
304
319
|
describe '#targeted_hosts_count' do
|
|
@@ -19,13 +19,58 @@ describe JobInvocation do
|
|
|
19
19
|
let(:job_invocation) { FactoryGirl.create(:job_invocation, :with_template) }
|
|
20
20
|
|
|
21
21
|
before do
|
|
22
|
+
input = job_invocation.template_invocations.first.template.template_inputs.create!(:name => 'foo', :required => true, :input_type => 'user')
|
|
22
23
|
@input_value = FactoryGirl.create(:template_invocation_input_value,
|
|
23
24
|
:template_invocation => job_invocation.template_invocations.first,
|
|
24
|
-
:template_input =>
|
|
25
|
-
|
|
25
|
+
:template_input => input)
|
|
26
|
+
job_invocation.reload
|
|
27
|
+
job_invocation.template_invocations.first.reload
|
|
26
28
|
end
|
|
27
29
|
|
|
28
30
|
it { refute job_invocation.reload.template_invocations.empty? }
|
|
29
|
-
it { refute job_invocation.template_invocations.first.input_values.empty? }
|
|
31
|
+
it { refute job_invocation.reload.template_invocations.first.input_values.empty? }
|
|
32
|
+
|
|
33
|
+
it 'validates required inputs have values' do
|
|
34
|
+
assert job_invocation.valid?
|
|
35
|
+
@input_value.destroy
|
|
36
|
+
refute job_invocation.reload.valid?
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
context 'future execution' do
|
|
41
|
+
|
|
42
|
+
it 'can report host count' do
|
|
43
|
+
job_invocation.total_hosts_count.must_equal 'N/A'
|
|
44
|
+
job_invocation.targeting.expects(:resolved_at).returns(Time.now)
|
|
45
|
+
job_invocation.total_hosts_count.must_equal 0
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
it 'has default trigger mode' do
|
|
49
|
+
job_invocation.trigger_mode.must_equal :immediate
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
it 'cannot set trigger mode to anything other than :immediate or :future' do
|
|
53
|
+
proc { job_invocation.trigger_mode = 'test' }.must_raise ::Foreman::Exception
|
|
54
|
+
job_invocation.trigger_mode.must_equal :immediate
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
it 'cannot change trigger mode once set' do
|
|
58
|
+
job_invocation.trigger_mode = 'future'
|
|
59
|
+
job_invocation.trigger_mode = 'immediate'
|
|
60
|
+
job_invocation.trigger_mode.must_equal :future
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
it 'parses times' do
|
|
64
|
+
time = Time.new(2015, 9, 16, 13, 56)
|
|
65
|
+
time_string = time.strftime(job_invocation.time_format)
|
|
66
|
+
job_invocation.start_at_parsed.must_equal false
|
|
67
|
+
job_invocation.start_at = time_string
|
|
68
|
+
job_invocation.start_at_parsed.must_equal time
|
|
69
|
+
job_invocation.start_before.must_be_nil
|
|
70
|
+
job_invocation.start_before_parsed.must_be_nil
|
|
71
|
+
job_invocation.start_before = time_string
|
|
72
|
+
job_invocation.start_before_parsed.must_equal time
|
|
73
|
+
end
|
|
74
|
+
|
|
30
75
|
end
|
|
31
76
|
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
require 'test_plugin_helper'
|
|
2
|
+
|
|
3
|
+
describe ProxyLoadBalancer do
|
|
4
|
+
let(:load_balancer) { ProxyLoadBalancer.new }
|
|
5
|
+
|
|
6
|
+
before do
|
|
7
|
+
ProxyAPI::ForemanDynflow::DynflowProxy.any_instance.stubs(:tasks_count).returns(0)
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
it 'load balances' do
|
|
11
|
+
proxies = FactoryGirl.create_list(:smart_proxy, 3, :ssh)
|
|
12
|
+
not_yet_seen = proxies.dup
|
|
13
|
+
|
|
14
|
+
3.times do
|
|
15
|
+
found = load_balancer.next(proxies)
|
|
16
|
+
not_yet_seen.delete(found)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
not_yet_seen.must_be_empty
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
it 'returns nil for if no proxy is available' do
|
|
23
|
+
load_balancer.next([]).must_be_nil
|
|
24
|
+
end
|
|
25
|
+
end
|
metadata
CHANGED
|
@@ -1,15 +1,29 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: foreman_remote_execution
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.7
|
|
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-
|
|
11
|
+
date: 2015-10-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: deface
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - ">="
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '0'
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - ">="
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '0'
|
|
13
27
|
- !ruby/object:Gem::Dependency
|
|
14
28
|
name: rails
|
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -30,14 +44,14 @@ dependencies:
|
|
|
30
44
|
requirements:
|
|
31
45
|
- - "~>"
|
|
32
46
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: 0.7.
|
|
47
|
+
version: 0.7.6
|
|
34
48
|
type: :runtime
|
|
35
49
|
prerelease: false
|
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
51
|
requirements:
|
|
38
52
|
- - "~>"
|
|
39
53
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: 0.7.
|
|
54
|
+
version: 0.7.6
|
|
41
55
|
- !ruby/object:Gem::Dependency
|
|
42
56
|
name: rubocop
|
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -91,6 +105,7 @@ extra_rdoc_files:
|
|
|
91
105
|
- doc/source/_includes/footer.html
|
|
92
106
|
- doc/source/_includes/tocify.html
|
|
93
107
|
- doc/source/design/index.md
|
|
108
|
+
- doc/source/design/wireframes.pdf
|
|
94
109
|
- doc/source/static/css/jquery.tocify.css
|
|
95
110
|
- doc/source/static/css/bootstrap.min.css
|
|
96
111
|
- doc/source/static/css/style.css
|
|
@@ -112,36 +127,56 @@ files:
|
|
|
112
127
|
- LICENSE
|
|
113
128
|
- README.md
|
|
114
129
|
- Rakefile
|
|
130
|
+
- app/assets/javascripts/execution_interface.js
|
|
115
131
|
- app/assets/javascripts/template_input.js
|
|
116
132
|
- app/assets/javascripts/template_invocation.js
|
|
117
133
|
- app/assets/stylesheets/job_invocations.css.scss
|
|
118
134
|
- app/assets/stylesheets/template_invocation.css.scss
|
|
135
|
+
- app/controllers/api/v2/job_invocations_controller.rb
|
|
119
136
|
- app/controllers/api/v2/job_templates_controller.rb
|
|
120
137
|
- app/controllers/job_invocations_controller.rb
|
|
121
138
|
- app/controllers/job_templates_controller.rb
|
|
139
|
+
- app/controllers/template_invocations_controller.rb
|
|
122
140
|
- app/helpers/concerns/foreman_remote_execution/hosts_helper_extensions.rb
|
|
123
141
|
- app/helpers/remote_execution_helper.rb
|
|
142
|
+
- app/lib/actions/middleware/bind_job_invocation.rb
|
|
124
143
|
- app/lib/actions/remote_execution/run_host_job.rb
|
|
125
144
|
- app/lib/actions/remote_execution/run_hosts_job.rb
|
|
126
145
|
- app/lib/actions/remote_execution/run_proxy_command.rb
|
|
127
146
|
- app/models/concerns/foreman_remote_execution/bookmark_extensions.rb
|
|
128
147
|
- app/models/concerns/foreman_remote_execution/foreman_tasks_task_extensions.rb
|
|
129
148
|
- app/models/concerns/foreman_remote_execution/host_extensions.rb
|
|
149
|
+
- app/models/concerns/foreman_remote_execution/nic_extensions.rb
|
|
150
|
+
- app/models/concerns/foreman_remote_execution/subnet_extensions.rb
|
|
151
|
+
- app/models/concerns/foreman_remote_execution/taxonomy_extensions.rb
|
|
130
152
|
- app/models/concerns/foreman_remote_execution/template_extensions.rb
|
|
131
153
|
- app/models/concerns/foreman_remote_execution/template_relations.rb
|
|
132
154
|
- app/models/concerns/foreman_remote_execution/user_extensions.rb
|
|
133
155
|
- app/models/input_template_renderer.rb
|
|
134
156
|
- app/models/job_invocation.rb
|
|
157
|
+
- app/models/job_invocation_api_composer.rb
|
|
135
158
|
- app/models/job_invocation_composer.rb
|
|
136
159
|
- app/models/job_template.rb
|
|
137
160
|
- app/models/remote_execution_provider.rb
|
|
138
161
|
- app/models/setting/remote_execution.rb
|
|
139
162
|
- app/models/ssh_execution_provider.rb
|
|
163
|
+
- app/models/target_remote_execution_proxy.rb
|
|
140
164
|
- app/models/targeting.rb
|
|
141
165
|
- app/models/targeting_host.rb
|
|
142
166
|
- app/models/template_input.rb
|
|
143
167
|
- app/models/template_invocation.rb
|
|
144
168
|
- app/models/template_invocation_input_value.rb
|
|
169
|
+
- app/overrides/execution_interface.rb
|
|
170
|
+
- app/overrides/foreman/nics/_execution_interface.html.erb
|
|
171
|
+
- app/overrides/foreman/subnets/_rex_tab.html.erb
|
|
172
|
+
- app/overrides/foreman/subnets/_rex_tab_pane.html.erb
|
|
173
|
+
- app/overrides/subnet_proxies.rb
|
|
174
|
+
- app/services/proxy_load_balancer.rb
|
|
175
|
+
- app/views/api/v2/job_invocations/base.json.rabl
|
|
176
|
+
- app/views/api/v2/job_invocations/create.json.rabl
|
|
177
|
+
- app/views/api/v2/job_invocations/index.json.rabl
|
|
178
|
+
- app/views/api/v2/job_invocations/main.json.rabl
|
|
179
|
+
- app/views/api/v2/job_invocations/show.json.rabl
|
|
145
180
|
- app/views/api/v2/job_templates/base.json.rabl
|
|
146
181
|
- app/views/api/v2/job_templates/create.json.rabl
|
|
147
182
|
- app/views/api/v2/job_templates/index.json.rabl
|
|
@@ -154,6 +189,7 @@ files:
|
|
|
154
189
|
- app/views/job_invocations/new.html.erb
|
|
155
190
|
- app/views/job_invocations/refresh.js.erb
|
|
156
191
|
- app/views/job_invocations/show.html.erb
|
|
192
|
+
- app/views/job_invocations/show.js.erb
|
|
157
193
|
- app/views/job_templates/_custom_tab_headers.html.erb
|
|
158
194
|
- app/views/job_templates/_custom_tabs.html.erb
|
|
159
195
|
- app/views/job_templates/auto_complete_job_name.json.erb
|
|
@@ -161,6 +197,10 @@ files:
|
|
|
161
197
|
- app/views/job_templates/index.html.erb
|
|
162
198
|
- app/views/job_templates/new.html.erb
|
|
163
199
|
- app/views/template_inputs/_form.html.erb
|
|
200
|
+
- app/views/template_invocations/_output_line_set.html.erb
|
|
201
|
+
- app/views/template_invocations/_refresh.js.erb
|
|
202
|
+
- app/views/template_invocations/show.html.erb
|
|
203
|
+
- app/views/template_invocations/show.js.erb
|
|
164
204
|
- app/views/templates/package_action.erb
|
|
165
205
|
- app/views/templates/puppet_run_once.erb
|
|
166
206
|
- app/views/templates/run_command.erb
|
|
@@ -173,8 +213,10 @@ files:
|
|
|
173
213
|
- db/migrate/20150708133305_add_template_invocation.rb
|
|
174
214
|
- db/migrate/20150812110800_add_resolved_at_to_targeting.rb
|
|
175
215
|
- db/migrate/20150812145900_add_last_task_id_to_job_invocation.rb
|
|
216
|
+
- db/migrate/20150826191632_create_target_remote_execution_proxies.rb
|
|
176
217
|
- db/migrate/20150827144500_change_targeting_search_query_type.rb
|
|
177
218
|
- db/migrate/20150827152730_add_options_to_template_input.rb
|
|
219
|
+
- db/migrate/20150903192731_add_execution_to_interface.rb
|
|
178
220
|
- db/seeds.d/60-ssh_proxy_feature.rb
|
|
179
221
|
- db/seeds.d/70-job_templates.rb
|
|
180
222
|
- doc/Gemfile
|
|
@@ -196,6 +238,7 @@ files:
|
|
|
196
238
|
- doc/source/_layouts/page.html
|
|
197
239
|
- doc/source/atom.xml
|
|
198
240
|
- doc/source/design/index.md
|
|
241
|
+
- doc/source/design/wireframes.pdf
|
|
199
242
|
- doc/source/index.md
|
|
200
243
|
- doc/source/static/css/bootstrap-responsive.min.css
|
|
201
244
|
- doc/source/static/css/bootstrap.min.css
|
|
@@ -219,14 +262,19 @@ files:
|
|
|
219
262
|
- locale/foreman_remote_execution.pot
|
|
220
263
|
- locale/gemspec.rb
|
|
221
264
|
- test/factories/foreman_remote_execution_factories.rb
|
|
265
|
+
- test/functional/api/v2/job_invocations_controller_test.rb
|
|
222
266
|
- test/functional/api/v2/job_templates_controller_test.rb
|
|
223
267
|
- test/test_plugin_helper.rb
|
|
224
268
|
- test/unit/actions/run_hosts_job_test.rb
|
|
225
269
|
- test/unit/actions/run_proxy_command_test.rb
|
|
270
|
+
- test/unit/concerns/host_extensions_test.rb
|
|
271
|
+
- test/unit/concerns/nic_extensions_test.rb
|
|
226
272
|
- test/unit/input_template_renderer_test.rb
|
|
273
|
+
- test/unit/job_invocation_api_composer_test.rb
|
|
227
274
|
- test/unit/job_invocation_composer_test.rb
|
|
228
275
|
- test/unit/job_invocation_test.rb
|
|
229
276
|
- test/unit/job_template_test.rb
|
|
277
|
+
- test/unit/proxy_load_balancer_test.rb
|
|
230
278
|
- test/unit/remote_execution_provider_test.rb
|
|
231
279
|
- test/unit/targeting_test.rb
|
|
232
280
|
- test/unit/template_input_test.rb
|
|
@@ -266,6 +314,11 @@ test_files:
|
|
|
266
314
|
- test/unit/actions/run_hosts_job_test.rb
|
|
267
315
|
- test/unit/actions/run_proxy_command_test.rb
|
|
268
316
|
- test/unit/job_invocation_composer_test.rb
|
|
317
|
+
- test/unit/job_invocation_api_composer_test.rb
|
|
269
318
|
- test/unit/input_template_renderer_test.rb
|
|
319
|
+
- test/unit/concerns/host_extensions_test.rb
|
|
320
|
+
- test/unit/concerns/nic_extensions_test.rb
|
|
321
|
+
- test/unit/proxy_load_balancer_test.rb
|
|
322
|
+
- test/functional/api/v2/job_invocations_controller_test.rb
|
|
270
323
|
- test/functional/api/v2/job_templates_controller_test.rb
|
|
271
324
|
- test/factories/foreman_remote_execution_factories.rb
|