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 +4 -4
- data/CHANGELOG.md +4 -0
- data/CONTRIBUTORS.md +1 -0
- data/fog-vsphere.gemspec +1 -1
- data/gemfiles/Gemfile.1.9.2+ +2 -1
- data/lib/fog/vsphere/models/compute/volume.rb +9 -1
- data/lib/fog/vsphere/requests/compute/create_folder.rb +0 -2
- data/lib/fog/vsphere/requests/compute/create_vm.rb +0 -2
- data/lib/fog/vsphere/version.rb +1 -1
- metadata +4 -5
- data/gemfiles/Gemfile.1.9.2- +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6484c578c8862f6daabfc08133d6ce75e9115d19
|
4
|
+
data.tar.gz: 2350426ea93ab74418b4a83a036bdc9cb334de5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e97ddb8418174a55e6c09e3daae4d200eae177ed91058d512f5721a176afa5739a1aba9e187e0498e319d2c0c1e65e4f182b68ba67cee8db302814ecc4276b1
|
7
|
+
data.tar.gz: 826dbf47f157dc8667904ede7cc5fa29006f1e042816d4b60376ee628ab7a17325e78ca033a98240cb511eb6da2a1fbbb6df96a838f4dfc788f0d53cb58e0049
|
data/CHANGELOG.md
CHANGED
data/CONTRIBUTORS.md
CHANGED
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'
|
data/gemfiles/Gemfile.1.9.2+
CHANGED
@@ -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
|
-
|
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
|
data/lib/fog/vsphere/version.rb
CHANGED
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.
|
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-
|
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:
|
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:
|
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
|
data/gemfiles/Gemfile.1.9.2-
DELETED