Skip to content

paramiko-ssh-config-support#2941

Closed
eedgar wants to merge 1 commit into
StackStorm:masterfrom
eedgar:paramiko-ssh-config-support
Closed

paramiko-ssh-config-support#2941
eedgar wants to merge 1 commit into
StackStorm:masterfrom
eedgar:paramiko-ssh-config-support

Conversation

@eedgar
Copy link
Copy Markdown
Contributor

@eedgar eedgar commented Oct 7, 2016

No description provided.

@eedgar eedgar changed the title paramiko-ssh-config-support paramiko-ssh-config-support {WIP] Oct 7, 2016
@eedgar eedgar changed the title paramiko-ssh-config-support {WIP] paramiko-ssh-config-support [WIP] Oct 7, 2016
@eedgar eedgar force-pushed the paramiko-ssh-config-support branch from d12a519 to ee1d2bb Compare October 10, 2016 16:56
@eedgar eedgar changed the title paramiko-ssh-config-support [WIP] paramiko-ssh-config-support Oct 10, 2016
Copy link
Copy Markdown
Member

@samirsss samirsss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good to me. @bigmstone @humblearner @Kami do you folks want to review this as well?

@dzimine
Copy link
Copy Markdown

dzimine commented Oct 10, 2016

Thank you for your PR.
+1, let's have @lakshmi-kannan take another look and we'll get it in.

1 similar comment
@dzimine
Copy link
Copy Markdown

dzimine commented Oct 10, 2016

Thank you for your PR.
+1, let's have @lakshmi-kannan take another look and we'll get it in.

return client

@staticmethod
def _get_conninfo_from_ssh_config(conninfo):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A minor thing that's concerning is that you are passing an object and mutating it inside a static method. Plus the method is called _get_conninfo...

Should we refactor this to something like:

if cfg.CONF.ssh_runner.use_ssh_config:
  conninfo_ssh_config = self._get_conninfo_from_ssh_config_for_host(host)
  conninfo.update(conninfo_ssh_config)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, what lakshmi has said - In fact, I would prefer this method to just retrieve info from the SSH config and return a dictionary and the merging to happen somewhere else.

@lakshmi-kannan
Copy link
Copy Markdown
Contributor

You should also edit CHANGELOG.rst and call it as a new feature and put your name next to it :)
https://github.com/StackStorm/st2/blob/master/CHANGELOG.rst#in-development

@lakshmi-kannan
Copy link
Copy Markdown
Contributor

Besides those comments, LGTM. Once you have them addressed, I'll merge.

@Kami
Copy link
Copy Markdown
Member

Kami commented Oct 16, 2016

Nice work, thanks.

It would also be great if you can add corresponding documentation to https://github.com/stackstorm/st2docs

Comment thread st2actions/st2actions/config.py Outdated
help='Use the .ssh/config file. Useful to override ports etc.')
help='Use the .ssh/config file. Useful to override ports etc.'),
cfg.StrOpt('ssh_config_path',
default='.ssh/config',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this default to ~/.ssh/config if we want it to use config from the user under which action runner process is running (stanley)?

Otherwise it seems it will default to a relative path based on the cwd where action runner is started.

@eedgar eedgar force-pushed the paramiko-ssh-config-support branch from ee1d2bb to d3ef1d1 Compare November 3, 2016 15:19
@humblearner
Copy link
Copy Markdown
Contributor

Fixed here: #3032

@Kami
Copy link
Copy Markdown
Member

Kami commented Nov 17, 2016

Thanks to both of you - let's continue in #3032 then.

@Kami Kami closed this Nov 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants