smart_proxy_remote_execution_ssh 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/smart_proxy_remote_execution_ssh/command_action.rb +4 -0
- data/lib/smart_proxy_remote_execution_ssh/connector.rb +6 -0
- data/lib/smart_proxy_remote_execution_ssh/dispatcher.rb +1 -5
- data/lib/smart_proxy_remote_execution_ssh/plugin.rb +0 -4
- data/lib/smart_proxy_remote_execution_ssh/version.rb +1 -1
- data/lib/smart_proxy_remote_execution_ssh.rb +6 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjdmZmFmMmM4MTJkMGFiYzQzNThkM2ZmMmE0YTVkM2IxNWZjNTYyZg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MGM5M2MwYWEzOTI5Zjk0NzBiZDQ5N2IyZjFlMTQwYWQzNzUyNDM4Mw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
N2Q3ZTUwNTdmOTA2ZGNhYjYxYjY1Nzc3YmIwY2U0OWE2NTE5M2JiMjRkYzUz
|
10
|
+
MjM5NzI3MmQ4Y2I3ZmU0MDZiY2JjN2Y5ZDliZjUwYWI4NWY2MGUzMjhkZjg5
|
11
|
+
NzFkNWJhYzNiOGY1ZDc4YjYwMWE2NTRjYjgyMGViYzIyNjAxOTc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NzkxYmY2NzViOGNkMzYyZjJkZWY4ZTJiYmJkNzk3YTA2MTBlMGQ4NmIwYTgw
|
14
|
+
ODI3ZjUyMzZmN2E2MjVkYzk4ZTQ1YmVhMzBkYjk0ODkyNzczZWMyOGRkZTAz
|
15
|
+
OGY5YzY2ZDE4NzNiOTI0MzkwOGUxZDFkYTBmZDQ3OGFlNzViNzk=
|
@@ -31,6 +31,10 @@ module Proxy::RemoteExecution::Ssh
|
|
31
31
|
else
|
32
32
|
raise "Unexpected event #{event.inspect}"
|
33
33
|
end
|
34
|
+
rescue => e
|
35
|
+
action_logger.error e
|
36
|
+
output[:result] << Connector::DebugData.new("#{e.class}: #{e.message}").to_hash
|
37
|
+
output[:exit_status] = "PROXY_ERROR"
|
34
38
|
end
|
35
39
|
|
36
40
|
def finalize
|
@@ -38,11 +38,7 @@ module Proxy::RemoteExecution::Ssh
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def buffer_to_hash
|
41
|
-
buffer.map
|
42
|
-
{ :output_type => buffer_data.data_type,
|
43
|
-
:output => buffer_data.data,
|
44
|
-
:timestamp => buffer_data.timestamp.to_f }
|
45
|
-
end
|
41
|
+
buffer.map(&:to_hash)
|
46
42
|
end
|
47
43
|
end
|
48
44
|
|
@@ -7,9 +7,5 @@ module Proxy::RemoteExecution::Ssh
|
|
7
7
|
default_settings :ssh_identity_key_file => '~/.ssh/id_rsa_foreman_proxy',
|
8
8
|
:ssh_user => 'root'
|
9
9
|
plugin :ssh, Proxy::RemoteExecution::Ssh::VERSION
|
10
|
-
|
11
|
-
after_activation do
|
12
|
-
Proxy::RemoteExecution::Ssh.initialize
|
13
|
-
end
|
14
10
|
end
|
15
11
|
end
|
@@ -11,8 +11,6 @@ require 'smart_proxy_remote_execution_ssh/api'
|
|
11
11
|
module Proxy::RemoteExecution
|
12
12
|
module Ssh
|
13
13
|
class << self
|
14
|
-
attr_reader :dispatcher
|
15
|
-
|
16
14
|
def initialize
|
17
15
|
unless private_key_file
|
18
16
|
raise "settings for `ssh_identity_key` not set"
|
@@ -32,6 +30,10 @@ module Proxy::RemoteExecution
|
|
32
30
|
:logger => Proxy::Dynflow.instance.world.logger)
|
33
31
|
end
|
34
32
|
|
33
|
+
def dispatcher
|
34
|
+
@dispatcher || initialize
|
35
|
+
end
|
36
|
+
|
35
37
|
def private_key_file
|
36
38
|
File.expand_path(Ssh::Plugin.settings.ssh_identity_key_file)
|
37
39
|
end
|
@@ -42,3 +44,5 @@ module Proxy::RemoteExecution
|
|
42
44
|
end
|
43
45
|
end
|
44
46
|
end
|
47
|
+
|
48
|
+
Proxy::Dynflow.after_initialize { Proxy::RemoteExecution::Ssh.initialize }
|
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.0.
|
4
|
+
version: 0.0.2
|
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: 2015-08-
|
11
|
+
date: 2015-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -114,14 +114,14 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - ~>
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.0.
|
117
|
+
version: 0.0.3
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - ~>
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 0.0.
|
124
|
+
version: 0.0.3
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: net-ssh
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|