vmware_web_service 1.0.7 → 2.0.3
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 +0 -4
- data/lib/VMwareWebService/MiqVimCustomizationSpecManager.rb +1 -1
- data/lib/VMwareWebService/MiqVimInventory.rb +6 -1
- data/lib/VMwareWebService/MiqVimVm.rb +1 -1
- data/lib/VMwareWebService/version.rb +1 -1
- metadata +11 -27
- data/lib/VMwareWebService/MiqPbmInventory.rb +0 -67
- data/lib/VMwareWebService/PbmService.rb +0 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e574683780708a47c577b3917ed87bf1557bc5cf74754a316779dbf22078e41
|
4
|
+
data.tar.gz: adaf9d2ceee9103c3f1f523c09741f851265b3a751b3bc4485f2d94f778c6dcf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8bbd90473121a7d542350232dca9525e33c836e84274e41574550e4dd2123b317d23345a73ff8cf5bc6e8f98b849358571288aef91a44d5fbc076a979c0ac7ca
|
7
|
+
data.tar.gz: c423d660ce2d62115449de15b130495794625344b58a1ba7d7d331155b62e4d29738a69c55991931050a0dba29ddbad318b367189edf990113ca5745c983fbe3
|
@@ -1,7 +1,6 @@
|
|
1
1
|
require 'sync'
|
2
2
|
|
3
3
|
require 'VMwareWebService/MiqVimInventory'
|
4
|
-
require 'VMwareWebService/MiqPbmInventory'
|
5
4
|
require 'VMwareWebService/MiqVimVm'
|
6
5
|
require 'VMwareWebService/MiqVimVdlMod'
|
7
6
|
require 'VMwareWebService/MiqVimFolder'
|
@@ -17,7 +16,6 @@ require 'VMwareWebService/MiqVimUpdate'
|
|
17
16
|
|
18
17
|
class MiqVim < MiqVimInventory
|
19
18
|
include MiqVimVdlConnectionMod
|
20
|
-
include MiqPbmInventory
|
21
19
|
include MiqVimUpdate
|
22
20
|
|
23
21
|
attr_reader :updateThread, :monitor_updates
|
@@ -35,8 +33,6 @@ class MiqVim < MiqVimInventory
|
|
35
33
|
def initialize(server, username, password, cacheScope = nil, monitor_updates = false, preLoad = false, debugUpdates = false, notifyMethod = nil, maxWait = 60, maxObjects = 250)
|
36
34
|
super(server, username, password, cacheScope)
|
37
35
|
|
38
|
-
pbm_initialize(self)
|
39
|
-
|
40
36
|
@monitor_updates = monitor_updates
|
41
37
|
@updateMonitorReady = false
|
42
38
|
@error = 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
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vmware_web_service
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ManageIQ Developers
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,20 +16,20 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 5.2.4.3
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
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
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: 5.2.4.3
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
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
|
@@ -92,20 +92,6 @@ dependencies:
|
|
92
92
|
- - "<"
|
93
93
|
- !ruby/object:Gem::Version
|
94
94
|
version: '5'
|
95
|
-
- !ruby/object:Gem::Dependency
|
96
|
-
name: rbvmomi
|
97
|
-
requirement: !ruby/object:Gem::Requirement
|
98
|
-
requirements:
|
99
|
-
- - "~>"
|
100
|
-
- !ruby/object:Gem::Version
|
101
|
-
version: '2.0'
|
102
|
-
type: :runtime
|
103
|
-
prerelease: false
|
104
|
-
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
requirements:
|
106
|
-
- - "~>"
|
107
|
-
- !ruby/object:Gem::Version
|
108
|
-
version: '2.0'
|
109
95
|
- !ruby/object:Gem::Dependency
|
110
96
|
name: bundler
|
111
97
|
requirement: !ruby/object:Gem::Requirement
|
@@ -205,7 +191,7 @@ dependencies:
|
|
205
191
|
- !ruby/object:Gem::Version
|
206
192
|
version: '0'
|
207
193
|
description: A ruby interface to Vmware Web Services SDK
|
208
|
-
email:
|
194
|
+
email:
|
209
195
|
executables: []
|
210
196
|
extensions: []
|
211
197
|
extra_rdoc_files: []
|
@@ -221,7 +207,6 @@ files:
|
|
221
207
|
- lib/VMwareWebService/MiqHostSnmpSystem.rb
|
222
208
|
- lib/VMwareWebService/MiqHostStorageSystem.rb
|
223
209
|
- lib/VMwareWebService/MiqHostVirtualNicManager.rb
|
224
|
-
- lib/VMwareWebService/MiqPbmInventory.rb
|
225
210
|
- lib/VMwareWebService/MiqVim.rb
|
226
211
|
- lib/VMwareWebService/MiqVimAlarmManager.rb
|
227
212
|
- lib/VMwareWebService/MiqVimBroker.rb
|
@@ -242,7 +227,6 @@ files:
|
|
242
227
|
- lib/VMwareWebService/MiqVimUpdate.rb
|
243
228
|
- lib/VMwareWebService/MiqVimVdlMod.rb
|
244
229
|
- lib/VMwareWebService/MiqVimVm.rb
|
245
|
-
- lib/VMwareWebService/PbmService.rb
|
246
230
|
- lib/VMwareWebService/VimConstants.rb
|
247
231
|
- lib/VMwareWebService/VimMappingRegistry.rb
|
248
232
|
- lib/VMwareWebService/VimPropMaps.rb
|
@@ -4461,7 +4445,7 @@ homepage: https://github.com/ManageIQ/vmware_web_service
|
|
4461
4445
|
licenses:
|
4462
4446
|
- Apache-2.0
|
4463
4447
|
metadata: {}
|
4464
|
-
post_install_message:
|
4448
|
+
post_install_message:
|
4465
4449
|
rdoc_options: []
|
4466
4450
|
require_paths:
|
4467
4451
|
- lib
|
@@ -4476,8 +4460,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
4476
4460
|
- !ruby/object:Gem::Version
|
4477
4461
|
version: '0'
|
4478
4462
|
requirements: []
|
4479
|
-
rubygems_version: 3.
|
4480
|
-
signing_key:
|
4463
|
+
rubygems_version: 3.2.0.rc.2
|
4464
|
+
signing_key:
|
4481
4465
|
specification_version: 4
|
4482
4466
|
summary: A ruby interface to Vmware Web Services SDK
|
4483
4467
|
test_files: []
|
@@ -1,67 +0,0 @@
|
|
1
|
-
require 'VMwareWebService/PbmService'
|
2
|
-
|
3
|
-
module MiqPbmInventory
|
4
|
-
def pbm_initialize(vim)
|
5
|
-
begin
|
6
|
-
# SPBM endpoint was introduced in vSphere Management SDK 5.5 and
|
7
|
-
# isn't supported by Hosts (only vCenters)
|
8
|
-
@pbm_svc = PbmService.new(vim) if apiVersion >= '5.5' && isVirtualCenter
|
9
|
-
rescue => err
|
10
|
-
$vim_log.warn("MiqPbmInventory: Failed to connect to SPBM endpoint: #{err}")
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
def pbmProfilesByUid(_selspec = nil)
|
15
|
-
profiles = {}
|
16
|
-
return profiles if @pbm_svc.nil?
|
17
|
-
|
18
|
-
begin
|
19
|
-
profile_ids = @pbm_svc.queryProfile
|
20
|
-
@pbm_svc.retrieveContent(profile_ids).to_a.each do |pbm_profile|
|
21
|
-
uid = pbm_profile.profileId.uniqueId
|
22
|
-
|
23
|
-
profiles[uid] = pbm_profile
|
24
|
-
end
|
25
|
-
rescue => err
|
26
|
-
$vim_log.warn("MiqPbmInventory: pbmProfilesByUid: #{err}")
|
27
|
-
end
|
28
|
-
|
29
|
-
profiles
|
30
|
-
end
|
31
|
-
|
32
|
-
def pbmQueryAssociatedEntity(profile_ids)
|
33
|
-
assoc_entities = {}
|
34
|
-
return assoc_entities if @pbm_svc.nil?
|
35
|
-
|
36
|
-
begin
|
37
|
-
profile_ids.each do |profile_id|
|
38
|
-
# If a string was passed in create a PbmProfileId object
|
39
|
-
profile_id = RbVmomi::PBM::PbmProfileId(:uniqueId => profile_id) if profile_id.kind_of?(String)
|
40
|
-
|
41
|
-
assoc_entities[profile_id.uniqueId] = @pbm_svc.queryAssociatedEntity(profile_id)
|
42
|
-
end
|
43
|
-
rescue => err
|
44
|
-
$vim_log.warn("MiqPbmInventory: pbmQueryAssociatedEntity: #{err}")
|
45
|
-
end
|
46
|
-
|
47
|
-
assoc_entities
|
48
|
-
end
|
49
|
-
|
50
|
-
def pbmQueryMatchingHub(profile_ids)
|
51
|
-
hubs = {}
|
52
|
-
return hubs if @pbm_svc.nil?
|
53
|
-
|
54
|
-
begin
|
55
|
-
profile_ids.each do |profile_id|
|
56
|
-
# If a string was passed in create a PbmProfileId object
|
57
|
-
profile_id = RbVmomi::PBM::PbmProfileId(:uniqueId => profile_id) if profile_id.kind_of?(String)
|
58
|
-
|
59
|
-
hubs[profile_id.uniqueId] = @pbm_svc.queryMatchingHub(profile_id)
|
60
|
-
end
|
61
|
-
rescue => err
|
62
|
-
$vim_log.warn("MiqPbmInventory: pbmQueryMatchingHub: #{err}")
|
63
|
-
end
|
64
|
-
|
65
|
-
hubs
|
66
|
-
end
|
67
|
-
end
|
@@ -1,36 +0,0 @@
|
|
1
|
-
require 'rbvmomi'
|
2
|
-
require 'rbvmomi/pbm'
|
3
|
-
|
4
|
-
PbmVimConnection = Struct.new(:host, :cookie)
|
5
|
-
|
6
|
-
class PbmService
|
7
|
-
def initialize(vim)
|
8
|
-
# RbVmomi::PBM#connect expects a RbVmomi::VIM object, use a struct
|
9
|
-
# to fake it out into using our vim Handsoap connection
|
10
|
-
pbm_vim_conn = PbmVimConnection.new(vim.server.dup, vim.session_cookie.dup)
|
11
|
-
|
12
|
-
@pbm = RbVmomi::PBM.connect(pbm_vim_conn, :insecure => true)
|
13
|
-
@sic = @pbm.serviceContent
|
14
|
-
end
|
15
|
-
|
16
|
-
def queryAssociatedEntity(profileId)
|
17
|
-
@sic.profileManager.PbmQueryAssociatedEntity(:profile => profileId)
|
18
|
-
end
|
19
|
-
|
20
|
-
def queryMatchingHub(profileId, hubsToSearch = nil)
|
21
|
-
@sic.placementSolver.PbmQueryMatchingHub(
|
22
|
-
:profile => profileId,
|
23
|
-
:hubsToSearch => hubsToSearch
|
24
|
-
)
|
25
|
-
end
|
26
|
-
|
27
|
-
def queryProfile
|
28
|
-
@sic.profileManager.PbmQueryProfile(
|
29
|
-
:resourceType => RbVmomi::PBM::PbmProfileResourceType(:resourceType => "STORAGE")
|
30
|
-
)
|
31
|
-
end
|
32
|
-
|
33
|
-
def retrieveContent(profileIds)
|
34
|
-
@sic.profileManager.PbmRetrieveContent(:profileIds => profileIds)
|
35
|
-
end
|
36
|
-
end
|