vmware_web_service 0.2.7 → 0.2.8

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
  SHA1:
3
- metadata.gz: e757beb9f6117a4dabb6aa234cbf5ecf8aa0de66
4
- data.tar.gz: 82a1cd97db7da5eed6c13e02aacead62272d476a
3
+ metadata.gz: 8992addbdeb936c4c9278c4ae6282a60896839a1
4
+ data.tar.gz: 9a165c8c1b71949c0ebb2519f3b21ae641e5c801
5
5
  SHA512:
6
- metadata.gz: 1434b93b8e9244f3b32f0f97b42e0af7d8f030be2fba53bdd7594d57a6dc9c7b6f25c5b8121b94ebcf488c3a6c3daaeee0bc691288bcd55ef556efdf3c667aa7
7
- data.tar.gz: 895a0cd2436ba2cd15ae53d495d4475c89733bf6ff3f8bc5386387aedbb5fca8622dafe211d2aa908d384cc367350f3d6f911a20be34201d5951ec364d993dad
6
+ metadata.gz: 54adfa77e4119530017d443ab3d51882498f2309ec06e2329be4ad411f0e593e7027593e8cfcfdc7c49fdd8550899a593f1e2484d4b9ad5903a2ef9b3c59dcb0
7
+ data.tar.gz: d82d1c6ee976f6410ca75c3865632e4e355860c5c7ba08dfbde866e3ab3b4a66e16984e56f9b15d042050bab50ee06d814a610984eb06d3e39137dde068f9f0f
@@ -20,7 +20,6 @@ module DMiqVimSync
20
20
  end # module DMiqVimSync
21
21
 
22
22
  class DRb::DRbMessage
23
- EXPECTED_MARSHAL_VERSION = [Marshal::MAJOR_VERSION, Marshal::MINOR_VERSION].freeze
24
23
  alias_method :dump_original, :dump
25
24
 
26
25
  #
@@ -33,33 +32,9 @@ class DRb::DRbMessage
33
32
  #
34
33
  obj.holdBrokerObj if obj.respond_to?(:holdBrokerObj)
35
34
 
36
- obj_to_dump = obj.kind_of?(MiqDrbReturn) ? obj.obj : obj
37
-
38
- result = dump_original(obj_to_dump, error)
39
-
40
- valid = true
41
- size = result[0..3].unpack("N")[0]
42
- if @load_limit < size
43
- $vim_log.error("DRb packet size too large: #{size}")
44
- valid = false
45
- end
46
-
47
- marshal_version = result[4, 2].unpack("C2")
48
- if marshal_version != EXPECTED_MARSHAL_VERSION
49
- $vim_log.error("Marshal version mismatch: expected: #{EXPECTED_MARSHAL_VERSION} got: #{marshal_version}")
50
- valid = false
51
- end
52
-
53
- unless valid
54
- $vim_log.error("object: #{obj.inspect}")
55
- $vim_log.error("buffer:\n#{result[0, 1024].hex_dump}")
56
- $vim_log.error("caller:\n#{caller.join("\n")}")
57
- end
58
-
59
- return result unless obj.kind_of?(MiqDrbReturn)
60
-
35
+ return(dump_original(obj, error)) unless obj.kind_of?(MiqDrbReturn)
61
36
  begin
62
- return result
37
+ return(dump_original(obj.obj, error))
63
38
  ensure
64
39
  if obj.lock && obj.lock.sync_locked?
65
40
  $vim_log.debug "DRb::DRbMessage.dump: UNLOCKING [#{Thread.current.object_id}] <#{obj.obj.object_id}>" if $vim_log.debug?
@@ -38,8 +38,6 @@ class MiqVimBroker
38
38
  require 'httpclient' # needed for exception classes
39
39
  require 'VMwareWebService/MiqVimDump'
40
40
  require 'VMwareWebService/MiqVimVdlMod'
41
- require 'VMwareWebService/MiqVimDrbDebug'
42
-
43
41
  #
44
42
  # Modify the meta-class of DRb::DRbObject
45
43
  # so we can alias class methods
@@ -9,7 +9,7 @@ class MiqFaultTolerantVim
9
9
 
10
10
  @erec = options[:ems]
11
11
  auth_type = options[:auth_type] || :ws
12
- ip = options[:ip] || @erec.address
12
+ ip = options[:ip] || @erec.hostname
13
13
  user = options[:user] || @erec.authentication_userid(auth_type)
14
14
  pass = options[:pass] || @erec.authentication_password(auth_type)
15
15
  @ems = [ip, user, pass]
@@ -1,3 +1,3 @@
1
1
  module VMwareWebService
2
- VERSION = '0.2.7'.freeze
2
+ VERSION = '0.2.8'.freeze
3
3
  end
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: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - ManageIQ Developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-27 00:00:00.000000000 Z
11
+ date: 2018-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -225,7 +225,6 @@ files:
225
225
  - lib/VMwareWebService/MiqVimCoreUpdater.rb
226
226
  - lib/VMwareWebService/MiqVimCustomizationSpecManager.rb
227
227
  - lib/VMwareWebService/MiqVimDataStore.rb
228
- - lib/VMwareWebService/MiqVimDrbDebug.rb
229
228
  - lib/VMwareWebService/MiqVimDump.rb
230
229
  - lib/VMwareWebService/MiqVimEventHistoryCollector.rb
231
230
  - lib/VMwareWebService/MiqVimEventMonitor.rb
@@ -1,38 +0,0 @@
1
- module DRb
2
- class DRbMessage
3
- def load(soc) # :nodoc:
4
- begin
5
- sz = soc.read(4) # sizeof (N)
6
- rescue
7
- raise(DRbConnError, $!.message, $!.backtrace)
8
- end
9
- raise(DRbConnError, 'connection closed') if sz.nil?
10
- raise(DRbConnError, 'premature header') if sz.size < 4
11
- sz = sz.unpack('N')[0]
12
- raise(DRbConnError, "too large packet #{sz}") if @load_limit < sz
13
- begin
14
- str = soc.read(sz)
15
- rescue
16
- raise(DRbConnError, $!.message, $!.backtrace)
17
- end
18
- raise(DRbConnError, 'connection closed') if str.nil?
19
- raise(DRbConnError, 'premature marshal format(can\'t read)') if str.size < sz
20
- DRb.mutex.synchronize do
21
- begin
22
- save = Thread.current[:drb_untaint]
23
- Thread.current[:drb_untaint] = []
24
- Marshal::load(str)
25
- rescue NameError, ArgumentError
26
- DRbUnknown.new($!, str)
27
- rescue TypeError => err
28
- raise TypeError, "#{err}\n#{str.hex_dump}"
29
- ensure
30
- Thread.current[:drb_untaint].each do |x|
31
- x.untaint
32
- end
33
- Thread.current[:drb_untaint] = save
34
- end
35
- end
36
- end
37
- end
38
- end