vmware_web_service 3.1.0 → 3.3.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 903e34221b0f8be66012cd13740aa03567fd652e01cf6e0424e90e73222e728c
|
4
|
+
data.tar.gz: 9daffe3bb464a392e3340b731a308d8bc309727ec136d84e00de86e5ec1877b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3606032ce41641af7a53b768f3a7696e3a1cc1976bd365b94416ff508a6c22a935ff1906140a2e3d997def253d07f5677fd1116a735155c657713ab78f11bb6
|
7
|
+
data.tar.gz: b84d1466227b2f7b5bc433044f4f7dc61e3536ec0092505bb523271df3b2cc6edb262a2b498e9148e3e5adc6921d8b364956a3191c7bd4ab699e9183b30e87b1
|
@@ -100,7 +100,7 @@ class VixDiskLib
|
|
100
100
|
|
101
101
|
my_env["LD_LIBRARY_PATH"] = (my_env["LD_LIBRARY_PATH"].to_s.split(':') << VIXDISKLIB_PATH).compact.join(":")
|
102
102
|
raise VixDiskLibError, "VixDiskLib.connect() failed: No logger defined" unless logger
|
103
|
-
my_env["LOG_FILE"] = logger.logdev.filename.to_s if logger.logdev.kind_of?(Logger::LogDevice)
|
103
|
+
my_env["LOG_FILE"] = logger.logdev.filename.to_s if logger.try(:logdev).kind_of?(Logger::LogDevice)
|
104
104
|
|
105
105
|
my_env
|
106
106
|
end
|
@@ -2,27 +2,27 @@ require 'drb/drb'
|
|
2
2
|
require 'sync'
|
3
3
|
require 'ffi-vix_disk_lib/api_wrapper'
|
4
4
|
require 'VMwareWebService/VimTypes'
|
5
|
-
require 'VMwareWebService/
|
5
|
+
require 'VMwareWebService/VixDiskLib/VixDiskLib'
|
6
6
|
require 'time'
|
7
7
|
|
8
8
|
VixDiskLibApi = FFI::VixDiskLib::ApiWrapper
|
9
9
|
class VdlWrapper
|
10
10
|
extend FFI::VixDiskLib::ApiWrapper
|
11
11
|
include DRb::DRbUndumped
|
12
|
-
include VMwareWebService::Logging
|
13
12
|
|
14
13
|
@initialized = false
|
15
14
|
@server_disk_count = 0
|
16
15
|
@vddk = nil
|
16
|
+
@logger = Logger.new($stdout)
|
17
17
|
|
18
18
|
def self.server(server)
|
19
19
|
return unless @vddk.nil?
|
20
20
|
@vddk = server
|
21
21
|
end
|
22
22
|
|
23
|
-
@info_log = ->(s) { logger.info "VMware(VixDiskLib): #{s}" }
|
24
|
-
@warn_log = ->(s) { logger.warn "VMware(VixDiskLib): #{s}" }
|
25
|
-
@error_log = ->(s) { logger.error "VMware(VixDiskLib): #{s}" }
|
23
|
+
@info_log = ->(s) { @logger.info "VMware(VixDiskLib): #{s}" }
|
24
|
+
@warn_log = ->(s) { @logger.warn "VMware(VixDiskLib): #{s}" }
|
25
|
+
@error_log = ->(s) { @logger.error "VMware(VixDiskLib): #{s}" }
|
26
26
|
|
27
27
|
def self.init
|
28
28
|
return if @initialized
|
@@ -32,10 +32,10 @@ class VdlWrapper
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def self.dumpDisks(server_name)
|
35
|
-
logger.warn "*** Open VdlDisks for server #{server_name}"
|
35
|
+
@logger.warn "*** Open VdlDisks for server #{server_name}"
|
36
36
|
@connection.dumpDisks unless @connection.nil? || @connection.serverName != server_name
|
37
37
|
@vddk.running = true
|
38
|
-
logger.warn "*** Open VdlDisks end"
|
38
|
+
@logger.warn "*** Open VdlDisks end"
|
39
39
|
end
|
40
40
|
|
41
41
|
def self.inc_server_disk_count
|
@@ -51,7 +51,7 @@ class VdlWrapper
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def self.connect(connect_parms)
|
54
|
-
logger.info "VdlWrapper.connect: #{connect_parms[:server_name]}"
|
54
|
+
@logger.info "VdlWrapper.connect: #{connect_parms[:server_name]}"
|
55
55
|
raise VixDiskLibError, "VixDiskLib is not initialized" unless @initialized
|
56
56
|
raise VixDiskLibError, "Already connected to #{@connection.serverName}" if @connection
|
57
57
|
@connection = VdlConnection.new(connect_parms, @vddk)
|
@@ -59,7 +59,7 @@ class VdlWrapper
|
|
59
59
|
end
|
60
60
|
|
61
61
|
def self.__disconnect__(conn_obj)
|
62
|
-
logger.info "VdlWrapper.__disconnect__: #{conn_obj.serverName}"
|
62
|
+
@logger.info "VdlWrapper.__disconnect__: #{conn_obj.serverName}"
|
63
63
|
raise VixDiskLibError, "VixDiskLib is not initialized" unless @initialized
|
64
64
|
FFI::VixDiskLib::API.disconnect(conn_obj.vdl_connection)
|
65
65
|
@connection = nil
|
@@ -74,7 +74,7 @@ class VdlWrapper
|
|
74
74
|
# the DRb service (this process) to segfault during the exit sequence.
|
75
75
|
#
|
76
76
|
# super
|
77
|
-
logger.info "VixDiskLib has exited cleanly"
|
77
|
+
@logger.info "VixDiskLib has exited cleanly"
|
78
78
|
@vddk.running = true
|
79
79
|
@vddk.shutdown = true
|
80
80
|
@initialized = nil
|
@@ -84,13 +84,15 @@ end # class VixDiskLib
|
|
84
84
|
class VdlConnection
|
85
85
|
include DRb::DRbUndumped
|
86
86
|
|
87
|
-
attr_reader :vdl_connection, :serverName, :vddk
|
87
|
+
attr_reader :logger, :vdl_connection, :serverName, :vddk
|
88
88
|
|
89
89
|
MAX_DISK_WARN = 9
|
90
90
|
|
91
91
|
def initialize(connect_parms, vddk)
|
92
92
|
@serverName = connect_parms[:server_name]
|
93
|
-
logger
|
93
|
+
@logger = Logger.new($stdout)
|
94
|
+
|
95
|
+
@logger.info "VdlConnection.initialize: #{@serverName}"
|
94
96
|
@vdl_connection = VixDiskLibApi.connect(connect_parms)
|
95
97
|
@disks = []
|
96
98
|
@disk_lock = Sync.new
|
@@ -171,13 +173,13 @@ end # class VdlConnection
|
|
171
173
|
|
172
174
|
class VdlDisk
|
173
175
|
include DRb::DRbUndumped
|
174
|
-
include VMwareWebService::Logging
|
175
176
|
|
176
|
-
attr_reader :path, :flags, :handle, :sectorSize, :timeStamp, :info
|
177
|
+
attr_reader :logger, :path, :flags, :handle, :sectorSize, :timeStamp, :info
|
177
178
|
|
178
179
|
MIN_SECTORS_TO_CACHE = 64
|
179
180
|
|
180
181
|
def initialize(conn_obj, path, flags)
|
182
|
+
@logger = Logger.new($stdout)
|
181
183
|
@time_stamp = Time.now
|
182
184
|
logger.debug { "VdlDisk.new <#{object_id}>: opening #{path}" }
|
183
185
|
@connection = conn_obj
|
@@ -1,3 +1,6 @@
|
|
1
|
+
require "active_support"
|
2
|
+
require "active_support/concern"
|
3
|
+
|
1
4
|
module VMwareWebService
|
2
5
|
class << self
|
3
6
|
attr_writer :logger
|
@@ -9,8 +12,16 @@ module VMwareWebService
|
|
9
12
|
end
|
10
13
|
|
11
14
|
module Logging
|
15
|
+
extend ActiveSupport::Concern
|
16
|
+
|
17
|
+
class_methods do
|
18
|
+
def logger
|
19
|
+
VMwareWebService.logger
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
12
23
|
def logger
|
13
|
-
|
24
|
+
self.class.logger
|
14
25
|
end
|
15
26
|
end
|
16
27
|
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: 3.
|
4
|
+
version: 3.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ManageIQ Developers
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: 5.2.4.3
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '7.
|
22
|
+
version: '7.1'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: 5.2.4.3
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '7.
|
32
|
+
version: '7.1'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: ffi-vix_disk_lib
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -163,7 +163,7 @@ dependencies:
|
|
163
163
|
- !ruby/object:Gem::Version
|
164
164
|
version: 0.21.2
|
165
165
|
description: A ruby interface to Vmware Web Services SDK
|
166
|
-
email:
|
166
|
+
email:
|
167
167
|
executables: []
|
168
168
|
extensions: []
|
169
169
|
extra_rdoc_files: []
|
@@ -4412,7 +4412,7 @@ homepage: https://github.com/ManageIQ/vmware_web_service
|
|
4412
4412
|
licenses:
|
4413
4413
|
- Apache-2.0
|
4414
4414
|
metadata: {}
|
4415
|
-
post_install_message:
|
4415
|
+
post_install_message:
|
4416
4416
|
rdoc_options: []
|
4417
4417
|
require_paths:
|
4418
4418
|
- lib
|
@@ -4420,15 +4420,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
4420
4420
|
requirements:
|
4421
4421
|
- - ">="
|
4422
4422
|
- !ruby/object:Gem::Version
|
4423
|
-
version: 2.
|
4423
|
+
version: 2.6.0
|
4424
4424
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
4425
4425
|
requirements:
|
4426
4426
|
- - ">="
|
4427
4427
|
- !ruby/object:Gem::Version
|
4428
4428
|
version: '0'
|
4429
4429
|
requirements: []
|
4430
|
-
rubygems_version: 3.
|
4431
|
-
signing_key:
|
4430
|
+
rubygems_version: 3.4.20
|
4431
|
+
signing_key:
|
4432
4432
|
specification_version: 4
|
4433
4433
|
summary: A ruby interface to Vmware Web Services SDK
|
4434
4434
|
test_files: []
|