vagrant-vsphere 0.8.2 → 0.8.3

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: c6a998abddfc897331166c554cdf8d183f7b029e
4
- data.tar.gz: 09f61f95926013c19c700da9f8d3092c2ce4917b
3
+ metadata.gz: 8d45a1640a54cc4ac0664e27c68354033c93ffa4
4
+ data.tar.gz: 8d9c88fd620a038420beba0d12387206e55ebcda
5
5
  SHA512:
6
- metadata.gz: 94e891a7470aad8f85918786bd86309688fedbf31b8adce022d3b2092a9cd0f8fa6084bcd6edfa93ef70bb79fccc6ba2aaa857ebf2ca41f14f6c3687fad6350a
7
- data.tar.gz: d5451cd10b3afeb95c30d3c697c9563b51a26667a8b8f2fc0d982ed6e356fcd7d6b1c4a4efe0538c0b1c0c1758fafbf8b74848ff5d04c17949fad1d1171a19e1
6
+ metadata.gz: 2fb7ae63b09ecef5e1f7997bbe392aa4e43b147fc1164ff2587b225a3ca4ae65acfbdd8d63f69f1c32fefee3fb8e4da876f004156645e9d857870314c5b03bd1
7
+ data.tar.gz: c88435f3e28890dbf622cbfef423d3e88bf4d3dcac5c051cd87cd2740bda09c64b7581d25e8f4522f527d0e9c4d9a390760a6b121359f1f21c859550a33cb7b4
data/Gemfile CHANGED
@@ -7,10 +7,7 @@ group :development do
7
7
  # gem dependency because we expect to be installed within the
8
8
  # Vagrant environment itself using `vagrant plugin`.
9
9
 
10
- if RUBY_VERSION < "2.0.0" then
11
- puts "Found old ruby #{RUBY_VERSION}, using old vagrant (v1.4.3)"
12
- gem 'vagrant', :git => 'git://github.com/mitchellh/vagrant.git', :tag => 'v1.4.3'
13
- else
14
- gem 'vagrant', :git => 'git://github.com/mitchellh/vagrant.git'
15
- end
10
+ ruby "2.0.0"
11
+ gem 'vagrant', :git => 'git://github.com/mitchellh/vagrant.git', :tag => 'v1.5.0'
12
+
16
13
  end
data/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # Vagrant vSphere Provider
2
2
 
3
- This is a [Vagrant](http://www.vagrantup.com) 1.2+ plugin that adds a [vSphere](http://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.wssdk.apiref.doc_50%2Fright-pane.html)
3
+ This is a [Vagrant](http://www.vagrantup.com) 1.5+ plugin that adds a [vSphere](http://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.wssdk.apiref.doc_50%2Fright-pane.html)
4
4
  provider to Vagrant, allowing Vagrant to control and provision machines using VMware. New machines are created from virtual machines or templates which must be configured prior to using using this provider.
5
5
 
6
6
  This provider is built on top of the [RbVmomi](https://github.com/vmware/rbvmomi) Ruby interface to the vSphere API.
7
7
 
8
8
  ## Requirements
9
- * Vagrant 1.2+
9
+ * Vagrant 1.5+
10
10
  * VMware + vSphere API
11
11
  * Ruby 1.9+
12
12
  * libxml2, libxml2-dev, libxslt, libxslt-dev
@@ -159,6 +159,8 @@ This is useful if running Vagrant from multiple directories or if multiple machi
159
159
  * fixes no error messages [#58 leth:no-error-message](https://github.com/nsidc/vagrant-vsphere/pull/58)
160
160
  * fixes typo [#57 targetx007](https://github.com/nsidc/vagrant-vsphere/pull/57)
161
161
  * fixes additional no error messages
162
+ * 0.8.3
163
+ * Fixed "No error message" on rbvmomi method calls. [#74: mkuzmin:rbvmomi-error-messages](https://github.com/nsidc/vagrant-vsphere/pull/74)
162
164
 
163
165
 
164
166
 
@@ -39,8 +39,7 @@ module VagrantPlugins
39
39
  rescue Errors::VSphereError => e
40
40
  raise
41
41
  rescue Exception => e
42
- puts e.message
43
- raise Errors::VSphereError, :message => e.message
42
+ raise Errors::VSphereError.new, e.message
44
43
  end
45
44
 
46
45
  #TODO: handle interrupted status in the environment, should the vm be destroyed?
@@ -107,23 +106,22 @@ module VagrantPlugins
107
106
  template.ReconfigVM_Task(:spec => spec).wait_for_completion
108
107
  end
109
108
 
110
- RbVmomi::VIM.VirtualMachineRelocateSpec(:diskMoveType => :moveChildMostDiskBacking)
109
+ location = RbVmomi::VIM.VirtualMachineRelocateSpec(:diskMoveType => :moveChildMostDiskBacking)
111
110
  else
112
111
  location = RbVmomi::VIM.VirtualMachineRelocateSpec
113
- location[:pool] = get_resource_pool(connection, machine) unless config.clone_from_vm
114
112
 
115
113
  datastore = get_datastore connection, machine
116
114
  location[:datastore] = datastore unless datastore.nil?
117
-
118
- location
119
115
  end
116
+ location[:pool] = get_resource_pool(connection, machine) unless config.clone_from_vm
117
+ location
120
118
  end
121
119
 
122
120
  def get_name(machine, config)
123
121
  return config.name unless config.name.nil?
124
122
 
125
123
  prefix = "#{machine.name}"
126
- prefix.gsub!(/[^-a-z0-9_]/i, "")
124
+ prefix.gsub!(/[^-a-z0-9_\.]/i, "")
127
125
  # milliseconds + random number suffix to allow for simultaneous `vagrant up` of the same box in different dirs
128
126
  prefix + "_#{(Time.now.to_f * 1000.0).to_i}_#{rand(100000)}"
129
127
  end
@@ -15,9 +15,7 @@ module VagrantPlugins
15
15
  rescue Errors::VSphereError => e
16
16
  raise
17
17
  rescue Exception => e
18
- puts e
19
- #raise a properly namespaced error for Vagrant
20
- raise Errors::VSphereError, :message => e.message
18
+ raise Errors::VSphereError.new, e.message
21
19
  end
22
20
  end
23
21
  end
@@ -17,11 +17,10 @@ module VagrantPlugins
17
17
  insecure: config.insecure, proxyHost: config.proxy_host,
18
18
  proxyPort: config.proxy_port
19
19
  @app.call env
20
- rescue VSphere::Errors::VSphereError => e
20
+ rescue Errors::VSphereError => e
21
21
  raise
22
22
  rescue Exception => e
23
- puts e.backtrace
24
- raise VagrantPlugins::VSphere::Errors::VSphereError, :message => e.message
23
+ raise Errors::VSphereError.new, e.message
25
24
  end
26
25
  end
27
26
  end
@@ -31,7 +31,7 @@ module VagrantPlugins
31
31
  rescue Errors::VSphereError => e
32
32
  raise
33
33
  rescue Exception => e
34
- raise Errors::VSphereError, :message => e.message
34
+ raise Errors::VSphereError.new, e.message
35
35
  end
36
36
  end
37
37
  end
@@ -5,7 +5,7 @@ module VagrantPlugins
5
5
  module Util
6
6
  module VimHelpers
7
7
  def get_datacenter(connection, machine)
8
- connection.serviceInstance.find_datacenter(machine.provider_config.data_center_name) or fail Errors::VSphereError, :message => I18n.t('vsphere.errors.missing_datacenter')
8
+ connection.serviceInstance.find_datacenter(machine.provider_config.data_center_name) or fail Errors::VSphereError, :missing_datacenter
9
9
  end
10
10
 
11
11
  def get_vm_by_uuid(connection, machine)
@@ -13,23 +13,23 @@ module VagrantPlugins
13
13
  end
14
14
 
15
15
  def get_resource_pool(connection, machine)
16
- cr = get_datacenter(connection, machine).find_compute_resource(machine.provider_config.compute_resource_name) or fail Errors::VSphereError, :message => I18n.t('vsphere.errors.missing_compute_resource')
17
- cr.resourcePool.find(machine.provider_config.resource_pool_name) or fail Errors::VSphereError, :message => I18n.t('vsphere.errors.missing_resource_pool')
16
+ cr = get_datacenter(connection, machine).find_compute_resource(machine.provider_config.compute_resource_name) or fail Errors::VSphereError, :missing_compute_resource
17
+ cr.resourcePool.find(machine.provider_config.resource_pool_name) or fail Errors::VSphereError, :missing_resource_pool
18
18
  end
19
19
 
20
20
  def get_customization_spec_info_by_name(connection, machine)
21
21
  name = machine.provider_config.customization_spec_name
22
22
  return if name.nil? || name.empty?
23
23
 
24
- manager = connection.serviceContent.customizationSpecManager or fail Errors::VSphereError, :message => I18n.t('vsphere.errors.null_configuration_spec_manager') if manager.nil?
25
- spec = manager.GetCustomizationSpec(:name => name) or fail Errors::VSphereError, :message => I18n.t('vsphere.errors.missing_configuration_spec') if spec.nil?
24
+ manager = connection.serviceContent.customizationSpecManager or fail Errors::VSphereError, :null_configuration_spec_manager if manager.nil?
25
+ spec = manager.GetCustomizationSpec(:name => name) or fail Errors::VSphereError, :missing_configuration_spec if spec.nil?
26
26
  end
27
27
 
28
28
  def get_datastore(connection, machine)
29
29
  name = machine.provider_config.data_store_name
30
30
  return if name.nil? || name.empty?
31
31
 
32
- get_datacenter(connection, machine).find_datastore name or fail Errors::VSphereError, :message => I18n.t('vsphere.errors.missing_datastore')
32
+ get_datacenter(connection, machine).find_datastore name or fail Errors::VSphereError, :missing_datastore
33
33
  end
34
34
  end
35
35
  end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module VSphere
3
- VERSION = '0.8.2'
3
+ VERSION = '0.8.3'
4
4
  end
5
5
  end
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: 0.8.2
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Grauch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-23 00:00:00.000000000 Z
11
+ date: 2014-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -174,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
174
174
  version: '0'
175
175
  requirements: []
176
176
  rubyforge_project:
177
- rubygems_version: 2.0.3
177
+ rubygems_version: 2.2.2
178
178
  signing_key:
179
179
  specification_version: 4
180
180
  summary: VMWare vSphere provider