knife 17.7.29 → 17.9.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/chef/knife/bootstrap.rb +1 -1
- data/lib/chef/knife/version.rb +1 -1
- data/spec/unit/knife/bootstrap_spec.rb +10 -10
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3642bb965e5c59528178bdf9ee38bb1a2163587830159d58f72a85fb0d747e75
|
4
|
+
data.tar.gz: 890a3eb24418163b5b4380514cb89b3896deb002d034999206aa42c252697b96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d03a7372abe2fa0d306dbedb0c6cb9d903c8515eeb51c377f5d37a933a4828fed0e9e7e554ef006b3bc767420e9d6e4ff58f9aaa961f9ca62a64fc1075092651
|
7
|
+
data.tar.gz: f582e2289db8c047aff0bdc63e9017f5d535961622e71cbf00d9d89e51d1ae170ab786b0938194439dc98dd35ccd8e956c0d2120fd867d97d5cb3b997d706609
|
data/lib/chef/knife/bootstrap.rb
CHANGED
@@ -930,7 +930,7 @@ class Chef
|
|
930
930
|
opts[:logger] = Chef::Log
|
931
931
|
opts[:password] = config[:connection_password] if config.key?(:connection_password)
|
932
932
|
opts[:user] = user if user
|
933
|
-
opts[:max_wait_until_ready] = config[:max_wait].
|
933
|
+
opts[:max_wait_until_ready] = config[:max_wait].to_i unless config[:max_wait].nil?
|
934
934
|
# TODO - when would we need to provide rdp_port vs port? Or are they not mutually exclusive?
|
935
935
|
opts[:port] = port if port
|
936
936
|
end
|
data/lib/chef/knife/version.rb
CHANGED
@@ -817,7 +817,7 @@ describe Chef::Knife::Bootstrap do
|
|
817
817
|
# Set everything to easily identifiable and obviously fake values
|
818
818
|
# to verify that Chef::Config is being sourced instead of knife.config
|
819
819
|
knife.config = {}
|
820
|
-
Chef::Config[:knife][:max_wait] = 9999
|
820
|
+
Chef::Config[:knife][:max_wait] = 9999.0
|
821
821
|
Chef::Config[:knife][:winrm_user] = "winbob"
|
822
822
|
Chef::Config[:knife][:winrm_port] = 9999
|
823
823
|
Chef::Config[:knife][:ca_trust_file] = "trust.me"
|
@@ -836,7 +836,7 @@ describe Chef::Knife::Bootstrap do
|
|
836
836
|
{
|
837
837
|
logger: Chef::Log, # not configurable
|
838
838
|
ca_trust_path: "trust.me",
|
839
|
-
max_wait_until_ready: 9999,
|
839
|
+
max_wait_until_ready: 9999, # converted to int
|
840
840
|
operation_timeout: 9999,
|
841
841
|
ssl_peer_fingerprint: "ABCDEF",
|
842
842
|
winrm_transport: "kerberos",
|
@@ -899,7 +899,7 @@ describe Chef::Knife::Bootstrap do
|
|
899
899
|
# pull in the Chef::Config value
|
900
900
|
Chef::Config[:knife][:winrm_auth_method] = "negotiate"
|
901
901
|
knife.config[:connection_password] = "blue"
|
902
|
-
knife.config[:max_wait] = 1000
|
902
|
+
knife.config[:max_wait] = 1000.0
|
903
903
|
knife.config[:connection_user] = "clippy"
|
904
904
|
knife.config[:connection_port] = 1000
|
905
905
|
knife.config[:winrm_port] = 1001 # We should not see this value get used
|
@@ -918,7 +918,7 @@ describe Chef::Knife::Bootstrap do
|
|
918
918
|
{
|
919
919
|
logger: Chef::Log, # not configurable
|
920
920
|
ca_trust_path: "trust.the.internet",
|
921
|
-
max_wait_until_ready: 1000,
|
921
|
+
max_wait_until_ready: 1000, # converted to int
|
922
922
|
operation_timeout: 1000,
|
923
923
|
ssl_peer_fingerprint: "FEDCBA",
|
924
924
|
winrm_transport: "kerberos",
|
@@ -971,7 +971,7 @@ describe Chef::Knife::Bootstrap do
|
|
971
971
|
# Set everything to easily identifiable and obviously fake values
|
972
972
|
# to verify that Chef::Config is being sourced instead of knife.config
|
973
973
|
knife.config = {}
|
974
|
-
Chef::Config[:knife][:max_wait] = 9999
|
974
|
+
Chef::Config[:knife][:max_wait] = 9999.0
|
975
975
|
Chef::Config[:knife][:session_timeout] = 9999
|
976
976
|
Chef::Config[:knife][:ssh_user] = "sshbob"
|
977
977
|
Chef::Config[:knife][:ssh_port] = 9999
|
@@ -986,7 +986,7 @@ describe Chef::Knife::Bootstrap do
|
|
986
986
|
let(:expected_result) do
|
987
987
|
{
|
988
988
|
logger: Chef::Log, # not configurable
|
989
|
-
max_wait_until_ready: 9999
|
989
|
+
max_wait_until_ready: 9999, # converted to int
|
990
990
|
connection_timeout: 9999,
|
991
991
|
user: "sshbob",
|
992
992
|
bastion_host: "mygateway.local",
|
@@ -1032,7 +1032,7 @@ describe Chef::Knife::Bootstrap do
|
|
1032
1032
|
knife.config[:connection_port] = 12
|
1033
1033
|
knife.config[:ssh_port] = "13" # canary to indirectly verify we're not looking for the wrong CLI flag
|
1034
1034
|
knife.config[:connection_password] = "feta cheese"
|
1035
|
-
knife.config[:max_wait] = 150
|
1035
|
+
knife.config[:max_wait] = 150.0
|
1036
1036
|
knife.config[:session_timeout] = 120
|
1037
1037
|
knife.config[:use_sudo] = true
|
1038
1038
|
knife.config[:use_sudo_pasword] = true
|
@@ -1042,7 +1042,7 @@ describe Chef::Knife::Bootstrap do
|
|
1042
1042
|
let(:expected_result) do
|
1043
1043
|
{
|
1044
1044
|
logger: Chef::Log, # not configurable
|
1045
|
-
max_wait_until_ready: 150
|
1045
|
+
max_wait_until_ready: 150, # cli (converted to int)
|
1046
1046
|
connection_timeout: 120, # cli
|
1047
1047
|
user: "sshalice", # cli
|
1048
1048
|
password: "feta cheese", # cli
|
@@ -1068,7 +1068,7 @@ describe Chef::Knife::Bootstrap do
|
|
1068
1068
|
context "and all CLI options have been given" do
|
1069
1069
|
before do
|
1070
1070
|
knife.config = {}
|
1071
|
-
knife.config[:max_wait] = 150
|
1071
|
+
knife.config[:max_wait] = 150.0
|
1072
1072
|
knife.config[:session_timeout] = 120
|
1073
1073
|
knife.config[:connection_user] = "sshroot"
|
1074
1074
|
knife.config[:connection_port] = 1000
|
@@ -1093,7 +1093,7 @@ describe Chef::Knife::Bootstrap do
|
|
1093
1093
|
let(:expected_result) do
|
1094
1094
|
{
|
1095
1095
|
logger: Chef::Log, # not configurable
|
1096
|
-
max_wait_until_ready: 150,
|
1096
|
+
max_wait_until_ready: 150, # converted to int
|
1097
1097
|
connection_timeout: 120,
|
1098
1098
|
user: "sshroot",
|
1099
1099
|
password: "blah",
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knife
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 17.
|
4
|
+
version: 17.9.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Jacob
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef-config
|
@@ -1136,7 +1136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1136
1136
|
- !ruby/object:Gem::Version
|
1137
1137
|
version: '0'
|
1138
1138
|
requirements: []
|
1139
|
-
rubygems_version: 3.2.
|
1139
|
+
rubygems_version: 3.2.32
|
1140
1140
|
signing_key:
|
1141
1141
|
specification_version: 4
|
1142
1142
|
summary: The knife CLI for Chef Infra.
|