dopv 0.12.0 → 0.13.0

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: 1efa5fc9e9c48829ffa021a943dcf8cd4b989e99
4
- data.tar.gz: f17df818250d5f25586c42bfa9565bea1fd8af43
3
+ metadata.gz: b629f251875fa5a722c8653bf7fc876ed61351d3
4
+ data.tar.gz: 2f8482900d2ba04f2b9cd8fb95d40f6e272f60af
5
5
  SHA512:
6
- metadata.gz: 2c664c03979578a689f4acef0786a9588c1212c67d1dc5a250c64e8c17af79b00bb93f97cf839683d2bdac6f9359573666f4863fc09ef38b1998bc980f5d68a0
7
- data.tar.gz: cc23756967cf69347c3254c6ce091915d1894efabf5cf3a24c8bb044377ae85c5d5d7108e762505140807f7387beb8cdc172b258535b938cb22b7daa4a1db327
6
+ metadata.gz: d7732db19befd3c9598343dd1df16f8765336ebedd227692bbf8ca3c7c128d913afd481037c9efebc98ca259998323b9500e8d02ccbc404f19a4636253e193cf
7
+ data.tar.gz: 7e6ac4f822ad2379a33786ad1b5ee8653437175a9646fdeb99439197df0ca11e759ea9c4a5adf9b85d110c1a4254a030de09e7a18588e7205ad86419d14cd736
@@ -1,3 +1,15 @@
1
+ # 0.13.0 24.04.2017
2
+ ## [deps]
3
+ * Update `dop_common`
4
+
5
+ ## [vsphere]
6
+ * Some minor fixes and improvements
7
+ * Fix typo customization_domain_password in `customize_node_instance`
8
+ * Addition filtering apipa and ipv6 in `get_node_ip_addresses`
9
+ * Add ability to transform disks during clone from template (see plan node property thin_clone)
10
+ * Add missing requires
11
+ * Cleanup unnecessary delegators
12
+
1
13
  # 0.12.0 07.04.2017
2
14
  ## [vsphere]
3
15
  * Improve `destroy_node`
@@ -6,7 +18,7 @@
6
18
  * Filtering apipa and ipv6
7
19
  * Skipping if vm tools unmanaged or has no connected guest network interface
8
20
  * Improve `customize_node_instance` windows sysprep
9
- * Add possibility to join domain or workgroup
21
+ * Add ability to join domain or workgroup
10
22
  * Some minor fixes and improvements
11
23
  * `@wait_params` to instance
12
24
  * Handling of properties thin/thick provisioning, timezone and product_id
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dopv (0.11.0)
5
- dop_common (~> 0.13, >= 0.13.0)
4
+ dopv (0.13.0)
5
+ dop_common (~> 0.14, >= 0.14.0)
6
6
  fog (~> 1.36.0)
7
7
  fog-google (< 0.1.1)
8
8
  fog-profitbricks (~> 0.0.5)
@@ -25,7 +25,7 @@ GEM
25
25
  docile (1.1.5)
26
26
  domain_name (0.5.20170404)
27
27
  unf (>= 0.0.5, < 1.0.0)
28
- dop_common (0.13.0)
28
+ dop_common (0.14.0)
29
29
  hashdiff (~> 0.3, >= 0.3.1)
30
30
  hiera (~> 3)
31
31
  lockfile (~> 2)
@@ -202,7 +202,7 @@ GEM
202
202
  builder
203
203
  nokogiri (>= 1.4.1)
204
204
  trollop
205
- rest-client (2.0.1)
205
+ rest-client (2.0.2)
206
206
  http-cookie (>= 1.0.2, < 2.0)
207
207
  mime-types (>= 1.16, < 4.0)
208
208
  netrc (~> 0.8)
@@ -210,7 +210,7 @@ GEM
210
210
  rspec-core (~> 3.5.0)
211
211
  rspec-expectations (~> 3.5.0)
212
212
  rspec-mocks (~> 3.5.0)
213
- rspec-command (1.0.1)
213
+ rspec-command (1.0.2)
214
214
  mixlib-shellout (~> 2.0)
215
215
  rspec (~> 3.2)
216
216
  rspec-its (~> 1.2)
@@ -237,7 +237,7 @@ GEM
237
237
  trollop (2.1.2)
238
238
  unf (0.1.4)
239
239
  unf_ext
240
- unf_ext (0.0.7.2)
240
+ unf_ext (0.0.7.4)
241
241
  xml-simple (1.1.5)
242
242
 
243
243
  PLATFORMS
@@ -44,7 +44,7 @@ Gem::Specification.new do |spec|
44
44
  spec.add_dependency "fog-profitbricks", "~> 0.0.5" # fog dependency but fog-profitbricks > 0.5 requires ruby 2.x
45
45
  spec.add_dependency "fog", "~> 1.36.0"
46
46
  spec.add_dependency "gli", "~> 2.13.1"
47
- spec.add_dependency "dop_common", "~> 0.13", '>= 0.13.0'
47
+ spec.add_dependency "dop_common", "~> 0.14", '>= 0.14.0'
48
48
  spec.add_dependency 'parallel', '~> 1'
49
49
  if RUBY_VERSION < "2"
50
50
  spec.add_dependency "rest-client", "< 2.0"
@@ -1,6 +1,7 @@
1
1
  require 'rbvmomi'
2
2
  require 'digest/sha2'
3
3
  require 'fog'
4
+ require 'resolv'
4
5
 
5
6
  module Dopv
6
7
  module Infrastructure
@@ -8,7 +9,7 @@ module Dopv
8
9
  class Vsphere < Base
9
10
  extend Forwardable
10
11
 
11
- def_delegators :@plan, :product_id, :organization_name, :domain, :workgroup
12
+ def_delegators :@plan, :product_id, :organization_name, :workgroup, :thin_clone
12
13
 
13
14
  def initialize(node_config, data_disks_db, wait_params={})
14
15
  super(node_config, data_disks_db)
@@ -68,9 +69,15 @@ module Dopv
68
69
  def create_node_instance
69
70
  ::Dopv::log.info("Node #{nodename}: Creating node instance.")
70
71
  @node_creation_opts['datastore'] = infrastructure_properties.default_pool unless infrastructure_properties.default_pool.nil?
71
- vm = compute_provider.vm_clone(@node_creation_opts.merge(
72
- 'power_on' => false,
73
- 'wait' => true))
72
+ @node_creation_opts['transform'] = thin_clone ? :sparse : :flat unless thin_clone.nil?
73
+
74
+ vm = compute_provider.vm_clone(
75
+ @node_creation_opts.merge(
76
+ 'power_on' => false,
77
+ 'wait' => true
78
+ )
79
+ )
80
+
74
81
  compute_provider.servers.get(vm['new_vm']['id'])
75
82
  end
76
83
 
@@ -140,7 +147,7 @@ module Dopv
140
147
  if domain
141
148
  customization_domain_password_settings = (RbVmomi::VIM::CustomizationPassword.new(
142
149
  :plainText => true,
143
- :value => customize_domain_password(domain)
150
+ :value => customization_domain_password(domain)
144
151
  ) rescue nil)
145
152
  customization_id = RbVmomi::VIM::CustomizationIdentification.new(
146
153
  :joinDomain => domain,
@@ -361,6 +368,7 @@ module Dopv
361
368
 
362
369
  def get_node_ip_addresses(node_instance)
363
370
  begin
371
+ is_windows = guest_id_to_os_family(node_instance) == :windows
364
372
  raise ProviderError, "VMware Tools not installed" unless node_instance.tools_installed?
365
373
 
366
374
  ::Dopv::log.debug("Node #{nodename}: Waiting on VMware Tools for #{@wait_params[:maxtime]} seconds.")
@@ -373,7 +381,6 @@ module Dopv
373
381
  node_ref_guest_net = nil
374
382
  start_time = Time.now.to_f
375
383
  is_connected = false
376
- is_windows = guest_id_to_os_family(node_instance) == :windows
377
384
  node_ref.guest.net.each do |i| is_connected ||= i.connected end
378
385
  raise ProviderError, "No connected network interface available" unless is_connected
379
386
 
@@ -394,7 +401,7 @@ module Dopv
394
401
 
395
402
  rescue Exception => e
396
403
  ::Dopv::log.debug("Node #{nodename}: Unable to obtain IP Addresses, Error: #{e.message}.")
397
- [node_instance.public_ip_address].compact
404
+ [node_instance.public_ip_address].compact.select{|i| i.match(Resolv::IPv4::Regex) && !(i.start_with?('169.254.') && is_windows)}
398
405
  end
399
406
  end
400
407
  end
@@ -1,3 +1,3 @@
1
1
  module Dopv
2
- VERSION = '0.12.0'
2
+ VERSION = '0.13.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dopv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavol Dilung
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-04-07 00:00:00.000000000 Z
12
+ date: 2017-04-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -289,20 +289,20 @@ dependencies:
289
289
  requirements:
290
290
  - - "~>"
291
291
  - !ruby/object:Gem::Version
292
- version: '0.13'
292
+ version: '0.14'
293
293
  - - ">="
294
294
  - !ruby/object:Gem::Version
295
- version: 0.13.0
295
+ version: 0.14.0
296
296
  type: :runtime
297
297
  prerelease: false
298
298
  version_requirements: !ruby/object:Gem::Requirement
299
299
  requirements:
300
300
  - - "~>"
301
301
  - !ruby/object:Gem::Version
302
- version: '0.13'
302
+ version: '0.14'
303
303
  - - ">="
304
304
  - !ruby/object:Gem::Version
305
- version: 0.13.0
305
+ version: 0.14.0
306
306
  - !ruby/object:Gem::Dependency
307
307
  name: parallel
308
308
  requirement: !ruby/object:Gem::Requirement