lab-manager 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/lab_manager.rb +3 -29
- metadata +1 -1
data/lib/lab_manager.rb
CHANGED
@@ -2,40 +2,12 @@ require 'net/https'
|
|
2
2
|
require 'soap/wsdlDriver'
|
3
3
|
require 'soap/header/simplehandler'
|
4
4
|
require 'soap/element'
|
5
|
+
require 'soap/netHttpClient'
|
5
6
|
require 'xsd/datatypes'
|
6
7
|
require 'yaml'
|
7
8
|
|
8
|
-
require 'soap/netHttpClient'
|
9
|
-
|
10
9
|
require 'lab_manager/machine'
|
11
10
|
|
12
|
-
#
|
13
|
-
# Monkey Patch HTTP Client
|
14
|
-
# Sets SSL verify mode to NONE so that we can connect to an SSL server
|
15
|
-
# that does not have a trusted certificate.
|
16
|
-
#
|
17
|
-
# The 1.8.7 patch adds a new constructor.
|
18
|
-
# The 1.9.3 patch intercepts the existing constructor now that the class
|
19
|
-
# name has changed.
|
20
|
-
if RUBY_VERSION == "1.8.7"
|
21
|
-
class HTTPAccess2::Client
|
22
|
-
def initialize(*args)
|
23
|
-
super(args[0], args[1])
|
24
|
-
@session_manager.ssl_config.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
25
|
-
#@session_manager.debug_dev = STDOUT
|
26
|
-
end
|
27
|
-
end
|
28
|
-
else # > 1.8.7
|
29
|
-
class HTTPClient
|
30
|
-
alias_method :original_initialize, :initialize
|
31
|
-
def initialize(*args)
|
32
|
-
original_initialize(args[0], args[1])
|
33
|
-
@session_manager.ssl_config.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
34
|
-
#@session_manager.debug_dev = STDOUT
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
11
|
#
|
40
12
|
# Lab Manager API
|
41
13
|
#
|
@@ -159,6 +131,8 @@ class LabManager
|
|
159
131
|
proxy.generate_explicit_type = false # No datatype with request
|
160
132
|
proxy.headerhandler << LabManagerHeader.new(@organization, @workspace, @username, @password)
|
161
133
|
|
134
|
+
proxy.streamhandler.client.ssl_config.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
135
|
+
|
162
136
|
proxy
|
163
137
|
end
|
164
138
|
|