vm_shepherd 3.0.7 → 3.0.8
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a0849bb2535214c6f36d2587fba1b49539cc10d
|
4
|
+
data.tar.gz: 956cd94e7372420ade106411e5bee1a1b2de11bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96bca2b1fa4ee198c50802ea3b14ed10393bea9392ef5b7ad670516404420859c4bfad94ae2bc9c6ebe1dd010b82d3047eb57ceb67404bc49c7794a3791aba40
|
7
|
+
data.tar.gz: 00fd41ab55b1d82db8741245264bd2ccf9b31d1e234d24ad7a615d23f4e37e42574d9bb073076587ab4be70e6c5e7c5e0446a0fed45d987332bad70b07ce440a
|
@@ -15,7 +15,7 @@ module VmShepherd
|
|
15
15
|
def deploy(raw_file_path, vm_options)
|
16
16
|
say "Uploading the image #{raw_file_path}"
|
17
17
|
image = image_service.images.create(
|
18
|
-
name: vm_options[:name],
|
18
|
+
name: "#{vm_options[:name]} #{Time.now}",
|
19
19
|
size: File.size(raw_file_path),
|
20
20
|
disk_format: 'raw',
|
21
21
|
container_format: 'bare',
|
@@ -61,9 +61,9 @@ module VmShepherd
|
|
61
61
|
say('Ops Manager instance destroyed')
|
62
62
|
end
|
63
63
|
|
64
|
-
|
65
|
-
|
66
|
-
say("Found Ops Manager image #{image.id}")
|
64
|
+
image_service.images.each do |image|
|
65
|
+
next unless /#{vm_options[:name]} \d+/ =~ image.name && image.status != 'deleted'
|
66
|
+
say("Found an Ops Manager image for env [#{vm_options[:name]}]: [#{image.id}][#{image.name}]")
|
67
67
|
image.destroy
|
68
68
|
say('Ops Manager image destroyed')
|
69
69
|
end
|
@@ -92,6 +92,7 @@ module VmShepherd
|
|
92
92
|
|
93
93
|
say("Destroying #{private_images.size} images:")
|
94
94
|
private_images.each do |image|
|
95
|
+
next if image.status == 'deleted'
|
95
96
|
say(" Destroying image #{image.id}")
|
96
97
|
image.destroy
|
97
98
|
end
|
data/lib/vm_shepherd/version.rb
CHANGED
@@ -117,7 +117,7 @@ module VmShepherd
|
|
117
117
|
|
118
118
|
openstack_vm_manager.deploy(path, openstack_vm_options)
|
119
119
|
|
120
|
-
uploaded_image = image_service.images.find { |image|
|
120
|
+
uploaded_image = image_service.images.find { |image| /#{openstack_vm_options[:name]} \d+/ =~ image.name }
|
121
121
|
expect(uploaded_image).to be
|
122
122
|
expect(uploaded_image.size).to eq(file_size)
|
123
123
|
expect(uploaded_image.disk_format).to eq('raw')
|
@@ -142,7 +142,7 @@ module VmShepherd
|
|
142
142
|
openstack_vm_manager.deploy(path, openstack_vm_options)
|
143
143
|
|
144
144
|
instance_image = image_service.images.get instance.image['id']
|
145
|
-
expect(instance_image.name).to
|
145
|
+
expect(instance_image.name).to match(openstack_vm_options[:name])
|
146
146
|
end
|
147
147
|
|
148
148
|
it 'assigns the correct key_name to the instance' do
|
@@ -216,7 +216,7 @@ module VmShepherd
|
|
216
216
|
def destroy_correct_image
|
217
217
|
change do
|
218
218
|
images.reload
|
219
|
-
images.select { |image|
|
219
|
+
images.select { |image| /#{openstack_vm_options[:name]} \d.+/ =~ image.name }.any?
|
220
220
|
end.from(true).to(false)
|
221
221
|
end
|
222
222
|
|
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.0.
|
4
|
+
version: 3.0.8
|
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-03-
|
11
|
+
date: 2016-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-v1
|
@@ -206,7 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
206
206
|
version: '0'
|
207
207
|
requirements: []
|
208
208
|
rubyforge_project:
|
209
|
-
rubygems_version: 2.5.1
|
209
|
+
rubygems_version: 2.4.5.1
|
210
210
|
signing_key:
|
211
211
|
specification_version: 4
|
212
212
|
summary: A tool for booting and tearing down Ops Manager VMs on various Infrastructures.
|