vmware_web_service 1.0.2 → 1.0.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7081f07a222fe10b6d6d3eb328c02f912f38de4f735f09e8b55c85ff7aae825d
4
- data.tar.gz: d0496ba2b93e3ead6f52c197e093108642196675d90436807c6b1ce929caecaa
3
+ metadata.gz: c405553b39bdd48a0d1addb0ab9851436a201adc836a23829177e68cab8169c3
4
+ data.tar.gz: c70a6f7137570372d6b6b4e05fd0c8723fe2e3ab0980d8651a03a874e9b9c2cf
5
5
  SHA512:
6
- metadata.gz: b013e0a843eff0f90eea71db7dc9e42bbe0ef67eead7b4cc4a7caa986e52c11f989725dac3d57ae756b6de480863817b917382e173aef46a2b8a8a8c710efeee
7
- data.tar.gz: 7940e3c8186e9e16fe460c2a8f54e5e662e32db1cbb9ca2012db0a65a22c33ec9894b1d24ba794407fd71c3658697b221d01a523608b654c4329051590bca3d6
6
+ metadata.gz: b733b1e46bc3a003a111b33bd03b8e57be539f632f15eae1cb86f293c3ff4df065610db71c8498e46f9b33ca6f2e73b7676aae4a22921964e0f88feec7038b63
7
+ data.tar.gz: 86cdf766a022fd1bfe677e5b9c353b2df629fdccd7ee2d443c518393c7a5e66863e248cf1fcd91536d17b41417e2df0da519c5b20db43556792ef82a3dfe1c91
@@ -34,7 +34,7 @@ class MiqVimCustomizationSpecManager
34
34
  specs = info
35
35
  return [] if specs.nil?
36
36
 
37
- specs = specs.dup.to_miq_a
37
+ specs = Array.wrap(specs.dup)
38
38
  specs.each { |s| s['spec'] = getCustomizationSpec(s['name'].to_s).spec }
39
39
  specs
40
40
  end
@@ -290,8 +290,8 @@ class MiqVimDataStore
290
290
  if block_given?
291
291
  open(fileUrl, options) { |ret| yield(ret) }
292
292
  else
293
- meta = {}; data = nil
294
- open(fileUrl, options) { |ret| data = ret.read; meta = ret.meta }
293
+ data = nil
294
+ open(fileUrl, options) { |ret| data = ret.read }
295
295
  return data
296
296
  end
297
297
  end
@@ -120,7 +120,7 @@ class MiqVimEventMonitor < MiqVimInventory
120
120
  next unless (vmObj = virtualMachinesByMor_locked[eventVmObj['vm']])
121
121
 
122
122
  eventVmObj['path'] = vmObj['summary']['config']['vmPathName']
123
- eventVmObj['uuid'] = vmObj['summary']['config']['uuid']
123
+ eventVmObj['uuid'] = vmObj['summary']['config']['uuid'].presence
124
124
 
125
125
  removeVirtualMachine(eventVmObj['vm']) if event['eventType'] == 'VmRemovedEvent'
126
126
  end
@@ -1138,18 +1138,18 @@ class MiqVimInventory < MiqVimClientBase
1138
1138
 
1139
1139
  $vim_log.info "MiqVimInventory.datacenters_locked: loading Datacenter cache for #{@connId}"
1140
1140
  begin
1141
- @cacheLock.sync_lock(:EX) if (unlock = @cacheLock.sync_shared?)
1141
+ @cacheLock.sync_lock(:EX) if (unlock = @cacheLock.sync_shared?)
1142
1142
 
1143
- ra = getMoPropMulti(inventoryHash_locked['Datacenter'], @propMap[:Datacenter][:props])
1143
+ ra = getMoPropMulti(inventoryHash_locked['Datacenter'], @propMap[:Datacenter][:props])
1144
1144
 
1145
- @datacenters = {}
1146
- @datacentersByMor = {}
1147
- ra.each do |dcObj|
1148
- addObjHash(:Datacenter, dcObj)
1145
+ @datacenters = {}
1146
+ @datacentersByMor = {}
1147
+ ra.each do |dcObj|
1148
+ addObjHash(:Datacenter, dcObj)
1149
+ end
1150
+ ensure
1151
+ @cacheLock.sync_unlock if unlock
1149
1152
  end
1150
- ensure
1151
- @cacheLock.sync_unlock if unlock
1152
- end
1153
1153
  $vim_log.info "MiqVimInventory.datacenters_locked: loaded Datacenter cache for #{@connId}"
1154
1154
 
1155
1155
  @datacenters
@@ -112,7 +112,7 @@ module MiqVimUpdate
112
112
  version = updates_version
113
113
  sleep @updateDelay if @updateDelay
114
114
  end # while @monitor
115
- rescue SignalException => err
115
+ rescue SignalException
116
116
  # Ignore signals, except TERM
117
117
  rescue => herr
118
118
  if herr.respond_to?(:reason) && herr.reason == 'The task was canceled by a user.'
@@ -87,14 +87,6 @@ class MiqVimVm
87
87
  # @invObj.releaseObj(self)
88
88
  end
89
89
 
90
- def vmMor
91
- (@vmMor)
92
- end
93
-
94
- def vmh
95
- (@vmh)
96
- end
97
-
98
90
  #######################
99
91
  # Power state methods.
100
92
  #######################
@@ -317,24 +309,24 @@ class MiqVimVm
317
309
  return(@snapshotInfo) if @snapshotInfo && !refresh
318
310
 
319
311
  begin
320
- @cacheLock.sync_lock(:EX) if (unlock = @cacheLock.sync_shared?)
321
-
322
- unless (ssp = @invObj.getMoProp_local(@vmMor, "snapshot"))
323
- @snapshotInfo = nil
324
- return(nil)
325
- end
312
+ @cacheLock.sync_lock(:EX) if (unlock = @cacheLock.sync_shared?)
326
313
 
327
- ssObj = ssp["snapshot"]
328
- ssMorHash = {}
329
- rsl = ssObj['rootSnapshotList']
330
- rsl = [rsl] unless rsl.kind_of?(Array)
331
- rsl.each { |rs| @invObj.snapshotFixup(rs, ssMorHash) }
332
- ssObj['ssMorHash'] = ssMorHash
333
- @snapshotInfo = ssObj
334
- ensure
335
- @cacheLock.sync_unlock if unlock
314
+ unless (ssp = @invObj.getMoProp_local(@vmMor, "snapshot"))
315
+ @snapshotInfo = nil
316
+ return(nil)
336
317
  end
337
318
 
319
+ ssObj = ssp["snapshot"]
320
+ ssMorHash = {}
321
+ rsl = ssObj['rootSnapshotList']
322
+ rsl = [rsl] unless rsl.kind_of?(Array)
323
+ rsl.each { |rs| @invObj.snapshotFixup(rs, ssMorHash) }
324
+ ssObj['ssMorHash'] = ssMorHash
325
+ @snapshotInfo = ssObj
326
+ ensure
327
+ @cacheLock.sync_unlock if unlock
328
+ end
329
+
338
330
  (@snapshotInfo)
339
331
  end # def snapshotInfo_locked
340
332
 
@@ -800,11 +792,11 @@ class MiqVimVm
800
792
  bck.writeThrough = "false"
801
793
  bck.fileName = backingFile
802
794
  begin
803
- dsn = @invObj.path2dsName(@dsPath)
804
- bck.datastore = @invObj.dsName2mo_local(dsn)
805
- rescue
806
- bck.datastore = nil
807
- end
795
+ dsn = @invObj.path2dsName(@dsPath)
796
+ bck.datastore = @invObj.dsName2mo_local(dsn)
797
+ rescue
798
+ bck.datastore = nil
799
+ end
808
800
  end
809
801
  end
810
802
  end
@@ -856,11 +848,11 @@ class MiqVimVm
856
848
  bck.writeThrough = "false"
857
849
  bck.fileName = backingFile
858
850
  begin
859
- dsn = @invObj.path2dsName(@dsPath)
860
- bck.datastore = @invObj.dsName2mo(dsn)
861
- rescue
862
- bck.datastore = nil
863
- end
851
+ dsn = @invObj.path2dsName(@dsPath)
852
+ bck.datastore = @invObj.dsName2mo(dsn)
853
+ rescue
854
+ bck.datastore = nil
855
+ end
864
856
  end unless deleteBacking
865
857
  end
866
858
  end
@@ -917,13 +909,14 @@ class MiqVimVm
917
909
  scsi_controllers.sort_by { |s| s["key"].to_i }.each do |scsi_controller|
918
910
  # Skip if all controller units are populated
919
911
  # Bus has 16 units, controller takes up 1 unit itself
920
- next if scsi_controller["device"].to_miq_a.count >= MAX_SCSI_DEVICES
912
+ device = Array.wrap(scsi_controller["device"])
913
+ next if device.count >= MAX_SCSI_DEVICES
921
914
 
922
915
  # We've found the lowest scsi controller with an available unit
923
916
  controller_key = scsi_controller["key"]
924
917
 
925
918
  # Get a list of disks on this controller
926
- disks = devices.select { |dev| scsi_controller["device"].to_miq_a.include?(dev["key"]) }
919
+ disks = devices.select { |dev| device.include?(dev["key"]) }
927
920
 
928
921
  # Get a list of all populated units on the controller
929
922
  populated_units = disks.collect { |disk| disk["unitNumber"].to_i }
@@ -1037,24 +1030,24 @@ class MiqVimVm
1037
1030
  end
1038
1031
 
1039
1032
  begin
1040
- @cacheLock.sync_lock(:EX) if (unlock = @cacheLock.sync_shared?)
1041
-
1042
- alarmManager = @sic.alarmManager
1043
- #
1044
- # Add disabled if VM is running.
1045
- #
1046
- if poweredOff?
1047
- aSpec = @miqAlarmSpecEnabled
1048
- else
1049
- aSpec = @miqAlarmSpecDisabled
1050
- end
1051
- $vim_log.info "MiqVimVm(#{@invObj.server}, #{@invObj.username}).addMiqAlarm_locked: calling createAlarm" if $vim_log
1052
- alarmMor = @invObj.createAlarm(alarmManager, @vmMor, aSpec)
1053
- $vim_log.info "MiqVimVm(#{@invObj.server}, #{@invObj.username}).addMiqAlarm_locked: returned from createAlarm" if $vim_log
1054
- @miqAlarmMor = alarmMor
1055
- ensure
1056
- @cacheLock.sync_unlock if unlock
1033
+ @cacheLock.sync_lock(:EX) if (unlock = @cacheLock.sync_shared?)
1034
+
1035
+ alarmManager = @sic.alarmManager
1036
+ #
1037
+ # Add disabled if VM is running.
1038
+ #
1039
+ if poweredOff?
1040
+ aSpec = @miqAlarmSpecEnabled
1041
+ else
1042
+ aSpec = @miqAlarmSpecDisabled
1057
1043
  end
1044
+ $vim_log.info "MiqVimVm(#{@invObj.server}, #{@invObj.username}).addMiqAlarm_locked: calling createAlarm" if $vim_log
1045
+ alarmMor = @invObj.createAlarm(alarmManager, @vmMor, aSpec)
1046
+ $vim_log.info "MiqVimVm(#{@invObj.server}, #{@invObj.username}).addMiqAlarm_locked: returned from createAlarm" if $vim_log
1047
+ @miqAlarmMor = alarmMor
1048
+ ensure
1049
+ @cacheLock.sync_unlock if unlock
1050
+ end
1058
1051
 
1059
1052
  (alarmMor)
1060
1053
  end # def addMiqAlarm_locked
@@ -27,10 +27,11 @@ end
27
27
  class VimHash < Hash
28
28
  include VimType
29
29
 
30
- undef_method(:id) if method_defined?(:id)
31
- undef_method(:type) if method_defined?(:type)
32
- undef_method(:size) if method_defined?(:size)
33
- undef_method(:key) if method_defined?(:key)
30
+ undef_method(:id) if method_defined?(:id)
31
+ undef_method(:type) if method_defined?(:type)
32
+ undef_method(:size) if method_defined?(:size)
33
+ undef_method(:key) if method_defined?(:key)
34
+ undef_method(:filter) if method_defined?(:filter)
34
35
 
35
36
  def initialize(xsiType = nil, vimType = nil)
36
37
  self.xsiType = xsiType
@@ -1,3 +1,3 @@
1
1
  module VMwareWebService
2
- VERSION = '1.0.2'.freeze
2
+ VERSION = '1.0.7'.freeze
3
3
  end
@@ -0,0 +1,11 @@
1
+ # THIS FILE WAS AUTOGENERATED. DO NOT MODIFY.
2
+ ---
3
+ dynamicType:
4
+ :type: :SOAP::SOAPString
5
+ dynamicProperty:
6
+ :type: :DynamicProperty
7
+ :isArray: true
8
+ opaqueNetworkId:
9
+ :type: :SOAP::SOAPString
10
+ opaqueNetworkType:
11
+ :type: :SOAP::SOAPString
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: 1.0.2
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - ManageIQ Developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-15 00:00:00.000000000 Z
11
+ date: 2020-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -76,16 +76,22 @@ dependencies:
76
76
  name: more_core_extensions
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
- - - "~>"
79
+ - - ">="
80
80
  - !ruby/object:Gem::Version
81
81
  version: '3.2'
82
+ - - "<"
83
+ - !ruby/object:Gem::Version
84
+ version: '5'
82
85
  type: :runtime
83
86
  prerelease: false
84
87
  version_requirements: !ruby/object:Gem::Requirement
85
88
  requirements:
86
- - - "~>"
89
+ - - ">="
87
90
  - !ruby/object:Gem::Version
88
91
  version: '3.2'
92
+ - - "<"
93
+ - !ruby/object:Gem::Version
94
+ version: '5'
89
95
  - !ruby/object:Gem::Dependency
90
96
  name: rbvmomi
91
97
  requirement: !ruby/object:Gem::Requirement
@@ -4062,6 +4068,7 @@ files:
4062
4068
  - lib/VMwareWebService/wsdl41/methods/VirtualEthernetCardNetworkBackingOption.yml
4063
4069
  - lib/VMwareWebService/wsdl41/methods/VirtualEthernetCardNotSupported.yml
4064
4070
  - lib/VMwareWebService/wsdl41/methods/VirtualEthernetCardNotSupportedFault.yml
4071
+ - lib/VMwareWebService/wsdl41/methods/VirtualEthernetCardOpaqueNetworkBackingInfo.yml
4065
4072
  - lib/VMwareWebService/wsdl41/methods/VirtualEthernetCardOption.yml
4066
4073
  - lib/VMwareWebService/wsdl41/methods/VirtualFloppy.yml
4067
4074
  - lib/VMwareWebService/wsdl41/methods/VirtualFloppyDeviceBackingInfo.yml
@@ -4469,7 +4476,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
4469
4476
  - !ruby/object:Gem::Version
4470
4477
  version: '0'
4471
4478
  requirements: []
4472
- rubygems_version: 3.1.2
4479
+ rubygems_version: 3.1.3
4473
4480
  signing_key:
4474
4481
  specification_version: 4
4475
4482
  summary: A ruby interface to Vmware Web Services SDK