omc 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -0
- data/lib/omc/cli.rb +3 -1
- data/lib/omc/stack_command.rb +8 -2
- data/lib/omc/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a12234410a3558793fd0673f911603c884868d9b
|
4
|
+
data.tar.gz: 4fa295dc5e03a8cb0d9e467d8015705e755fc333
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac2dd7f0c7941c1754bab87607beeddf29b810d8fcf2ee044d850a661e32e810a9406fb6c3ba09ccb3310e90ad0ff13f811a39ff784879309e2c933c520f7a32
|
7
|
+
data.tar.gz: f7ccd20daccbd25be303c48044f1f512b089acf2b1cb9b236d88b7008b1aed92d007861f0fc1b8872b3ff25a7f8225acf34c1c08d79334f9507dd62bdbb8eb42
|
data/README.md
CHANGED
data/lib/omc/cli.rb
CHANGED
@@ -9,6 +9,7 @@ module Omc
|
|
9
9
|
class_option :account, aliases: '-a'
|
10
10
|
class_option :layer, aliases: '-l'
|
11
11
|
class_option :forward_agent, aliases: "-A", type: :boolean, default: false
|
12
|
+
class_option :remote_forward, aliases: "-R", type: :string, default: nil
|
12
13
|
|
13
14
|
desc 'ssh STACK', 'Connect to an instance on a stack on an account'
|
14
15
|
def ssh(stack)
|
@@ -17,7 +18,8 @@ module Omc
|
|
17
18
|
user,
|
18
19
|
stack,
|
19
20
|
layer: options[:layer],
|
20
|
-
forward_agent: options[:forward_agent]
|
21
|
+
forward_agent: options[:forward_agent],
|
22
|
+
remote_forward: options[:remote_forward]
|
21
23
|
)
|
22
24
|
command.ssh
|
23
25
|
end
|
data/lib/omc/stack_command.rb
CHANGED
@@ -3,13 +3,14 @@ require 'omc/account'
|
|
3
3
|
|
4
4
|
module Omc
|
5
5
|
class StackCommand
|
6
|
-
def initialize aws_account, user, stack_name, app: nil, layer: nil, forward_agent: false
|
6
|
+
def initialize aws_account, user, stack_name, app: nil, layer: nil, forward_agent: false, remote_forward: nil
|
7
7
|
@aws_account = aws_account
|
8
8
|
@user = user
|
9
9
|
@stack_name = stack_name
|
10
10
|
@app_name = app
|
11
11
|
@layer_name = layer
|
12
12
|
@forward_agent = forward_agent
|
13
|
+
@remote_forward = remote_forward
|
13
14
|
end
|
14
15
|
|
15
16
|
def ssh
|
@@ -100,8 +101,13 @@ module Omc
|
|
100
101
|
|
101
102
|
def default_ssh_args
|
102
103
|
[].tap do |args|
|
103
|
-
|
104
|
+
if (bastion)
|
105
|
+
proxy_command = "ProxyCommand ssh -W %h:%p #{bastion.host}"
|
106
|
+
proxy_command += " -R #{@remote_forward}" if @remote_forward
|
107
|
+
args.push("-o", proxy_command)
|
108
|
+
end
|
104
109
|
args.push("-A") if @forward_agent
|
110
|
+
args.push("-R #{@remote_forward}") if @remote_forward
|
105
111
|
end
|
106
112
|
end
|
107
113
|
|
data/lib/omc/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Clarke Brunsdon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|