fog-vsphere 1.0.0 → 1.0.1

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: d6cf7e43c615d892eb1e8015089e7098decc5235
4
- data.tar.gz: d7ae58a0b26999227b253772a2d77ec988376729
3
+ metadata.gz: 6484c578c8862f6daabfc08133d6ce75e9115d19
4
+ data.tar.gz: 2350426ea93ab74418b4a83a036bdc9cb334de5f
5
5
  SHA512:
6
- metadata.gz: deff53d80a1450b6e034c62a5ff45695d92f3951a647da263d2cd616cf23c0dbbb835208327ca1eedbd5adeccc20bf64ff70faa4f3886dd3b5c29117fb1ea33e
7
- data.tar.gz: fd7e7e7f484f36f7bf5b459920608c64af80b24e1d3d6dbde6cd6468f2ad63772a509e8a0c26864e750780c47039fd1e09e21dc252565c532d54fc57a137b2d1
6
+ metadata.gz: 1e97ddb8418174a55e6c09e3daae4d200eae177ed91058d512f5721a176afa5739a1aba9e187e0498e319d2c0c1e65e4f182b68ba67cee8db302814ecc4276b1
7
+ data.tar.gz: 826dbf47f157dc8667904ede7cc5fa29006f1e042816d4b60376ee628ab7a17325e78ca033a98240cb511eb6da2a1fbbb6df96a838f4dfc788f0d53cb58e0049
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## v1.0.1 8/23/2016
2
+
3
+ * Update fog-vsphere.gemspec to pin RbVmomi for Ruby 1.8.x versions
4
+
1
5
  ## v1.0.0 7/28/2016
2
6
 
3
7
  * No changes, just releasing v1.0.0
data/CONTRIBUTORS.md CHANGED
@@ -1,5 +1,6 @@
1
1
  * Ahmed Elsabbahy <aelsabbahy@promnetwork.com>
2
2
  * Alan Sebastian <asebastian2@gmail.com>
3
+ * Ben Talbot - btalbot <ben_t48@hotmail.com>
3
4
  * Carl Caum <carl@carlcaum.com>
4
5
  * Carlos Sanchez <csanchez@maestrodev.com>
5
6
  * Chris Thompson <chris.thompson@govdelivery.com>
data/fog-vsphere.gemspec CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.required_ruby_version = '>= 1.8.7'
23
23
 
24
24
  spec.add_runtime_dependency 'fog-core'
25
- spec.add_runtime_dependency 'rbvmomi', '~> 1.8'
25
+ spec.add_runtime_dependency 'rbvmomi', '~> 1.8.0'
26
26
 
27
27
  spec.add_development_dependency 'bundler', '~> 1.10'
28
28
  spec.add_development_dependency 'pry', '~> 0.10'
@@ -3,6 +3,7 @@ source 'https://rubygems.org'
3
3
  gem 'codeclimate-test-reporter', group: :test, require: nil
4
4
 
5
5
  gem 'net-ssh', '~> 2.9'
6
- gem 'rubocop', '~> 0.34'
6
+ gem 'rubocop', '~> 0.41.0'
7
+ gem 'json', '~> 1.8.0'
7
8
 
8
9
  gemspec :path => '..'
@@ -48,8 +48,12 @@ module Fog
48
48
  raise Fog::Errors::Error.new('Resaving an existing object may create a duplicate') if persisted?
49
49
  requires :server_id, :size, :datastore
50
50
 
51
+ # When adding volumes to vsphere, if our unit_number is 7 or higher, vsphere will increment the unit_number
52
+ # This is due to SCSI ID 7 being reserved for the pvscsi controller
53
+ # When referring to a volume that already added using a unit_id of 7 or higher, we must refer to the actual SCSI ID
51
54
  if unit_number.nil?
52
- used_unit_numbers = server.volumes.map { |volume| volume.unit_number }
55
+ # Vsphere maps unit_numbers 7 and greater to a higher SCSI ID since the pvscsi driver reserves SCSI ID 7
56
+ used_unit_numbers = server.volumes.map { |volume| volume.unit_number < 7 ? volume.unit_number : volume.unit_number - 1 }
53
57
  max_unit_number = used_unit_numbers.max
54
58
 
55
59
  if max_unit_number > server.volumes.size
@@ -67,6 +71,10 @@ module Fog
67
71
  data = service.add_vm_volume(self)
68
72
 
69
73
  if data['task_state'] == 'success'
74
+ if self.unit_number >= 7
75
+ self.unit_number += 1
76
+ end
77
+
70
78
  # We have to query vSphere to get the volume attributes since the task handle doesn't include that info.
71
79
  created = server.volumes.all.find { |volume| volume.unit_number == self.unit_number }
72
80
 
@@ -12,8 +12,6 @@ module Fog
12
12
  # output is cleaned up to return the new path
13
13
  # new path will be path/name, example: "Production/Pool1"
14
14
  new_folder.path.reject { |a| a.first.class == "Folder" }.map { |a| a.first.name }.join("/").sub(/^\/?Datacenters\/#{datacenter}\/vm\/?/, '')
15
- rescue => e
16
- raise e, "failed to create folder: #{e}"
17
15
  end
18
16
  end
19
17
  end
@@ -40,8 +40,6 @@ module Fog
40
40
  vm = create_vm_on_datastore(vm_cfg, vmFolder, resource_pool, host)
41
41
  end
42
42
  vm.config.instanceUuid
43
- rescue => e
44
- raise e, "failed to create vm: #{e}"
45
43
  end
46
44
 
47
45
  private
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module Vsphere
3
- VERSION = '1.0.0'
3
+ VERSION = '1.0.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-vsphere
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - J.R. Garcia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-28 00:00:00.000000000 Z
11
+ date: 2016-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fog-core
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.8'
33
+ version: 1.8.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.8'
40
+ version: 1.8.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -141,7 +141,6 @@ files:
141
141
  - Rakefile
142
142
  - fog-vsphere.gemspec
143
143
  - gemfiles/Gemfile.1.9.2+
144
- - gemfiles/Gemfile.1.9.2-
145
144
  - lib/fog/bin/vsphere.rb
146
145
  - lib/fog/vsphere.rb
147
146
  - lib/fog/vsphere/compute.rb
@@ -1,11 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'mime-types', '~> 1.25'
4
- gem 'net-ssh', '~> 2.9'
5
- gem 'nokogiri', '~> 1.5.11'
6
- gem 'rainbow', '~> 1.99'
7
- gem 'rest-client', '~> 1.6.8'
8
- gem 'rubocop', '~> 0.5.0'
9
- gem 'tins', '~> 1.6.0'
10
-
11
- gemspec :path => '..'