chef-metal-fogsphere 0.1.0.alpha.24 → 0.1.0.alpha.25

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: 9d2ee56883308b942891d594ef1719c04bd21ed6
4
- data.tar.gz: f49da16d0773a16fa985296a6c92100f1e9c3279
3
+ metadata.gz: 8cc588f8feb12a94a92ca80c75f4449dd11c2970
4
+ data.tar.gz: 6797ea49b07a4a1df8422e93294722178276088d
5
5
  SHA512:
6
- metadata.gz: 177eac184275c8cb45b9fdebc36cd7f9c02fd8d150f33a4d5258f9d0229897e1fdb4c290c13585635944cb0dc7689f1cffecf7bb5b89e306bf1793b35e7d9d18
7
- data.tar.gz: 061bd1768fbf382275f912794b431833c124d391d675884d9401868efeb26ad66bdfc84a23bc74f4d34cbfb8bba2e5fddbfb6f348e84ddd417146c1e24bd6d82
6
+ metadata.gz: 83c383285f6151a3df1ccd5e3177e42ce6286be6b9dfb50307cd74921d7ad51bb0f6f33718cb70bdc86d143cec76556fd904b3b346f810292081d4a89ce4d01f
7
+ data.tar.gz: 8b469ab0e3539b6ce1b3167b1e70c75f8e1f98183584737b78fc18eccb05ae0ace3346cac03601c5cb4095f52de75c22b5780ca8aacd642b5c4e83a3ef1e3e21
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |gem|
6
6
  gem.name = "chef-metal-fogsphere"
7
- gem.version = '0.1.0.alpha.24'
7
+ gem.version = '0.1.0.alpha.25'
8
8
  gem.license = 'Apache 2.0'
9
9
  gem.authors = ["Matt Wrock"]
10
10
  gem.email = ["matt@centurylinkcloud.com"]
data/lib/clc_driver.rb CHANGED
@@ -136,15 +136,22 @@ module ChefMetalVsphere
136
136
  server = nil
137
137
  action_handler.report_progress description
138
138
 
139
- clone_results = compute.vm_clone(convert_to_strings(bootstrap_options))
140
- server = compute.servers.get(clone_results['new_vm']['id'])
141
- if(bootstrap_options[:additional_disk_size_gb] && bootstrap_options[:additional_disk_size_gb].is_a?(Integer) && bootstrap_options[:additional_disk_size_gb] > 0)
142
- volume_options = {
143
- 'server_id' => server.id,
144
- 'datastore' => bootstrap_options[:datastore],
145
- 'size_gb' => bootstrap_options[:additional_disk_size_gb]
146
- }
147
- volume = compute.volumes.create(volume_options)
139
+ begin
140
+ server = compute.get_virtual_machine("#{bootstrap_options[:dest_folder]}/#{machine_spec.name}", bootstrap_options[:datacenter])
141
+ rescue Fog::Compute::Vsphere::NotFound
142
+ end
143
+
144
+ if ! server
145
+ clone_results = compute.vm_clone(convert_to_strings(bootstrap_options))
146
+ server = compute.servers.get(clone_results['new_vm']['id'])
147
+ if(bootstrap_options[:additional_disk_size_gb] && bootstrap_options[:additional_disk_size_gb].is_a?(Integer) && bootstrap_options[:additional_disk_size_gb] > 0)
148
+ volume_options = {
149
+ 'server_id' => server.id,
150
+ 'datastore' => bootstrap_options[:datastore],
151
+ 'size_gb' => bootstrap_options[:additional_disk_size_gb]
152
+ }
153
+ volume = compute.volumes.create(volume_options)
154
+ end
148
155
  end
149
156
 
150
157
  machine_spec.location = {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-metal-fogsphere
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.alpha.24
4
+ version: 0.1.0.alpha.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Wrock
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-07 00:00:00.000000000 Z
11
+ date: 2014-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rbvmomi