vmware_web_service 2.0.0 → 2.1.1
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/VMwareWebService/MiqVim.rb +23 -3
- data/lib/VMwareWebService/MiqVimCustomizationSpecManager.rb +1 -1
- data/lib/VMwareWebService/MiqVimInventory.rb +6 -1
- data/lib/VMwareWebService/MiqVimVm.rb +1 -1
- data/lib/VMwareWebService/VixDiskLib/VixDiskLib.rb +6 -2
- data/lib/VMwareWebService/VixDiskLib/VixDiskLibServer.rb +1 -3
- data/lib/VMwareWebService/VixDiskLib/vdl_wrapper.rb +1 -3
- data/lib/VMwareWebService/version.rb +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dec8c1bf5bd2dd9fc8d00e057e146cf7dea54c2cbcfe5c500f71389e333d6de4
|
4
|
+
data.tar.gz: 331dbc8f7400e12b2a3a5c1c3dd7b474db1880be659a9e182112b23c8278b817
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73e001def303f702ad26815843ec3b0fc25cbdfa26fb4c796cdec1e333e4a6fb8c0357cf86ce8ea31e076401b9e1729d41555d1668e296d46a4aea7bd59bdf1b
|
7
|
+
data.tar.gz: 5e91e171b1d568f6b1920a29ef69161eeebc9accd1261e3e93b7cab58a126f890266013552f23e98c24c1088646512dd97e91b7b08ee52ff4e959f011e33b192
|
@@ -20,7 +20,7 @@ class MiqVim < MiqVimInventory
|
|
20
20
|
|
21
21
|
attr_reader :updateThread, :monitor_updates
|
22
22
|
|
23
|
-
# @param server [String] DNS name or IP address of the vCenter Server
|
23
|
+
# @param server [String] DNS name or IP address of the vCenter Server
|
24
24
|
# @param username [String] Username to connect to the vCenter Server
|
25
25
|
# @param password [String] Password to connect to the vCenter Server
|
26
26
|
# @param cacheScope [Symbol] A pre-defined set of properties to cache (default: nil)
|
@@ -30,10 +30,11 @@ class MiqVim < MiqVimInventory
|
|
30
30
|
# @param notifyMethod [Method] A optional method to call for each update (default: nil)
|
31
31
|
# @param maxWait [Integer] How many seconds to wait before breaking out of WaitForUpdates (default: 60)
|
32
32
|
# @param maxObjects [Integer] How many objects to return from each WaitForUpdates page (default: 250)
|
33
|
-
def initialize(server, username, password, cacheScope = nil, monitor_updates =
|
33
|
+
def initialize(server, username, password, cacheScope = nil, monitor_updates = nil, preLoad = nil, debugUpdates = false, notifyMethod = nil, maxWait = 60, maxObjects = 250)
|
34
34
|
super(server, username, password, cacheScope)
|
35
35
|
|
36
|
-
|
36
|
+
monitor_updates = self.class.monitor_updates if monitor_updates.nil?
|
37
|
+
preLoad = self.class.pre_load if preLoad.nil?
|
37
38
|
|
38
39
|
@monitor_updates = monitor_updates
|
39
40
|
@updateMonitorReady = false
|
@@ -46,6 +47,25 @@ class MiqVim < MiqVimInventory
|
|
46
47
|
start_monitor_updates_thread(preLoad) if @monitor_updates
|
47
48
|
end
|
48
49
|
|
50
|
+
@@monitor_updates = false
|
51
|
+
@@pre_load = false
|
52
|
+
|
53
|
+
def self.monitor_updates
|
54
|
+
@@monitor_updates
|
55
|
+
end
|
56
|
+
|
57
|
+
def self.monitor_updates=(val)
|
58
|
+
@@monitor_updates = val
|
59
|
+
end
|
60
|
+
|
61
|
+
def self.pre_load
|
62
|
+
@@pre_load
|
63
|
+
end
|
64
|
+
|
65
|
+
def self.pre_load=(val)
|
66
|
+
@@pre_load = val
|
67
|
+
end
|
68
|
+
|
49
69
|
def getVimVm(path)
|
50
70
|
$vim_log.info "MiqVimMod.getVimVm: called"
|
51
71
|
miqVimVm = nil
|
@@ -366,7 +366,12 @@ class MiqVimInventory < MiqVimClientBase
|
|
366
366
|
#
|
367
367
|
# Hash snapshot info by create time.
|
368
368
|
#
|
369
|
-
|
369
|
+
# VMware API strips trailing '0's from the fractional seconds
|
370
|
+
# which causes the string to not match what .iso8601(6) returns
|
371
|
+
#
|
372
|
+
# Example 12:12:59.123Z instead of 12:12:59.123000Z
|
373
|
+
create_time = Time.parse(ssObj['createTime']).iso8601(6)
|
374
|
+
ssMorHash[create_time] = ssObj
|
370
375
|
|
371
376
|
#
|
372
377
|
# Ensure childSnapshotList is always present and always an array,
|
@@ -909,7 +909,7 @@ class MiqVimVm
|
|
909
909
|
scsi_controllers.sort_by { |s| s["key"].to_i }.each do |scsi_controller|
|
910
910
|
# Skip if all controller units are populated
|
911
911
|
# Bus has 16 units, controller takes up 1 unit itself
|
912
|
-
device = Array
|
912
|
+
device = Array(scsi_controller["device"])
|
913
913
|
next if device.count >= MAX_SCSI_DEVICES
|
914
914
|
|
915
915
|
# We've found the lowest scsi controller with an available unit
|
@@ -96,7 +96,8 @@ class VixDiskLib
|
|
96
96
|
|
97
97
|
my_env["LD_LIBRARY_PATH"] = (my_env["LD_LIBRARY_PATH"].to_s.split(':') << VIXDISKLIB_PATH).compact.join(":")
|
98
98
|
raise VixDiskLibError, "VixDiskLib.connect() failed: No $vim_log defined" unless $vim_log
|
99
|
-
my_env["LOG_FILE"] = $vim_log.logdev.filename.to_s
|
99
|
+
my_env["LOG_FILE"] = $vim_log.logdev.filename.to_s if $vim_log.logdev.kind_of?(Logger::LogDevice)
|
100
|
+
|
100
101
|
my_env
|
101
102
|
end
|
102
103
|
|
@@ -109,9 +110,12 @@ class VixDiskLib
|
|
109
110
|
proc_reader, @proc_writer = IO.pipe
|
110
111
|
|
111
112
|
server_cmd = "ruby #{SERVER_PATH}/VixDiskLibServer.rb"
|
113
|
+
log_target = my_env["LOG_FILE"] ? [my_env["LOG_FILE"], "a"] : $stdout
|
114
|
+
|
112
115
|
$vim_log.info "VixDiskLib.start_service: running command = #{server_cmd}"
|
116
|
+
|
113
117
|
pid = Kernel.spawn(my_env, server_cmd,
|
114
|
-
[:out, :err] =>
|
118
|
+
[:out, :err] => log_target,
|
115
119
|
:unsetenv_others => true,
|
116
120
|
3 => uri_writer,
|
117
121
|
4 => proc_reader)
|
metadata
CHANGED
@@ -1,35 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vmware_web_service
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ManageIQ Developers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 5.2.4
|
20
17
|
- - ">="
|
21
18
|
- !ruby/object:Gem::Version
|
22
19
|
version: 5.2.4.3
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '6.1'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- - "~>"
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: 5.2.4
|
30
27
|
- - ">="
|
31
28
|
- !ruby/object:Gem::Version
|
32
29
|
version: 5.2.4.3
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '6.1'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: ffi-vix_disk_lib
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -4460,7 +4460,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
4460
4460
|
- !ruby/object:Gem::Version
|
4461
4461
|
version: '0'
|
4462
4462
|
requirements: []
|
4463
|
-
rubygems_version: 3.
|
4463
|
+
rubygems_version: 3.2.5
|
4464
4464
|
signing_key:
|
4465
4465
|
specification_version: 4
|
4466
4466
|
summary: A ruby interface to Vmware Web Services SDK
|