wbem 0.2.8 → 0.2.10
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 +7 -0
- data/lib/wbem/cimxml.rb +41 -7
- data/lib/wbem/version.rb +1 -1
- data/lib/wbem/wsman.rb +2 -2
- metadata +19 -28
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d14651109ee6b7c173d2709af7329cb0230f1ccd
|
4
|
+
data.tar.gz: 2685b66d3b6dc1524b3221345dde81d8f6d81723
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 81f5034b2f980c629b027e22eb83eadd0fe3fe3a8d9e89144ed9366c382086189cfd37a4a1c7b51e36d4b14cf4b185230acab5f5c6990e2a2a24c985f3e5be11
|
7
|
+
data.tar.gz: c4d3e7f353a0bc960a8aa5f450e61b5c198d20b096b8c3fb1cf545a7fdd50f86aeae42ad9c1789226f2ca76ec0e81e81b014ec2ad7ac1953933d74c7b22446d9
|
data/lib/wbem/cimxml.rb
CHANGED
@@ -31,17 +31,22 @@ private
|
|
31
31
|
# on error return nil and set @response to http response code
|
32
32
|
#
|
33
33
|
def _identify
|
34
|
-
# sfcb has /root/interop:CIM_ObjectManager
|
35
|
-
sfcb_op = objectpath "root/interop", "CIM_ObjectManager"
|
36
34
|
begin
|
37
|
-
|
38
|
-
|
39
|
-
|
35
|
+
product = nil
|
36
|
+
{ "sfcb" => [ "root/interop", "CIM_ObjectManager" ],
|
37
|
+
"pegasus" => [ "root/PG_Internal", "PG_ConfigSetting" ]
|
38
|
+
}.each do |cimom, op|
|
39
|
+
obj = objectpath *op
|
40
|
+
@client.instances(obj).each do |inst|
|
41
|
+
product = inst.Description || cimom
|
42
|
+
break
|
43
|
+
end
|
44
|
+
break if product
|
40
45
|
end
|
41
46
|
rescue Sfcc::Cim::ErrorInvalidClass, Sfcc::Cim::ErrorInvalidNamespace
|
42
|
-
# not sfcb
|
43
47
|
raise "Unknown CIMOM"
|
44
48
|
end
|
49
|
+
product
|
45
50
|
end
|
46
51
|
|
47
52
|
public
|
@@ -52,7 +57,7 @@ public
|
|
52
57
|
def initialize url, auth_scheme = nil
|
53
58
|
super url, auth_scheme
|
54
59
|
@client = Sfcc::Cim::Client.connect( { :uri => url, :verify => false } )
|
55
|
-
_identify
|
60
|
+
@product = _identify
|
56
61
|
end
|
57
62
|
|
58
63
|
#
|
@@ -156,5 +161,34 @@ public
|
|
156
161
|
ret = []
|
157
162
|
@client.get_instance(objectpath)
|
158
163
|
end
|
164
|
+
|
165
|
+
#
|
166
|
+
# get class
|
167
|
+
#
|
168
|
+
def get_class namespace, classname=nil
|
169
|
+
objectpath = case namespace
|
170
|
+
when Sfcc::Cim::ObjectPath
|
171
|
+
namespace
|
172
|
+
when Sfcc::Cim::Instance
|
173
|
+
Sfcc::Cim::ObjectPath.new(namespace.namespace, namespace.classname)
|
174
|
+
else
|
175
|
+
raise "Classname missing" unless classname
|
176
|
+
Sfcc::Cim::ObjectPath.new(namespace.to_s, classname.to_s)
|
177
|
+
end
|
178
|
+
@client.get_class objectpath
|
179
|
+
end
|
180
|
+
|
181
|
+
#
|
182
|
+
# Return associations for instance
|
183
|
+
#
|
184
|
+
def each_association( objectpath )
|
185
|
+
begin
|
186
|
+
@client.associators(objectpath).each do |assoc|
|
187
|
+
yield assoc
|
188
|
+
end
|
189
|
+
rescue Sfcc::Cim::ErrorInvalidClass, Sfcc::Cim::ErrorInvalidNamespace
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
159
193
|
end # class
|
160
194
|
end # module
|
data/lib/wbem/version.rb
CHANGED
data/lib/wbem/wsman.rb
CHANGED
@@ -371,8 +371,8 @@ public
|
|
371
371
|
def class_names op, deep_inheritance = false
|
372
372
|
@options.flags = Openwsman::FLAG_ENUMERATION_OPTIMIZATION
|
373
373
|
@options.max_elements = 999
|
374
|
-
namespace = (op.is_a? Sfcc::ObjectPath) ? op.namespace : op
|
375
|
-
classname = (op.is_a? Sfcc::ObjectPath) ? op.classname : nil
|
374
|
+
namespace = (op.is_a? Sfcc::Cim::ObjectPath) ? op.namespace : op
|
375
|
+
classname = (op.is_a? Sfcc::Cim::ObjectPath) ? op.classname : nil
|
376
376
|
case @product
|
377
377
|
when :openwsman
|
378
378
|
if @product_version < "2.2"
|
metadata
CHANGED
@@ -1,62 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wbem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
5
|
-
prerelease:
|
4
|
+
version: 0.2.10
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Klaus Kämpf
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2015-01-16 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: yard
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0.5'
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0.5'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: sfcc
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - ">="
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: 0.4.1
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - ">="
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: 0.4.1
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: openwsman
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - ">="
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: 2.3.2
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - ">="
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: 2.3.2
|
62
55
|
description: ruby-wbem allows to access a CIMOM transparently through CIM/XML or WS-Management
|
@@ -66,37 +59,35 @@ executables: []
|
|
66
59
|
extensions: []
|
67
60
|
extra_rdoc_files: []
|
68
61
|
files:
|
69
|
-
-
|
62
|
+
- CHANGELOG.rdoc
|
63
|
+
- README.rdoc
|
64
|
+
- lib/wbem.rb
|
70
65
|
- lib/wbem/cimxml.rb
|
66
|
+
- lib/wbem/version.rb
|
71
67
|
- lib/wbem/wbem.rb
|
72
68
|
- lib/wbem/wsman.rb
|
73
|
-
- lib/wbem.rb
|
74
|
-
- CHANGELOG.rdoc
|
75
|
-
- README.rdoc
|
76
69
|
homepage: http://www.github.com/kkaempf/ruby-wbem
|
77
70
|
licenses: []
|
78
|
-
|
79
|
-
|
71
|
+
metadata: {}
|
72
|
+
post_install_message: " ____\n/@ ~-.\n/ __ .- | remember to have fun! \n // //
|
73
|
+
\ @ \n\n"
|
80
74
|
rdoc_options: []
|
81
75
|
require_paths:
|
82
76
|
- lib
|
83
77
|
required_ruby_version: !ruby/object:Gem::Requirement
|
84
|
-
none: false
|
85
78
|
requirements:
|
86
|
-
- -
|
79
|
+
- - ">="
|
87
80
|
- !ruby/object:Gem::Version
|
88
81
|
version: '0'
|
89
82
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
|
-
none: false
|
91
83
|
requirements:
|
92
|
-
- -
|
84
|
+
- - ">="
|
93
85
|
- !ruby/object:Gem::Version
|
94
86
|
version: 1.3.6
|
95
87
|
requirements: []
|
96
88
|
rubyforge_project:
|
97
|
-
rubygems_version:
|
89
|
+
rubygems_version: 2.4.5
|
98
90
|
signing_key:
|
99
|
-
specification_version:
|
91
|
+
specification_version: 4
|
100
92
|
summary: WBEM client for Ruby based on ruby-sfcc and openwsman
|
101
93
|
test_files: []
|
102
|
-
has_rdoc:
|