fog-vsphere 1.5.2 → 1.6.0
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/lib/fog/vsphere/models/compute/server.rb +11 -2
- data/lib/fog/vsphere/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed406936e8160692fc51175c72c9011fecd95653
|
4
|
+
data.tar.gz: 7f184ce06c1b43431c84da12d2880589d570d724
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c3892e6447634c9cb464ac7fd9aae19ef12c7583a0fa6f598a66055e6aee66007e4dfa44e8859b417da0cdf3b1ec71f732196e6bff2b0de3d20d4a9e5149410
|
7
|
+
data.tar.gz: 8f99da266df8a4aa7182d383601562664fa26a3c50a2dfbad5cb2b4479ade1a3f2e3756d7d4db13172421cf5210ee0e7b12dbb06b961203ffae407f110dc6c1f
|
data/CHANGELOG.md
CHANGED
@@ -272,11 +272,12 @@ module Fog
|
|
272
272
|
def save
|
273
273
|
requires :name, :cluster, :datacenter
|
274
274
|
if persisted?
|
275
|
-
|
276
|
-
|
275
|
+
vm_reconfig_cpus if attribute_changed?(:cpus) || attribute_changed?(:corespersocket)
|
276
|
+
vm_reconfig_memory if attribute_changed?(:memory_mb)
|
277
277
|
else
|
278
278
|
self.id = service.create_vm(attributes)
|
279
279
|
end
|
280
|
+
@old = nil
|
280
281
|
reload
|
281
282
|
end
|
282
283
|
|
@@ -344,6 +345,14 @@ module Fog
|
|
344
345
|
]
|
345
346
|
end
|
346
347
|
end
|
348
|
+
|
349
|
+
def attribute_changed?(attr)
|
350
|
+
self.attributes.select { |k, v| old.attributes[k] != v }.key?(attr)
|
351
|
+
end
|
352
|
+
|
353
|
+
def old
|
354
|
+
@old ||= self.dup.reload
|
355
|
+
end
|
347
356
|
end
|
348
357
|
end
|
349
358
|
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.
|
4
|
+
version: 1.6.0
|
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-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fog-core
|