vagrant-vsphere 1.7.1 → 1.8.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: bd1509116bc12c045bab73a2ae34dbfbd6f9b573
4
- data.tar.gz: 6eee258203566e7b0d811083efd1c9b38c979572
3
+ metadata.gz: ae7d9019775f8f961ef05883df03843773b9ebf3
4
+ data.tar.gz: 6c7a162ca9a69f024a2f4dc35ebb7192c8792355
5
5
  SHA512:
6
- metadata.gz: d7f8aa26cb4912301bbd0a9ef69c635efc8ab98e1eeda81ea865963ff28f9d4c45fb65edc3f2b1817906e4506773ca221d911a812b0a4aacb2fe424e55ca0eed
7
- data.tar.gz: 757f3bbe41516dc362f4c3c8a08f4b9082389a58e25c919a0c3c6d06a1e1af2bdf20c50953731736b207843776b747555628ff1a109a8824f479298fafb7817c
6
+ metadata.gz: 267fef6b672212a0e5bfde2660bc32354f0b4f963a7da8788a4597eb4cd107f1406a3ab4af2fc25922b077cd3aad5c91d70954ba4b226184b6c67fd215a6f661
7
+ data.tar.gz: 187a44c00e3123348f26bd3aa60c7f9f10d82c037f19e97f6ea8fe6a0ec3699c9db64f92d2f5b603355abb5c648edb9d2f1f972b06bbd5139b5e6c0b1b2e1c84
data/.bumpversion.cfg CHANGED
@@ -1,5 +1,5 @@
1
1
  [bumpversion]
2
- current_version = 1.7.1
2
+ current_version = 1.8.0
3
3
  tag = true
4
4
  commit = true
5
5
 
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## [1.8.0 (2016-04-21)](https://github.com/nsidc/vagrant-vsphere/releases/tag/v1.8.0)
2
+
3
+ - Allow VLANs on virtual switches to work correctly
4
+ ([adampointer:master](https://github.com/nsidc/vagrant-vsphere/pull/188)).
5
+ - Make compatible with `i18n` v0.7.0 (resolving
6
+ [#163](https://github.com/nsidc/vagrant-vsphere/pull/163)).
7
+ - Add support for specifying a full resource pool name
8
+ ([davidhrbac:master](https://github.com/nsidc/vagrant-vsphere/pull/152) and
9
+ [#189](https://github.com/nsidc/vagrant-vsphere/pull/189)).
10
+
1
11
  ## [1.7.1 (2016-03-30)](https://github.com/nsidc/vagrant-vsphere/releases/tag/v1.7.1)
2
12
 
3
13
  - Allow `vagrant status` and `vagrant ssh` to run without a lock
data/Gemfile CHANGED
@@ -8,7 +8,7 @@ group :development do
8
8
  # Vagrant environment itself using `vagrant plugin`.
9
9
 
10
10
  ruby '2.0.0'
11
- gem 'vagrant', git: 'git://github.com/mitchellh/vagrant.git', tag: 'v1.6.4'
11
+ gem 'vagrant', git: 'git://github.com/mitchellh/vagrant.git', tag: 'v1.8.1'
12
12
  end
13
13
 
14
14
  group :plugins do
data/README.md CHANGED
@@ -19,9 +19,9 @@ This provider is built on top of the
19
19
  * libxml2, libxml2-dev, libxslt, libxslt-dev
20
20
 
21
21
  ## Current Version
22
- **version: 1.7.1**
22
+ **version: 1.8.0**
23
23
 
24
- vagrant-vsphere (**version: 1.7.1**) is available from
24
+ vagrant-vsphere (**version: 1.8.0**) is available from
25
25
  [RubyGems.org](https://rubygems.org/gems/vagrant-vsphere)
26
26
 
27
27
  ## Installation
@@ -212,7 +212,7 @@ module VagrantPlugins
212
212
  modify_network_card(template, spec) do |card|
213
213
  begin
214
214
  switch_port = RbVmomi::VIM.DistributedVirtualSwitchPortConnection(switchUuid: network.config.distributedVirtualSwitch.uuid, portgroupKey: network.key)
215
- card.backing.port = switch_port
215
+ card.backing = RbVmomi::VIM::VirtualEthernetCardNetworkBackingInfo(port: switch_port)
216
216
  rescue
217
217
  # not connected to a distibuted switch?
218
218
  card.backing = RbVmomi::VIM::VirtualEthernetCardNetworkBackingInfo(network: network, deviceName: network.name)
@@ -13,12 +13,26 @@ module VagrantPlugins
13
13
  end
14
14
 
15
15
  def get_resource_pool(datacenter, machine)
16
- compute_resource = get_compute_resource(datacenter, machine)
17
- rp = compute_resource.resourcePool
18
- unless machine.provider_config.resource_pool_name.nil?
19
- rp = compute_resource.resourcePool.find(machine.provider_config.resource_pool_name)
20
- fail Errors::VSphereError, :missing_resource_pool if rp.nil?
16
+ rp = get_compute_resource(datacenter, machine)
17
+
18
+ resource_pool_name = machine.provider_config.resource_pool_name || ''
19
+
20
+ entity_array = resource_pool_name.split('/')
21
+ entity_array.each do |entity_array_item|
22
+ next if entity_array_item.empty?
23
+ if rp.is_a? RbVmomi::VIM::Folder
24
+ rp = rp.childEntity.find { |f| f.name == entity_array_item } || fail(Errors::VSphereError, :missing_resource_pool)
25
+ elsif rp.is_a? RbVmomi::VIM::ClusterComputeResource
26
+ rp = rp.resourcePool.resourcePool.find { |f| f.name == entity_array_item } || fail(Errors::VSphereError, :missing_resource_pool)
27
+ elsif rp.is_a? RbVmomi::VIM::ResourcePool
28
+ rp = rp.resourcePool.find { |f| f.name == entity_array_item } || fail(Errors::VSphereError, :missing_resource_pool)
29
+ elsif rp.is_a? RbVmomi::VIM::ComputeResource
30
+ rp = rp.resourcePool.find(resource_pool_name) || fail(Errors::VSphereError, :missing_resource_pool)
31
+ else
32
+ fail Errors::VSphereError, :missing_resource_pool
33
+ end
21
34
  end
35
+ rp = rp.resourcePool if !rp.is_a?(RbVmomi::VIM::ResourcePool) && rp.respond_to?(:resourcePool)
22
36
  rp
23
37
  end
24
38
 
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module VSphere
3
- VERSION = '1.7.1'
3
+ VERSION = '1.8.0'
4
4
  end
5
5
  end
data/spec/spec_helper.rb CHANGED
@@ -12,6 +12,7 @@ require 'vSphere/action/message_already_created'
12
12
  require 'vSphere/action/message_not_created'
13
13
  require 'vSphere/action/destroy'
14
14
  require 'vSphere/action/power_off'
15
+ require 'vagrant-vsphere'
15
16
 
16
17
  VIM = RbVmomi::VIM
17
18
 
@@ -23,6 +24,8 @@ NAME = 'vm'
23
24
  IP_ADDRESS = '127.0.0.1'
24
25
 
25
26
  RSpec.configure do |config|
27
+ VagrantPlugins::VSphere::Plugin.setup_i18n
28
+
26
29
  # removes deprecation warnings.
27
30
  # http://stackoverflow.com/questions/20275510/how-to-avoid-deprecation-warning-for-stub-chain-in-rspec-3-0/20296359#20296359
28
31
  config.mock_with :rspec do |c|
data/vSphere.gemspec CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
15
15
  s.add_dependency 'nokogiri', '~>1.5'
16
16
  # force the use of rbvmomi 1.8.2 to work around concurrency errors: https://github.com/nsidc/vagrant-vsphere/issues/139
17
17
  s.add_dependency 'rbvmomi', '~> 1.8.2'
18
- s.add_dependency 'i18n', '~> 0.6.4'
18
+ s.add_dependency 'i18n', '>= 0.6.4', '< 0.8.0'
19
19
 
20
20
  s.add_development_dependency 'rake'
21
21
  s.add_development_dependency 'rspec-core'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-vsphere
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.1
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Grauch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-30 00:00:00.000000000 Z
11
+ date: 2016-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -42,16 +42,22 @@ dependencies:
42
42
  name: i18n
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: 0.6.4
48
+ - - <
49
+ - !ruby/object:Gem::Version
50
+ version: 0.8.0
48
51
  type: :runtime
49
52
  prerelease: false
50
53
  version_requirements: !ruby/object:Gem::Requirement
51
54
  requirements:
52
- - - ~>
55
+ - - '>='
53
56
  - !ruby/object:Gem::Version
54
57
  version: 0.6.4
58
+ - - <
59
+ - !ruby/object:Gem::Version
60
+ version: 0.8.0
55
61
  - !ruby/object:Gem::Dependency
56
62
  name: rake
57
63
  requirement: !ruby/object:Gem::Requirement