summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan McLellan <btm@loftninjas.org>2019-05-13 13:59:29 -0400
committerBryan McLellan <btm@loftninjas.org>2019-05-13 14:18:51 -0400
commit1bd3c85149a1e1ff0ad64dea672fb6b832a99b7b (patch)
treea39f01184db8992c08006734861a3a7ef8325fd7
parentf015d668e7661d9776fffcc6da012125f94704ea (diff)
downloadchef-1bd3c85149a1e1ff0ad64dea672fb6b832a99b7b.tar.gz
Update RELEASE NOTES and trim out friendly_opt_listbtm/retry-fingerprint
Signed-off-by: Bryan McLellan <btm@loftninjas.org>
-rw-r--r--RELEASE_NOTES.md3
-rw-r--r--lib/chef/knife/bootstrap.rb12
2 files changed, 4 insertions, 11 deletions
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index f2d08516e9..1169af7ae8 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -149,12 +149,13 @@ Using removed options will cause the command to fail.
| --connection-user | user to authenticate as, regardless of protocol |
| --connection-password| Password to authenticate as, regardless of protocol |
| --connection-port | port to connect to, regardless of protocol |
+| --ssh-verify-host-key VALUE | Verify host key. Default is 'always'. Valid values are 'accept', 'accept\_new', 'accept\_new\_or\_local\_tunnel', and 'never'. |
#### Changed Flags
| Flag | New Option | Notes |
|-----:|:-----------|:------|
-| --[no-]host-key-verify |--[no-]ssh-verify-host-key| |
+| --[no-]host-key-verify |--ssh-verify-host-key VALUE | See above for valid values. |
| --forward-agent | --ssh-forward-agent| |
| --session-timeout MINUTES | --session-timeout SECONDS|New for ssh, existing for winrm. The unit has changed from MINUTES to SECONDS for consistency with other timeouts.|
| --ssh-password | --connection-password | |
diff --git a/lib/chef/knife/bootstrap.rb b/lib/chef/knife/bootstrap.rb
index c1ba864cea..c901071873 100644
--- a/lib/chef/knife/bootstrap.rb
+++ b/lib/chef/knife/bootstrap.rb
@@ -31,15 +31,6 @@ class Chef
SUPPORTED_CONNECTION_PROTOCOLS = %w{ssh winrm}.freeze
WINRM_AUTH_PROTOCOL_LIST = %w{plaintext kerberos ssl negotiate}.freeze
- # @param opt_arry [Array]
- #
- # @return [String] a friendly quoted list of items complete with "and"
- def self.friendly_opt_list(opt_array)
- opts = opt_array.map { |x| "'#{x}'" }
- return opts.join(" and ") if opts.size < 3
- opts[0..-2].join(", ") + " and " + opts[-1]
- end
-
# Common connectivity options
option :connection_user,
short: "-U USERNAME",
@@ -59,7 +50,8 @@ class Chef
option :connection_protocol,
short: "-o PROTOCOL",
long: "--connection-protocol PROTOCOL",
- description: "The protocol to use to connect to the target node. Supports: #{friendly_opt_list(SUPPORTED_CONNECTION_PROTOCOLS)}."
+ description: "The protocol to use to connect to the target node.",
+ in: SUPPORTED_CONNECTION_PROTOCOLS
option :max_wait,
short: "-W SECONDS",