smart_proxy_remote_execution_ssh 0.4.0 → 0.4.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.
- checksums.yaml +4 -4
- data/{bundler.plugins.d → bundler.d}/remote_execution_ssh.rb +0 -0
- data/lib/smart_proxy_remote_execution_ssh.rb +2 -6
- data/lib/smart_proxy_remote_execution_ssh/actions/run_script.rb +3 -2
- data/lib/smart_proxy_remote_execution_ssh/cockpit.rb +1 -1
- data/lib/smart_proxy_remote_execution_ssh/dispatcher.rb +2 -2
- data/lib/smart_proxy_remote_execution_ssh/plugin.rb +2 -1
- data/lib/smart_proxy_remote_execution_ssh/runners/fake_script_runner.rb +1 -1
- data/lib/smart_proxy_remote_execution_ssh/runners/polling_script_runner.rb +3 -3
- data/lib/smart_proxy_remote_execution_ssh/runners/script_runner.rb +2 -2
- data/lib/smart_proxy_remote_execution_ssh/version.rb +1 -1
- metadata +5 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f90b757baa9c530c89d5c6c960ebf69601b173886c2f74560513592ab78697e4
|
4
|
+
data.tar.gz: edf9bc88acd2f859f86dd15ddee26deb948f6b963ddcd6aee2c6d839e12198ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56cb17a0d7ac5eb456533e72e83aaffb07892a725609685f84c95571afa4fb0868dbd4017c4cf5ceadafa35aaf01beca27bdadb424b5bf0c0a5280c704f21e2c
|
7
|
+
data.tar.gz: 04c1feec777172574e45369f48219a6d2ea80e7e704a695198ef56bb11b5d4c178c68650414a190f4e57751521a065ad5c0c649ad8842f99be03259f79f3c9f3
|
File without changes
|
@@ -1,8 +1,7 @@
|
|
1
|
-
require 'foreman_tasks_core'
|
2
|
-
require 'smart_proxy_remote_execution_ssh/version'
|
3
1
|
require 'smart_proxy_dynflow'
|
4
|
-
require 'smart_proxy_remote_execution_ssh/
|
2
|
+
require 'smart_proxy_remote_execution_ssh/version'
|
5
3
|
require 'smart_proxy_remote_execution_ssh/plugin'
|
4
|
+
require 'smart_proxy_remote_execution_ssh/webrick_ext'
|
6
5
|
|
7
6
|
module Proxy::RemoteExecution
|
8
7
|
module Ssh
|
@@ -53,8 +52,5 @@ module Proxy::RemoteExecution
|
|
53
52
|
Plugin.settings.ssh_log_level = Plugin.settings.ssh_log_level.to_sym
|
54
53
|
end
|
55
54
|
end
|
56
|
-
|
57
|
-
require 'smart_proxy_dynflow_core/task_launcher_registry'
|
58
|
-
SmartProxyDynflowCore::TaskLauncherRegistry.register('ssh', ForemanTasksCore::TaskLauncher::Batch)
|
59
55
|
end
|
60
56
|
end
|
@@ -1,8 +1,9 @@
|
|
1
|
-
require '
|
1
|
+
require 'smart_proxy_dynflow/action/shareable'
|
2
|
+
require 'smart_proxy_dynflow/action/runner'
|
2
3
|
|
3
4
|
module Proxy::RemoteExecution::Ssh
|
4
5
|
module Actions
|
5
|
-
class RunScript <
|
6
|
+
class RunScript < Proxy::Dynflow::Action::Runner
|
6
7
|
def initiate_runner
|
7
8
|
additional_options = {
|
8
9
|
:step_id => run_step_id,
|
@@ -257,7 +257,7 @@ module Proxy::RemoteExecution
|
|
257
257
|
ret[:port] = params["ssh_port"] if params["ssh_port"]
|
258
258
|
ret[:keys] = [key_file] if key_file
|
259
259
|
ret[:password] = params["ssh_password"] if params["ssh_password"]
|
260
|
-
ret[:passphrase] = params[
|
260
|
+
ret[:passphrase] = params["ssh_key_passphrase"] if params["ssh_key_passphrase"]
|
261
261
|
ret[:keys_only] = true
|
262
262
|
ret[:auth_methods] = auth_methods
|
263
263
|
ret[:verify_host_key] = true
|
@@ -1,7 +1,7 @@
|
|
1
|
-
require '
|
1
|
+
require 'smart_proxy_dynflow/runner/dispatcher'
|
2
2
|
|
3
3
|
module Proxy::RemoteExecution::Ssh
|
4
|
-
class Dispatcher < ::
|
4
|
+
class Dispatcher < ::Proxy::Dynflow::Runner::Dispatcher
|
5
5
|
def refresh_interval
|
6
6
|
@refresh_interval ||= Plugin.settings[:runner_refresh_interval] ||
|
7
7
|
Plugin.runner_class::DEFAULT_REFRESH_INTERVAL
|
@@ -27,9 +27,10 @@ module Proxy::RemoteExecution::Ssh
|
|
27
27
|
require 'smart_proxy_remote_execution_ssh/dispatcher'
|
28
28
|
require 'smart_proxy_remote_execution_ssh/log_filter'
|
29
29
|
require 'smart_proxy_remote_execution_ssh/runners'
|
30
|
-
require 'smart_proxy_dynflow_core'
|
31
30
|
|
32
31
|
Proxy::RemoteExecution::Ssh.validate!
|
32
|
+
|
33
|
+
Proxy::Dynflow::TaskLauncherRegistry.register('ssh', Proxy::Dynflow::TaskLauncher::Batch)
|
33
34
|
end
|
34
35
|
|
35
36
|
def self.simulate?
|
@@ -24,7 +24,7 @@ module Proxy::RemoteExecution::Ssh::Runners
|
|
24
24
|
@callback_host = options[:callback_host]
|
25
25
|
@task_id = options[:uuid]
|
26
26
|
@step_id = options[:step_id]
|
27
|
-
@otp =
|
27
|
+
@otp = Proxy::Dynflow::OtpManager.generate_otp(@task_id)
|
28
28
|
end
|
29
29
|
|
30
30
|
def prepare_start
|
@@ -90,7 +90,7 @@ module Proxy::RemoteExecution::Ssh::Runners
|
|
90
90
|
|
91
91
|
def close
|
92
92
|
super
|
93
|
-
|
93
|
+
Proxy::Dynflow::OtpManager.drop_otp(@task_id, @otp) if @otp
|
94
94
|
end
|
95
95
|
|
96
96
|
def upload_control_scripts
|
@@ -116,7 +116,7 @@ module Proxy::RemoteExecution::Ssh::Runners
|
|
116
116
|
|
117
117
|
# Generates updates based on the callback data from the manual mode
|
118
118
|
def load_event_updates(event_data)
|
119
|
-
continuous_output =
|
119
|
+
continuous_output = Proxy::Dynflow::ContinuousOutput.new
|
120
120
|
if event_data.key?('output')
|
121
121
|
lines = Base64.decode64(event_data['output']).sub(/\A(RUNNING|DONE).*\n/, '')
|
122
122
|
continuous_output.add_output(lines, 'stdout')
|
@@ -96,7 +96,7 @@ module Proxy::RemoteExecution::Ssh::Runners
|
|
96
96
|
end
|
97
97
|
|
98
98
|
# rubocop:disable Metrics/ClassLength
|
99
|
-
class ScriptRunner <
|
99
|
+
class ScriptRunner < Proxy::Dynflow::Runner::Base
|
100
100
|
attr_reader :execution_timeout_interval
|
101
101
|
|
102
102
|
EXPECTED_POWER_ACTION_MESSAGES = ['restart host', 'shutdown host'].freeze
|
@@ -278,7 +278,7 @@ module Proxy::RemoteExecution::Ssh::Runners
|
|
278
278
|
ssh_options[:user_known_hosts_file] = prepare_known_hosts if @host_public_key
|
279
279
|
ssh_options[:number_of_password_prompts] = 1
|
280
280
|
ssh_options[:verbose] = settings[:ssh_log_level]
|
281
|
-
ssh_options[:logger] = Proxy::RemoteExecution::Ssh::LogFilter.new(
|
281
|
+
ssh_options[:logger] = Proxy::RemoteExecution::Ssh::LogFilter.new(Proxy::Dynflow::Log.instance)
|
282
282
|
return ssh_options
|
283
283
|
end
|
284
284
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smart_proxy_remote_execution_ssh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Nečas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -108,34 +108,20 @@ dependencies:
|
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: 0.82.0
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: foreman-tasks-core
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - ">="
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: 0.3.1
|
118
|
-
type: :runtime
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - ">="
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: 0.3.1
|
125
111
|
- !ruby/object:Gem::Dependency
|
126
112
|
name: smart_proxy_dynflow
|
127
113
|
requirement: !ruby/object:Gem::Requirement
|
128
114
|
requirements:
|
129
115
|
- - "~>"
|
130
116
|
- !ruby/object:Gem::Version
|
131
|
-
version: '0.
|
117
|
+
version: '0.5'
|
132
118
|
type: :runtime
|
133
119
|
prerelease: false
|
134
120
|
version_requirements: !ruby/object:Gem::Requirement
|
135
121
|
requirements:
|
136
122
|
- - "~>"
|
137
123
|
- !ruby/object:Gem::Version
|
138
|
-
version: '0.
|
124
|
+
version: '0.5'
|
139
125
|
- !ruby/object:Gem::Dependency
|
140
126
|
name: net-ssh
|
141
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -161,7 +147,7 @@ extra_rdoc_files:
|
|
161
147
|
files:
|
162
148
|
- LICENSE
|
163
149
|
- README.md
|
164
|
-
- bundler.
|
150
|
+
- bundler.d/remote_execution_ssh.rb
|
165
151
|
- lib/smart_proxy_remote_execution_ssh.rb
|
166
152
|
- lib/smart_proxy_remote_execution_ssh/actions/run_script.rb
|
167
153
|
- lib/smart_proxy_remote_execution_ssh/api.rb
|