wbem 0.5.0 → 0.5.1

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
  SHA1:
3
- metadata.gz: a9c0a1ba0bac70d9aa7e910153bf46837a6dd305
4
- data.tar.gz: 232a5e958d2e5456ba907379228e0304a32ae82c
3
+ metadata.gz: 32a07af5b8a6d0f383c831b900d8a42a6a79535d
4
+ data.tar.gz: e5060c006998edafd96c9a2801dceccaaa0423ac
5
5
  SHA512:
6
- metadata.gz: 364d2f6af56cfc32aecf396f546aaa85461d0dbb1f123a5db9d9e2f6c2dfc722da657df5db9378d3f52e8b7ef092b71a8ebbe7406d90113f3739bce5d63539ff
7
- data.tar.gz: c4d5401ac945660197fa4cb0340da43086a638236d0828be2e3cb61010db996a793fc7d62604d59d678ab0f544437917d33e3d6a1bd7819768dbb0d17c55d332
6
+ metadata.gz: 3fa31ff3b75b88c3f3ed500a372d84025e9039b4bbacba741718b0561d0d47afdcdc6c689b409d8b43b2412262054a171be6abe8cd89b3a69ce8eece3df72f4e
7
+ data.tar.gz: c21bba848d1aa8ef5a9694f7d05666109359f8c996c7d46e6b7f38eb5d8514ae352a297f7aff863d8d1f61111cc34f1a3feb9dd623822cab3fcaf852bd3caf20
@@ -1,3 +1,3 @@
1
1
  module Wbem
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
@@ -16,7 +16,9 @@ require "cim"
16
16
  module Wbem
17
17
 
18
18
  class WsmanClient < WbemClient
19
- private
19
+ attr_reader :protocol_version, :product_vendor, :product_version
20
+
21
+ private
20
22
  #
21
23
  # create end point reference URI
22
24
  #
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
16
16
  s.required_rubygems_version = ">= 1.3.6"
17
17
  s.add_development_dependency("yard", [">= 0.5"])
18
18
  s.add_dependency("sfcc", [">= 0.4.1"])
19
- s.add_dependency("openwsman", [">= 2.4.14"])
19
+ s.add_dependency("openwsman", [">= 2.5.0"])
20
20
  s.add_dependency("cim", [">= 1.4.2"])
21
21
  s.add_dependency("mof", [">= 1.2.4"])
22
22
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wbem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Klaus Kämpf
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-19 00:00:00.000000000 Z
11
+ date: 2015-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yard
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 2.4.14
47
+ version: 2.5.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 2.4.14
54
+ version: 2.5.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: cim
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -106,7 +106,6 @@ files:
106
106
  - lib/wbem/wbem.rb
107
107
  - lib/wbem/wsman.rb
108
108
  - lib/wbem/wsman_instance.rb
109
- - samples/amt.rb
110
109
  - samples/enum.rb
111
110
  - samples/get.rb
112
111
  - tasks/clean.rake
@@ -1,129 +0,0 @@
1
- #
2
- # Managed iAMT
3
- # SOL (serial-over-lan)
4
- # https://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide/WordDocuments/enablingthesolinterface.htm
5
- # KVM (keyboard-video-moust)
6
- # https://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide/WordDocuments/kvmconfiguration.htm
7
- #
8
- # Written by Klaus Kämpf 2015
9
- #
10
- $:.unshift File.expand_path(File.join(File.dirname(__FILE__), "..", "lib"))
11
-
12
- require 'wbem'
13
-
14
- def usage msg = nil
15
- if msg
16
- STDERR.puts "** Err: #{msg}"
17
- STDERR.puts "amt [-d] {sol|kvm} {start|stop} <uri>"
18
- exit 1
19
- end
20
- end
21
-
22
- def connect url
23
- usage "<url> missing" unless url
24
- return Wbem::Client.connect url, :wsman
25
- end
26
-
27
- def enable_listener instance
28
- unless instance.ListenerEnabled
29
- instance.ListenerEnabled = true
30
- instance.put
31
- end
32
- end
33
-
34
- def sol_start client
35
- instance = client.get "AMT_RedirectionService", "Name" => "Intel(r) AMT Redirection Service"
36
- case instance.EnabledState
37
- when 32770
38
- puts "SOL is enabled and IDE-R is disabled"
39
- when 32771
40
- puts "SOL and IDE-R are enabled"
41
- when 32768
42
- # SOL and IDE-R are disabled
43
- puts "Enabling SOL"
44
- instance.RequestStateChange(32770)
45
- when 32769
46
- # SOL is disabled and IDE-R is enabled
47
- puts "Enabling SOL"
48
- instance.RequestStateChange(32771)
49
- end
50
- end
51
-
52
- def sol_stop client
53
- instance = client.get "AMT_RedirectionService", "Name" => "Intel(r) AMT Redirection Service"
54
- case instance.EnabledState
55
- when 32770
56
- # SOL is enabled and IDE-R is disabled
57
- puts "Disabling SOL"
58
- instance.RequestStateChange(32768)
59
- when 32771
60
- # SOL and IDE-R are enabled
61
- puts "Disabling SOL"
62
- instance.RequestStateChange(32769)
63
- when 32768
64
- puts "SOL and IDE-R are disabled"
65
- when 32769
66
- puts "SOL is disabled and IDE-R is enabled"
67
- end
68
- end
69
-
70
- def kvm_start client
71
- sap = client.get "CIM_KVMRedirectionSAP", "Name" => "KVM Redirection Service Access Point"
72
- unless sap.EnabledState
73
- data = client.get "IPS_KVMRedirectionSettingData", "InstanceID" => "Intel(r) KVM Redirection Settings"
74
- if data.EnabledByMEBx
75
- result = sap.RequestStateChange(2)
76
- if result == 0
77
- # enable listener
78
- else
79
- end
80
- end
81
- else
82
- puts "KVM already enabled"
83
- end
84
- end
85
-
86
- def kvm_stop client
87
- sap = client.get "CIM_KVMRedirectionSAP", "Name" => "KVM Redirection Service Access Point"
88
- if sap.EnabledState
89
- data = client.get "IPS_KVMRedirectionSettingData", "InstanceID" => "Intel(r) KVM Redirection Settings"
90
- if data.EnabledByMEBx
91
- result = sap.RequestStateChange(3)
92
- if result == 0
93
- # disable listener
94
- else
95
- end
96
- end
97
- else
98
- puts "KVM already disabled"
99
- end
100
- end
101
-
102
- # ---------------------------------------------------------
103
- target = nil
104
- loop do
105
- target = ARGV.shift
106
- break unless target && target[0,1] == '-'
107
- case target[1..-1]
108
- when 'd'
109
- Wbem.debug = 99
110
- else
111
- usage "Unknown option '#{target}'"
112
- end
113
- end
114
-
115
- cmd = ARGV.shift
116
- url = ARGV.shift
117
-
118
- case [target, cmd]
119
- when ["sol", "start"]
120
- sol_start( connect(url) )
121
- when ["sol", "stop"]
122
- sol_stop( connect(url) )
123
- when ["kvm", "start"]
124
- kvm_start( connect(url) )
125
- when ["kvm", "stop"]
126
- kvm_stop( connect(url) )
127
- else
128
- usage "Unknown command: #{target.inspect} #{cmd.inspect}"
129
- end