chef-provisioning-aws 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c249f182469f97f148ae38d524c4d968cdd8f1e3
4
- data.tar.gz: da61c4cfe294ca2f50605e63ff77042feffb1b74
3
+ metadata.gz: 09d8cd1f113c14f6f206a03b49d89cae4d9294a6
4
+ data.tar.gz: 0fbe0de96accf8f7cc030920f108f1a68df09ece
5
5
  SHA512:
6
- metadata.gz: 0cce99948b3f6f240fddae731ce3de418c9a239761a8a18776629e27e0b8c82843b202d4b91061d4cd002344c03e14ad36e02f6eecd4437fbbadd0347558affb
7
- data.tar.gz: 28e75762b4b912ff030150ea2c9ca09290286b9eda36d6efbe0ed5e15b93f31ba16ffec6657220eabf0fbd85452a2ea9e8439cfd3f78082c10f7c1b6a2c230e6
6
+ metadata.gz: b5d93a2add78c31d46ced5badef87b3ead4da4fb203b2b00352f15e569e309afc1d2ccc87a2bf2c2f2468f5e02de64908144d0f577a983e7462b17170f2eae51
7
+ data.tar.gz: 37d9e8b8c2461bcf26a8488127a3ab241c0e731bc7ad3e3dd98f4e892906d8bb8d8b94dc2d9a07da9bdca2841c2f642f65bbb319a64a15c1283bb2aa7f084f64
@@ -235,6 +235,7 @@ class AWSProvider < Chef::Provider::LWRPBase
235
235
  # @param aws_object Aws SDK Object to update tags
236
236
  #
237
237
  def converge_tags(aws_object)
238
+ return unless new_resource.respond_to?(:aws_tags)
238
239
  desired_tags = new_resource.aws_tags
239
240
  # If aws_tags were not provided we exit
240
241
  if desired_tags.nil?
@@ -437,11 +437,9 @@ EOD
437
437
  Chef::Log.debug "Creating instance with bootstrap options #{bootstrap_options}"
438
438
 
439
439
  actual_instance = ec2.instances.create(bootstrap_options.to_hash)
440
-
441
440
  # Make sure the instance is ready to be tagged
442
- Retryable.retryable(:tries => 12, :sleep => 5, :on => [AWS::EC2::Errors::InvalidInstanceID::NotFound, TimeoutError]) do
443
- raise TimeoutError unless actual_instance.status == :pending || actual_instance.status == :running
444
- end
441
+ wait_until_taggable(actual_instance)
442
+
445
443
  # TODO add other tags identifying user / node url (same as fog)
446
444
  actual_instance.tags['Name'] = machine_spec.name
447
445
  actual_instance.source_dest_check = machine_options[:source_dest_check] if machine_options.has_key?(:source_dest_check)
@@ -1005,6 +1003,7 @@ EOD
1005
1003
  parallelizer.parallelize(1.upto(num_servers)) do |i|
1006
1004
  clean_bootstrap_options = Marshal.load(Marshal.dump(bootstrap_options))
1007
1005
  instance = ec2.instances.create(clean_bootstrap_options.to_hash)
1006
+ wait_until_taggable(instance)
1008
1007
 
1009
1008
  yield instance if block_given?
1010
1009
  instance
@@ -1048,6 +1047,12 @@ EOD
1048
1047
  end
1049
1048
  end
1050
1049
 
1050
+ def wait_until_taggable(instance)
1051
+ Retryable.retryable(:tries => 12, :sleep => 5, :on => [AWS::EC2::Errors::InvalidInstanceID::NotFound, TimeoutError]) do
1052
+ raise TimeoutError unless instance.status == :pending || instance.status == :running
1053
+ end
1054
+ end
1055
+
1051
1056
  def get_listeners(listeners)
1052
1057
  case listeners
1053
1058
  when Hash
@@ -1,7 +1,7 @@
1
1
  class Chef
2
2
  module Provisioning
3
3
  module AWSDriver
4
- VERSION = '1.2.0'
4
+ VERSION = '1.2.1'
5
5
  end
6
6
  end
7
7
  end
@@ -155,6 +155,12 @@ describe "AWS Tagged Items" do
155
155
  ).and be_idempotent
156
156
  end
157
157
 
158
+ it "does not error when a class does not define #aws_tags" do
159
+ expect_recipe {
160
+ aws_eip_address 'test_address'
161
+ }.to create_an_aws_eip_address('test_address')
162
+ end
163
+
158
164
  end
159
165
  end
160
166
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-provisioning-aws
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Ewart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-27 00:00:00.000000000 Z
11
+ date: 2015-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef