Class: VSphereCloud::SoapStub
- Inherits:
-
Object
- Object
- VSphereCloud::SoapStub
- Defined in:
- lib/cloud/vsphere/soap_stub.rb
Instance Method Summary collapse
- #create ⇒ Object
-
#initialize(host, soap_log) ⇒ SoapStub
constructor
A new instance of SoapStub.
Constructor Details
#initialize(host, soap_log) ⇒ SoapStub
Returns a new instance of SoapStub.
6 7 8 9 |
# File 'lib/cloud/vsphere/soap_stub.rb', line 6 def initialize(host, soap_log) @host = host @soap_log = soap_log end |
Instance Method Details
#create ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/cloud/vsphere/soap_stub.rb', line 11 def create http_client = HTTPClient.new case @soap_log when String log_file = File.open(@soap_log, 'w') log_file.sync = true http_client.debug_dev = log_file when IO, StringIO http_client.debug_dev = @soap_log end http_client.send_timeout = 14400 http_client.receive_timeout = 14400 http_client.connect_timeout = 30 http_client.ssl_config.verify_mode = OpenSSL::SSL::VERIFY_NONE VimSdk::Soap::StubAdapter.new(@host, 'vim.version.version6', http_client) end |