rbvmomi 2.0.1 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rbvmomi/version.rb +1 -1
- data/vmodl.db +0 -0
- metadata +2 -3
- data/lib/rbvmomi/vmodl.rb +0 -49
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8b526e5ee6da6e08fe08687ac7f36e375d51b374f08fe5c4e187cbba09ac93b
|
4
|
+
data.tar.gz: b31ae074a872d51395f31a392ddaadf084e838bb81c419f25a41d8cc799050dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ece802dd9fb3c6c0eab113cb4a6a5942ec2e879e32355870d69259af3f1b17219b6d29f7d42321fb42eb82768181802a5bf70530bedcc4472815ec85412c66bc
|
7
|
+
data.tar.gz: 31a654bd9c7805d2512179af1bf9d810600640e5d2aef5408f35c0f0eb320e6cfede361af5e6f5a8888e3205f0b6ffaa1870e706e3e3fa9de1d441ebc830e2da
|
data/lib/rbvmomi/version.rb
CHANGED
data/vmodl.db
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbvmomi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rich Lane
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-
|
12
|
+
date: 2019-03-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: builder
|
@@ -172,7 +172,6 @@ files:
|
|
172
172
|
- lib/rbvmomi/vim/ServiceInstance.rb
|
173
173
|
- lib/rbvmomi/vim/Task.rb
|
174
174
|
- lib/rbvmomi/vim/VirtualMachine.rb
|
175
|
-
- lib/rbvmomi/vmodl.rb
|
176
175
|
- vmodl.db
|
177
176
|
homepage: https://github.com/vmware/rbvmomi
|
178
177
|
licenses:
|
data/lib/rbvmomi/vmodl.rb
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
require 'hashdiff'
|
2
|
-
|
3
|
-
module RbVmomi
|
4
|
-
# Utility class for VMware Managed Object Designed Language
|
5
|
-
#
|
6
|
-
# @author J.R. Garcia <jrg@vmware.com>
|
7
|
-
# @since 2.0.1
|
8
|
-
class VMODL
|
9
|
-
# Create a VMODL object from a marshaled file
|
10
|
-
#
|
11
|
-
# @author J.R. Garcia <jrg@vmware.com>
|
12
|
-
#
|
13
|
-
# @since 2.0.1
|
14
|
-
#
|
15
|
-
# @param [String] file the path to create the VMODL object from
|
16
|
-
#
|
17
|
-
# @return [VMODL] the created VMODL
|
18
|
-
def self.from_file(file = '')
|
19
|
-
raise ArgumentError, "'#{file}' doesn't exist" unless File.exist?(file)
|
20
|
-
new.tap { |o| o.instance_variable_set(:@file, file) }
|
21
|
-
end
|
22
|
-
|
23
|
-
# Translate a VMODL object to a Hash
|
24
|
-
#
|
25
|
-
# @author J.R. Garcia <jrg@vmware.com>
|
26
|
-
#
|
27
|
-
# @since 2.0.1
|
28
|
-
#
|
29
|
-
# @return [Hash] a Hash representation of the VMODL
|
30
|
-
def to_h
|
31
|
-
Marshal.load(IO.read(@file))
|
32
|
-
end
|
33
|
-
|
34
|
-
# Diff this VMODL with another VMODL
|
35
|
-
#
|
36
|
-
# @author J.R. Garcia <jrg@vmware.com>
|
37
|
-
#
|
38
|
-
# @since 2.0.1
|
39
|
-
#
|
40
|
-
# @return a diff of the VMODLs
|
41
|
-
def diff(other)
|
42
|
-
HashDiff.diff(self.to_h, other.to_h)
|
43
|
-
end
|
44
|
-
|
45
|
-
private
|
46
|
-
|
47
|
-
attr_accessor :file
|
48
|
-
end
|
49
|
-
end
|