vmware_web_service 0.2.7 → 0.2.8
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8992addbdeb936c4c9278c4ae6282a60896839a1
|
4
|
+
data.tar.gz: 9a165c8c1b71949c0ebb2519f3b21ae641e5c801
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
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.
|
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]
|
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.
|
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-
|
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
|