vmware_web_service 1.0.0 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9a3fda957a5c3f40ee4cb771e4dfb68ffcabaec2b511c3088a9070de7c816e96
4
- data.tar.gz: 2f411a8da658bf1112f7f589909c10ada57265e9f9f230acb346dffcf7199b93
3
+ metadata.gz: 41d35593f9823b06bc56a23afab180ed7aafd1c3d96f28789328d0b22ba0cbc9
4
+ data.tar.gz: 3a019d2b5c772c7a3421a65d4004fac15730c7e05c951dca74ab078daa2646e6
5
5
  SHA512:
6
- metadata.gz: 72ffcec7bdefef9325d1f28f2fa80ea9ee75585d69523ad852adeec32a836bd505fa1fdfeb80572f52963762c63852970d100d1e6c313909eda1a3fece8cf618
7
- data.tar.gz: 3aaf49a620c290efc30a14171c052e8cccfc900a82c7d386b627a92a124c28cdfb4a705e86e4f483faac174bfe24a9a169bdc7e459692cda04f3954bac56be76
6
+ metadata.gz: 1fc01631af5d5201a5949fe905ef496e8de89d36483e550b6cc5f961ac93c68be684366c03484e6289417e26a2b40d2b1ff2e7c2ad194ab5d3a338983bfa5371
7
+ data.tar.gz: edab43df0d56713eb7b465cf92606963790eb0d58b30b73966c1dbc6bb10015816e0fc247c49ef9544971dc1cbcf62b5bdeea9977a06596240b9373a6db6c361
@@ -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
@@ -873,6 +873,34 @@ class MiqVimVm
873
873
  waitForTask(taskMor)
874
874
  end # def removeDiskByFile
875
875
 
876
+ def resizeDisk(backingFile, newSizeInKb)
877
+ disk = getDeviceByBacking(backingFile)
878
+ raise "resizeDisk: no virtual device associated with: #{backingFile}" unless disk
879
+ raise "resizeDisk: cannot reduce the size of a disk" unless newSizeInKb >= Integer(disk.capacityInKB)
880
+ $vim_log.debug "MiqVimVm::resizeDisk: backingFile = #{backingFile} current size = #{device.capacityInKB} newSize = #{newSizeInKb} KB" if $vim_log
881
+
882
+ vmConfigSpec = VimHash.new("VirtualMachineConfigSpec") do |vmcs|
883
+ vmcs.deviceChange = VimArray.new("ArrayOfVirtualDeviceConfigSpec") do |vmcs_vca|
884
+ vmcs_vca << VimHash.new("VirtualDeviceConfigSpec") do |vdcs|
885
+ vdcs.operation = VirtualDeviceConfigSpecOperation::Edit
886
+
887
+ vdcs.device = VimHash.new("VirtualDisk") do |vDev|
888
+ vDev.backing = disk.backing
889
+ vDev.capacityInKB = newSizeInKb
890
+ vDev.controllerKey = disk.controllerKey
891
+ vDev.key = disk.key
892
+ vDev.unitNumber = disk.unitNumber
893
+ end
894
+ end
895
+ end
896
+ end
897
+
898
+ $vim_log.info "MiqVimVm(#{@invObj.server}, #{@invObj.username}).resizeDisk: calling reconfigVM_Task" if $vim_log
899
+ taskMor = @invObj.reconfigVM_Task(@vmMor, vmConfigSpec)
900
+ $vim_log.info "MiqVimVm(#{@invObj.server}, #{@invObj.username}).resizeDisk: returned from reconfigVM_Task" if $vim_log
901
+ waitForTask(taskMor)
902
+ end
903
+
876
904
  #
877
905
  # Find a SCSI controller and
878
906
  # return its key and next available unit number.
@@ -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.0'.freeze
2
+ VERSION = '1.0.5'.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.0
4
+ version: 1.0.5
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-01-23 00:00:00.000000000 Z
11
+ date: 2020-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -92,14 +92,14 @@ dependencies:
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: 2.0.0
95
+ version: '2.0'
96
96
  type: :runtime
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: 2.0.0
102
+ version: '2.0'
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: bundler
105
105
  requirement: !ruby/object:Gem::Requirement
@@ -4062,6 +4062,7 @@ files:
4062
4062
  - lib/VMwareWebService/wsdl41/methods/VirtualEthernetCardNetworkBackingOption.yml
4063
4063
  - lib/VMwareWebService/wsdl41/methods/VirtualEthernetCardNotSupported.yml
4064
4064
  - lib/VMwareWebService/wsdl41/methods/VirtualEthernetCardNotSupportedFault.yml
4065
+ - lib/VMwareWebService/wsdl41/methods/VirtualEthernetCardOpaqueNetworkBackingInfo.yml
4065
4066
  - lib/VMwareWebService/wsdl41/methods/VirtualEthernetCardOption.yml
4066
4067
  - lib/VMwareWebService/wsdl41/methods/VirtualFloppy.yml
4067
4068
  - lib/VMwareWebService/wsdl41/methods/VirtualFloppyDeviceBackingInfo.yml
@@ -4469,7 +4470,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
4469
4470
  - !ruby/object:Gem::Version
4470
4471
  version: '0'
4471
4472
  requirements: []
4472
- rubygems_version: 3.1.2
4473
+ rubygems_version: 3.1.3
4473
4474
  signing_key:
4474
4475
  specification_version: 4
4475
4476
  summary: A ruby interface to Vmware Web Services SDK