vm_shepherd 3.1.6 → 3.1.7

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: e7f73287b799bf724b192d5f7344f8d2e6391a31
4
- data.tar.gz: 08bb033f69ac1f3a2bfdfa72ff4d8cbc62b21924
3
+ metadata.gz: 61e6b04e13c0f0762b81fb11dc9e171b451c632b
4
+ data.tar.gz: 339c9ad6b00c2816566fc00beb203958fb396bb5
5
5
  SHA512:
6
- metadata.gz: 690db91ffe1554092ac8c9a3e33f33ca88961a2f6844206b12c69ec0fa1cb34ab8606e09d9da462c3ea65a181b70c8b84f57d35934d7d93c878b69d12a7f9260
7
- data.tar.gz: ef60773ed1d23b22a47484ef5c29e0dbc5518e68280eeb3c6d88795564ca3f28b327f84f7977a81a49de485b77a85d3e996f2dbbc94022076647d4b32cc54e66
6
+ metadata.gz: f26a770beb056868363a81aa12a2f191c8d743fb002ef5362754fdc73774eac4f34150206f72010b36380fbba9c771449c95e7406d63b930782dfe5f638ae21e
7
+ data.tar.gz: dfcfd5c38c05d9f540a213b6c8ae1d8ba3a08335ae4bb25cb20c42e11a8bcdb2afa7628ccca3b62a2feebda00737598ebf53e1d5e4f6f339ce64197fb8d0be14
@@ -124,8 +124,8 @@ module VmShepherd
124
124
  end
125
125
 
126
126
  def destroy(vm_config)
127
- AWS.ec2.instances.each do |instance|
128
- if instance.tags.to_h['Name'] == vm_config.fetch('vm_name')
127
+ AWS.ec2.instances.with_tag('Name', vm_config.fetch('vm_name')).each do |instance|
128
+ if instance.tags['Name'] == vm_config.fetch('vm_name')
129
129
  vm_ip_address = vm_config.fetch('vm_ip_address', nil)
130
130
  elastic_ip = instance.elastic_ip unless vm_ip_address
131
131
  if elastic_ip
@@ -1,3 +1,3 @@
1
1
  module VmShepherd
2
- VERSION = '3.1.6'.freeze
2
+ VERSION = '3.1.7'.freeze
3
3
  end
@@ -759,7 +759,7 @@ module VmShepherd
759
759
  let(:instances) { [non_terminated_instance, instance] }
760
760
 
761
761
  before do
762
- allow(ec2).to receive(:instances).and_return(instances)
762
+ allow(ec2).to receive_message_chain(:instances, :with_tag).and_return(instances)
763
763
  allow(instance).to receive(:terminate)
764
764
  end
765
765
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vm_shepherd
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.6
4
+ version: 3.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ops Manager Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-27 00:00:00.000000000 Z
11
+ date: 2016-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-v1