knife-rackspace 1.0.1 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3424287dbc7b2fc0cacf8f5d59f5f270620f114f
4
- data.tar.gz: 622cf2499996948177d909c495ca9d036a9cf149
3
+ metadata.gz: 7811a3b0274045c7eef68f84c9c98937c921da04
4
+ data.tar.gz: 1ac4c493912be152364421c62bc340bf678dfc95
5
5
  SHA512:
6
- metadata.gz: a55cb84a25d9374ec39003f52312c58960e907eeff6f68612fd63e77d103ac773261c23a384fc12389b1ddcc079d893440228c6f69eac81a529509a550bc57fc
7
- data.tar.gz: c727dbaa60bc04a9f2c5899c193cad18555e2ec9bcbd5493096b83a72a5dab724130bd913775e91b8dc59fd2ddae2b7146a0552f0395677b4fb670ab75027037
6
+ metadata.gz: 9110fa351cbb6d96c601338209879c47931fe5a4546f977a6e16a332dc91db361ab6951ed368db7892a01c878e9362b30efdaf2a0b101b3e08a1816bf38d3ffd
7
+ data.tar.gz: f999ed0ce979560b67ee47135a46fc89ff8da14a5aedff4fc9163d613719fe654787a5d11177c890b01e6c256c89be93e47019dd06491b3fd96aafa4f9ee7a5a
@@ -1,3 +1,10 @@
1
+ ## v1.0.3
2
+ * Fix to encrypted_data_bag_secret and encrypted_data_bag_secret_file options (#138)
3
+ * Fix em-winrm dependencies and close TCP sockets (#134)
4
+
5
+ ## v1.0.2
6
+ * Fix issue in error message when no flavor is supplied (#132)
7
+
1
8
  ## v1.0.1
2
9
  * Fix Server List exception (#131)
3
10
  * Fix bug preferring knife over CLI configurations items (#128)
@@ -45,7 +45,7 @@ class Chef
45
45
  :long => "--flavor FLAVOR",
46
46
  :description => "The flavor of server; default is 2 (512 MB)",
47
47
  :proc => Proc.new { |f| Chef::Config[:knife][:flavor] = f.to_s },
48
- :default => 2
48
+ :default => "2"
49
49
 
50
50
  option :image,
51
51
  :short => "-I IMAGE",
@@ -258,10 +258,15 @@ class Chef
258
258
  :proc => Proc.new { |v| Chef::Config[:knife][:rackspace_ssh_keypair] = v },
259
259
  :default => nil
260
260
 
261
+ option :secret,
262
+ :long => "--secret",
263
+ :description => "The secret key to us to encrypt data bag item values",
264
+ :proc => lambda { |s| Chef::Config[:knife][:secret] = s }
265
+
261
266
  option :secret_file,
262
267
  :long => "--secret-file SECRET_FILE",
263
268
  :description => "A file containing the secret key to use to encrypt data bag item values",
264
- :proc => Proc.new { |sf| Chef::Config[:knife][:secret_file] = sf }
269
+ :proc => lambda { |sf| Chef::Config[:knife][:secret_file] = sf }
265
270
 
266
271
  option :bootstrap_vault_file,
267
272
  :long => "--bootstrap-vault-file VAULT_FILE",
@@ -284,10 +289,9 @@ class Chef
284
289
 
285
290
  def load_winrm_deps
286
291
  require "winrm"
287
- require "em-winrm"
292
+ require "chef/knife/winrm"
288
293
  require "chef/knife/bootstrap_windows_winrm"
289
294
  require "chef/knife/core/windows_bootstrap_context"
290
- require "chef/knife/winrm"
291
295
  end
292
296
 
293
297
  def tcp_test_ssh(server, bootstrap_ip)
@@ -351,8 +355,8 @@ class Chef
351
355
  end
352
356
 
353
357
  def tcp_test_winrm(hostname, port)
354
- TCPSocket.new(hostname, port)
355
- return true
358
+ tcp_socket = TCPSocket.new(hostname, port)
359
+ true
356
360
  rescue SocketError
357
361
  sleep 2
358
362
  false
@@ -369,6 +373,7 @@ class Chef
369
373
  rescue Errno::ENETUNREACH
370
374
  sleep 2
371
375
  false
376
+ tcp_socket && tcp_socket.close
372
377
  end
373
378
 
374
379
  def run
@@ -601,11 +606,10 @@ class Chef
601
606
  bootstrap.config[:template_file] = locate_config_value(:template_file)
602
607
  bootstrap.config[:first_boot_attributes] = locate_config_value(:first_boot_attributes)
603
608
  bootstrap.config[:bootstrap_proxy] = locate_config_value(:bootstrap_proxy)
604
- # TODO: Remove dead code. There's no command line parameter for these two.
605
- # bootstrap.config[:encrypted_data_bag_secret] = config[:encrypted_data_bag_secret]
606
- # bootstrap.config[:encrypted_data_bag_secret_file] = config[:encrypted_data_bag_secret_file]
609
+ bootstrap.config[:encrypted_data_bag_secret] = locate_config_value(:secret)
610
+ bootstrap.config[:encrypted_data_bag_secret_file] = locate_config_value(:secret_file)
607
611
  bootstrap.config[:secret] = locate_config_value(:secret)
608
- bootstrap.config[:secret_file] = locate_config_value(:secret_file) || ""
612
+ bootstrap.config[:secret_file] = locate_config_value(:secret_file)
609
613
 
610
614
  Chef::Config[:knife][:hints] ||= {}
611
615
  Chef::Config[:knife][:hints]["rackspace"] ||= {}
@@ -1,6 +1,6 @@
1
1
  module Knife
2
2
  module Rackspace
3
- VERSION = "1.0.1"
3
+ VERSION = "1.0.3"
4
4
  MAJOR, MINOR, TINY = VERSION.split(".")
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-rackspace
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Jacob
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2016-12-14 00:00:00.000000000 Z
15
+ date: 2017-02-09 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: knife-windows