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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 750910e916f0d4ad411cf868636075e597573dd8cca720e414156bcee55331dc
4
- data.tar.gz: 4003e71f358abc47847fb9a2e4cf3c211189bc915b6b4196dd02d6d21633d2b8
3
+ metadata.gz: f90b757baa9c530c89d5c6c960ebf69601b173886c2f74560513592ab78697e4
4
+ data.tar.gz: edf9bc88acd2f859f86dd15ddee26deb948f6b963ddcd6aee2c6d839e12198ed
5
5
  SHA512:
6
- metadata.gz: efa2a87ce6a6125f7701979305a0c5fcc1fb3ad2703d5aef140505943789b45648311e46f892791a919a88d757f019485ff45209efc22423cc6543a298224a03
7
- data.tar.gz: 4411e680ca841903d47b295090c4a194f92dfe91cc58796272d42b9c370ad6a3e6a8bc34973f0d7a85d93fe604788993428d944277b05426194893ecff0a9d51
6
+ metadata.gz: 56cb17a0d7ac5eb456533e72e83aaffb07892a725609685f84c95571afa4fb0868dbd4017c4cf5ceadafa35aaf01beca27bdadb424b5bf0c0a5280c704f21e2c
7
+ data.tar.gz: 04c1feec777172574e45369f48219a6d2ea80e7e704a695198ef56bb11b5d4c178c68650414a190f4e57751521a065ad5c0c649ad8842f99be03259f79f3c9f3
@@ -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/webrick_ext'
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 'foreman_tasks_core/shareable_action'
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 < ForemanTasksCore::Runner::Action
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[:ssh_key_passphrase] if params[:ssh_key_passphrase]
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 'foreman_tasks_core/runner/dispatcher'
1
+ require 'smart_proxy_dynflow/runner/dispatcher'
2
2
 
3
3
  module Proxy::RemoteExecution::Ssh
4
- class Dispatcher < ::ForemanTasksCore::Runner::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?
@@ -1,5 +1,5 @@
1
1
  module Proxy::RemoteExecution::Ssh::Runners
2
- class FakeScriptRunner < ForemanTasksCore::Runner::Base
2
+ class FakeScriptRunner < ::Proxy::Dynflow::Runner::Base
3
3
  DEFAULT_REFRESH_INTERVAL = 1
4
4
 
5
5
  @data = []
@@ -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 = ForemanTasksCore::OtpManager.generate_otp(@task_id)
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
- ForemanTasksCore::OtpManager.drop_otp(@task_id, @otp) if @otp
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 = ForemanTasksCore::ContinuousOutput.new
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 < ForemanTasksCore::Runner::Base
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(SmartProxyDynflowCore::Log.instance)
281
+ ssh_options[:logger] = Proxy::RemoteExecution::Ssh::LogFilter.new(Proxy::Dynflow::Log.instance)
282
282
  return ssh_options
283
283
  end
284
284
 
@@ -1,7 +1,7 @@
1
1
  module Proxy
2
2
  module RemoteExecution
3
3
  module Ssh
4
- VERSION = '0.4.0'
4
+ VERSION = '0.4.1'
5
5
  end
6
6
  end
7
7
  end
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.0
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-06-07 00:00:00.000000000 Z
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.1'
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.1'
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.plugins.d/remote_execution_ssh.rb
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