commit | 222c0be9264e7de4c7e2e65006f257a820a36812 | [log] [tgz] |
---|---|---|
author | Filip Pytloun <fpytloun@mirantis.com> | Wed Mar 22 14:46:20 2017 +0000 |
committer | Gerrit Code Review <gerrit2@8d47cb36f245> | Wed Mar 22 14:46:21 2017 +0000 |
tree | 31d0c3da8e394b1c26e6b406674d2700f2174fa4 | |
parent | c684645bada68afc602179349e78e5d58f427ea3 [diff] | |
parent | 3e8dd4789406290ff099aa70bff92c000632732c [diff] |
Merge "Fixed ssh get known host function"
diff --git a/src/com/mirantis/mk/Ssh.groovy b/src/com/mirantis/mk/Ssh.groovy index 4526d6d..8276dde 100644 --- a/src/com/mirantis/mk/Ssh.groovy +++ b/src/com/mirantis/mk/Ssh.groovy
@@ -26,8 +26,13 @@ host = result.group(1) port = 22 } else { + // test for protocol + if(url.indexOf("://") == -1){ + url="ssh://" + url + } parsed = new URI(url) host = parsed.host + println(host) port = parsed.port && parsed.port > 0 ? parsed.port: 22 } return [host,port]