amt 0.1.0
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/CHANGELOG.rdoc +3 -0
- data/Gemfile +2 -0
- data/MIT-LICENSE +22 -0
- data/README.rdoc +32 -0
- data/Rakefile +6 -0
- data/amt.gemspec +36 -0
- data/bin/amt +87 -0
- data/lib/amt.rb +25 -0
- data/lib/amt/kvm.rb +76 -0
- data/lib/amt/sol.rb +66 -0
- data/lib/amt/version.rb +3 -0
- data/tasks/clean.rake +2 -0
- data/tasks/doc.rake +15 -0
- data/tasks/test.rake +6 -0
- data/wbem/AMT_RedirectionService.rb +150 -0
- data/wbem/CIM_KVMRedirectionSAP.rb +112 -0
- data/wbem/IPS_KVMRedirectionSettingData.rb +79 -0
- metadata +95 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: af218d59d3784e23b83a798e1fdca0d71721b0ff
|
4
|
+
data.tar.gz: b4b1f98f5726a0a2cc334ac47b96f41950f24513
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 58ce00332a2eaa52b383be3256f9387e22052d8ec10356a0a96ca604c8d09f30e6ee71fd1ade549ff284f5b4f9ad67c2036157acfbcdca56621586151fe7e79e
|
7
|
+
data.tar.gz: 689703ec8b0283e57436a48e3cf01830fe4dc5762031f3bada002387d805830c99504ff7bfd2bff171b4b2ba3379a01a22b140665754a060abceb322b4ade9aa
|
data/CHANGELOG.rdoc
ADDED
data/Gemfile
ADDED
data/MIT-LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
|
2
|
+
Copyright (c) 2015 SUSE Linux LLC
|
3
|
+
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
5
|
+
a copy of this software and associated documentation files (the
|
6
|
+
"Software"), to deal in the Software without restriction, including
|
7
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
8
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
9
|
+
permit persons to whom the Software is furnished to do so, subject to
|
10
|
+
the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be
|
13
|
+
included in all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
17
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
19
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
20
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
21
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
|
+
|
data/README.rdoc
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
|
2
|
+
= ruby-amt
|
3
|
+
|
4
|
+
* http://github.com/kkaempf/ruby-amt
|
5
|
+
|
6
|
+
== Introduction
|
7
|
+
|
8
|
+
ruby-amt provides command line access to Intel AMT features.
|
9
|
+
|
10
|
+
== Requirements
|
11
|
+
|
12
|
+
ruby-wbem
|
13
|
+
|
14
|
+
== Quick Start
|
15
|
+
|
16
|
+
You can create a gem by running `rake build`.
|
17
|
+
|
18
|
+
See the testsuite for more examples. Or run rake docs.
|
19
|
+
|
20
|
+
== Links
|
21
|
+
|
22
|
+
=== Documentation
|
23
|
+
|
24
|
+
* http://rdoc.info/projects/kkaempf/ruby-amt
|
25
|
+
|
26
|
+
== License
|
27
|
+
|
28
|
+
MIT
|
29
|
+
|
30
|
+
== Authors
|
31
|
+
|
32
|
+
* Klaus Kämpf <kkaempf@suse.de>
|
data/Rakefile
ADDED
data/amt.gemspec
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
lib = File.expand_path('../lib/', __FILE__)
|
3
|
+
$:.unshift lib unless $:.include?(lib)
|
4
|
+
require "amt/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = "amt"
|
8
|
+
s.version = Amt::VERSION
|
9
|
+
s.platform = Gem::Platform::RUBY
|
10
|
+
s.authors = ["Klaus Kämpf"]
|
11
|
+
s.email = ["kkaempf@suse.de"]
|
12
|
+
s.homepage = "http://www.github.com/kkaempf/ruby-amt"
|
13
|
+
s.summary = "Command line interface to Intel AMT"
|
14
|
+
s.description = "ruby-amt gives you control over KVM (console
|
15
|
+
redirection via VNC) and SOL (serial-over-lan) function of Intel AMT
|
16
|
+
(part of Intel vPro)"
|
17
|
+
|
18
|
+
s.required_rubygems_version = ">= 1.3.6"
|
19
|
+
s.add_development_dependency("yard", [">= 0.5"])
|
20
|
+
s.add_dependency("wbem", [">= 0.5"])
|
21
|
+
|
22
|
+
s.files = `git ls-files`.split("\n")
|
23
|
+
s.files.reject! { |fn| fn == '.gitignore' }
|
24
|
+
s.require_path = 'lib'
|
25
|
+
s.extra_rdoc_files = Dir['README.rdoc', 'CHANGES.rdoc', 'MIT-LICENSE']
|
26
|
+
s.test_files = `git ls-files -- test/*`.split("\n")
|
27
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
28
|
+
|
29
|
+
s.post_install_message = <<-POST_INSTALL_MESSAGE
|
30
|
+
____
|
31
|
+
/@ ~-.
|
32
|
+
\/ __ .- | remember to have fun!
|
33
|
+
// // @
|
34
|
+
|
35
|
+
POST_INSTALL_MESSAGE
|
36
|
+
end
|
data/bin/amt
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
#
|
3
|
+
# Managed iAMT
|
4
|
+
# SOL (serial-over-lan)
|
5
|
+
# https://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide/WordDocuments/enablingthesolinterface.htm
|
6
|
+
# KVM (keyboard-video-moust)
|
7
|
+
# https://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide/WordDocuments/kvmconfiguration.htm
|
8
|
+
#
|
9
|
+
# Written by Klaus Kämpf 2015
|
10
|
+
#
|
11
|
+
$:.unshift File.expand_path(File.join(File.dirname(__FILE__), "..", "lib"))
|
12
|
+
|
13
|
+
require 'amt'
|
14
|
+
require 'uri'
|
15
|
+
|
16
|
+
def usage msg = nil
|
17
|
+
if msg
|
18
|
+
STDERR.puts "** Err: #{msg}"
|
19
|
+
end
|
20
|
+
STDERR.puts "amt [-d] <target> <command> <uri>"
|
21
|
+
STDERR.puts "\t<target>: sol|kvm"
|
22
|
+
STDERR.puts "\t<command>: start|status|stop"
|
23
|
+
STDERR.puts "Example\n\tamt sol status http://user:pass@amt.host.org"
|
24
|
+
exit (msg)?1:0
|
25
|
+
end
|
26
|
+
|
27
|
+
|
28
|
+
# ---------------------------------------------------------
|
29
|
+
|
30
|
+
usage if ARGV.empty?
|
31
|
+
|
32
|
+
|
33
|
+
debug_level = 0
|
34
|
+
target = nil
|
35
|
+
loop do
|
36
|
+
target = ARGV.shift
|
37
|
+
break unless target && target[0,1] == '-'
|
38
|
+
case target[1..-1]
|
39
|
+
when 'd'
|
40
|
+
Amt.debug = 99 if debug_level == 0
|
41
|
+
Wbem.debug = 99 if debug_level == 1 # -d -d enables Wbem debugging
|
42
|
+
debug_level += 1
|
43
|
+
when 'h', '-help'
|
44
|
+
usage
|
45
|
+
else
|
46
|
+
usage "Unknown option '#{target}'"
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
cmd = ARGV.shift
|
51
|
+
usage "<command> parameter missing" unless cmd
|
52
|
+
url = ARGV.shift
|
53
|
+
usage "<uri> parameter missing" unless url
|
54
|
+
|
55
|
+
# test url
|
56
|
+
uri = nil
|
57
|
+
begin
|
58
|
+
uri = URI.parse url
|
59
|
+
uri.port = 16992 unless url =~ /:\d+/
|
60
|
+
uri.path ||= "/wsman"
|
61
|
+
rescue Exception => e
|
62
|
+
usage "<uri> parameter is not a valid URL: #{url} (#{e})"
|
63
|
+
end
|
64
|
+
|
65
|
+
# test target
|
66
|
+
klass = nil
|
67
|
+
begin
|
68
|
+
klass = Amt.const_get(target.capitalize)
|
69
|
+
rescue
|
70
|
+
end
|
71
|
+
usage "<target> parameter invalid" unless klass
|
72
|
+
|
73
|
+
client = Wbem::Client.connect uri, :wsman
|
74
|
+
|
75
|
+
object = klass.new client
|
76
|
+
|
77
|
+
# test command
|
78
|
+
|
79
|
+
begin
|
80
|
+
res = object.send cmd.to_sym
|
81
|
+
STDERR.puts "#{target} #{cmd} failed" unless res == 0
|
82
|
+
rescue NoMethodError => e
|
83
|
+
STDERR.puts e if Amt.debug
|
84
|
+
usage "Command '#{cmd}' not recognized in #{object}"
|
85
|
+
rescue Exception => e
|
86
|
+
usage "Command '#{cmd}' failed: #{e}"
|
87
|
+
end
|
data/lib/amt.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
#
|
2
|
+
# amt.rb
|
3
|
+
#
|
4
|
+
# A command line client to access Intel AMT
|
5
|
+
#
|
6
|
+
# Copyright (c) 2015, SUSE Linux LLC
|
7
|
+
# Written by Klaus Kaempf <kkaempf@suse.de>
|
8
|
+
#
|
9
|
+
# Licensed under the MIT license
|
10
|
+
#
|
11
|
+
require 'rubygems'
|
12
|
+
require 'wbem'
|
13
|
+
|
14
|
+
module Amt
|
15
|
+
require "amt/version"
|
16
|
+
require "amt/kvm"
|
17
|
+
require "amt/sol"
|
18
|
+
@@debug = nil
|
19
|
+
def Amt.debug
|
20
|
+
@@debug
|
21
|
+
end
|
22
|
+
def Amt.debug= level
|
23
|
+
@@debug = (level == 0) ? nil : level
|
24
|
+
end
|
25
|
+
end # Module
|
data/lib/amt/kvm.rb
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
module Amt
|
2
|
+
class Kvm
|
3
|
+
def initialize client
|
4
|
+
@client = client
|
5
|
+
@sap = @client.get "CIM_KVMRedirectionSAP", "Name" => "KVM Redirection Service Access Point"
|
6
|
+
end
|
7
|
+
|
8
|
+
# https://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide/WordDocuments/enablingkvm.htm
|
9
|
+
def start
|
10
|
+
res = 0
|
11
|
+
unless @sap.EnabledState == 2
|
12
|
+
puts "enabling KVM" if Amt.debug
|
13
|
+
data = @client.get "IPS_KVMRedirectionSettingData", "InstanceID" => "Intel(r) KVM Redirection Settings"
|
14
|
+
if data.EnabledByMEBx
|
15
|
+
unless data.Is5900PortEnabled
|
16
|
+
data.Is5900PortEnabled = true
|
17
|
+
data.RFBPassword = "P@ssw0rd"
|
18
|
+
data.put!
|
19
|
+
end
|
20
|
+
res = @sap.RequestStateChange(2)
|
21
|
+
if res == 0
|
22
|
+
# https://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide/WordDocuments/changethelistenerenabledsetting.htm
|
23
|
+
listener = @client.get "AMT_RedirectionService", "Name" => "Intel(r) AMT Redirection Service"
|
24
|
+
unless listener.ListenerEnabled
|
25
|
+
listener.ListenerEnabled = true
|
26
|
+
listener.put!
|
27
|
+
end
|
28
|
+
else
|
29
|
+
STDERR.puts "RequestStateChange(2) failed"
|
30
|
+
end
|
31
|
+
else
|
32
|
+
puts "Please enable AMT in the BIOS"
|
33
|
+
end
|
34
|
+
else
|
35
|
+
puts "KVM enabled" if Amt.debug
|
36
|
+
end
|
37
|
+
res
|
38
|
+
end
|
39
|
+
|
40
|
+
def status
|
41
|
+
case @sap.EnabledState
|
42
|
+
when 2
|
43
|
+
puts "KVM enabled"
|
44
|
+
data = @client.get "IPS_KVMRedirectionSettingData", "InstanceID" => "Intel(r) KVM Redirection Settings"
|
45
|
+
if data.Is5900PortEnabled
|
46
|
+
puts "Listening on port 5900"
|
47
|
+
else
|
48
|
+
puts "Listening on port 16993(non-TLS)/16994(TLS)"
|
49
|
+
end
|
50
|
+
when 3
|
51
|
+
puts "KVM disabled"
|
52
|
+
when 4
|
53
|
+
puts "KVM shutting down"
|
54
|
+
when 6
|
55
|
+
puts "KVM enabled but offline"
|
56
|
+
when 10
|
57
|
+
puts "KVM starting up"
|
58
|
+
else
|
59
|
+
puts "Unknown state #{@sap.EnabledState}"
|
60
|
+
end
|
61
|
+
0
|
62
|
+
end
|
63
|
+
|
64
|
+
def stop
|
65
|
+
res = 0
|
66
|
+
unless @sap.EnabledState == 3
|
67
|
+
puts "disabling KVM" if Amt.debug
|
68
|
+
data = @client.get "IPS_KVMRedirectionSettingData", "InstanceID" => "Intel(r) KVM Redirection Settings"
|
69
|
+
res = @sap.RequestStateChange(3)
|
70
|
+
else
|
71
|
+
puts "KVM disabled" if Amt.debug
|
72
|
+
end
|
73
|
+
res
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
data/lib/amt/sol.rb
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
module Amt
|
2
|
+
class Sol
|
3
|
+
def initialize client
|
4
|
+
@client = client
|
5
|
+
@instance = @client.get "AMT_RedirectionService", "Name" => "Intel(r) AMT Redirection Service"
|
6
|
+
end
|
7
|
+
|
8
|
+
def start
|
9
|
+
res = 0
|
10
|
+
case @instance.EnabledState
|
11
|
+
when 32770
|
12
|
+
puts "SOL is enabled and IDE-R is disabled" if Amt.debug
|
13
|
+
when 32771
|
14
|
+
puts "SOL and IDE-R are enabled" if Amt.debug
|
15
|
+
when 32768
|
16
|
+
# SOL and IDE-R are disabled
|
17
|
+
puts "Enabling SOL" if Amt.debug
|
18
|
+
res = @instance.RequestStateChange(32770)
|
19
|
+
when 32769
|
20
|
+
# SOL is disabled and IDE-R is enabled
|
21
|
+
puts "Enabling SOL" if Amt.debug
|
22
|
+
res = @instance.RequestStateChange(32771)
|
23
|
+
else
|
24
|
+
puts "unknown #{@instance.EnabledState}"
|
25
|
+
res = 1
|
26
|
+
end
|
27
|
+
res
|
28
|
+
end
|
29
|
+
|
30
|
+
def status
|
31
|
+
res = 0
|
32
|
+
case @instance.EnabledState
|
33
|
+
when 32770, 32771 # SOL is enabled and IDE-R is disabled/enabled
|
34
|
+
puts "SOL is enabled"
|
35
|
+
when 32768, 32769 # SOL is disabled and IDE-R is disabled/enabled
|
36
|
+
puts "SOL is disabled"
|
37
|
+
else
|
38
|
+
puts "unknown #{@instance.EnabledState}"
|
39
|
+
res = 1
|
40
|
+
end
|
41
|
+
res
|
42
|
+
end
|
43
|
+
|
44
|
+
def stop
|
45
|
+
res = 0
|
46
|
+
case @instance.EnabledState
|
47
|
+
when 32770
|
48
|
+
# SOL is enabled and IDE-R is disabled
|
49
|
+
puts "Disabling SOL" if Amt.debug
|
50
|
+
res = @instance.RequestStateChange(32768)
|
51
|
+
when 32771
|
52
|
+
# SOL and IDE-R are enabled
|
53
|
+
puts "Disabling SOL" if Amt.debug
|
54
|
+
res = @instance.RequestStateChange(32769)
|
55
|
+
when 32768
|
56
|
+
puts "SOL and IDE-R are disabled" if Amt.debug
|
57
|
+
when 32769
|
58
|
+
puts "SOL is disabled and IDE-R is enabled" if Amt.debug
|
59
|
+
else
|
60
|
+
puts "unknown #{@instance.EnabledState}"
|
61
|
+
res = 1
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
data/lib/amt/version.rb
ADDED
data/tasks/clean.rake
ADDED
data/tasks/doc.rake
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
begin
|
2
|
+
require 'yard'
|
3
|
+
YARD::Rake::YardocTask.new(:doc) do |t|
|
4
|
+
t.files = ['lib/**/*.rb']
|
5
|
+
t.options = ['--no-private']
|
6
|
+
end
|
7
|
+
rescue LoadError
|
8
|
+
STDERR.puts "Install yard if you want prettier docs"
|
9
|
+
require 'rdoc/task'
|
10
|
+
require 'wbem/version'
|
11
|
+
Rake::RDocTask.new(:doc) do |rdoc|
|
12
|
+
rdoc.rdoc_dir = "doc"
|
13
|
+
rdoc.title = "wbem #{Wbem::VERSION}"
|
14
|
+
end
|
15
|
+
end
|
data/tasks/test.rake
ADDED
@@ -0,0 +1,150 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
# Class information for AMT_RedirectionService
|
4
|
+
# Generated by 'wbem' for use with ruby-wbem
|
5
|
+
|
6
|
+
require 'rubygems'
|
7
|
+
require 'cim'
|
8
|
+
require 'wbem'
|
9
|
+
|
10
|
+
module Wbem
|
11
|
+
|
12
|
+
class AMT_RedirectionService < Wbem::Instance
|
13
|
+
|
14
|
+
|
15
|
+
TYPEMAP = {
|
16
|
+
|
17
|
+
# AMT_RedirectionService.ListenerEnabled
|
18
|
+
"ListenerEnabled" => :boolean,
|
19
|
+
|
20
|
+
# AMT_RedirectionService.AccessLog
|
21
|
+
"AccessLog" => :string,
|
22
|
+
|
23
|
+
# AMT_RedirectionService.EnabledState
|
24
|
+
"EnabledState" => :uint16,
|
25
|
+
|
26
|
+
# AMT_RedirectionService.RequestStateChange()
|
27
|
+
"RequestStateChange" => [ :uint32,
|
28
|
+
[ "RequestedState", :uint16, :in ],
|
29
|
+
[ "Job", :class, :out ],
|
30
|
+
[ "TimeoutPeriod", :dateTime, :in ],
|
31
|
+
],
|
32
|
+
|
33
|
+
# AMT_RedirectionService.TerminateSession()
|
34
|
+
"TerminateSession" => [ :uint32,
|
35
|
+
[ "SessionType", :uint32, :in ],
|
36
|
+
],
|
37
|
+
|
38
|
+
# CIM_Service.SystemCreationClassName
|
39
|
+
"SystemCreationClassName" => :string,
|
40
|
+
|
41
|
+
# CIM_Service.SystemName
|
42
|
+
"SystemName" => :string,
|
43
|
+
|
44
|
+
# CIM_Service.CreationClassName
|
45
|
+
"CreationClassName" => :string,
|
46
|
+
|
47
|
+
# CIM_Service.Name
|
48
|
+
"Name" => :string,
|
49
|
+
|
50
|
+
# CIM_Service.PrimaryOwnerName
|
51
|
+
"PrimaryOwnerName" => :string,
|
52
|
+
|
53
|
+
# CIM_Service.PrimaryOwnerContact
|
54
|
+
"PrimaryOwnerContact" => :string,
|
55
|
+
|
56
|
+
# CIM_Service.StartMode
|
57
|
+
"StartMode" => :string,
|
58
|
+
|
59
|
+
# CIM_Service.Started
|
60
|
+
"Started" => :boolean,
|
61
|
+
|
62
|
+
# CIM_Service.LoSID
|
63
|
+
"LoSID" => :string,
|
64
|
+
|
65
|
+
# CIM_Service.LoSOrgID
|
66
|
+
"LoSOrgID" => :string,
|
67
|
+
|
68
|
+
# CIM_Service.StartService()
|
69
|
+
"StartService" => [ :uint32,
|
70
|
+
],
|
71
|
+
|
72
|
+
# CIM_Service.StopService()
|
73
|
+
"StopService" => [ :uint32,
|
74
|
+
],
|
75
|
+
|
76
|
+
# CIM_Service.ChangeAffectedElementsAssignedSequence()
|
77
|
+
"ChangeAffectedElementsAssignedSequence" => [ :uint32,
|
78
|
+
[ "ManagedElements", :class, :in ],
|
79
|
+
[ "AssignedSequence", :uint16, :in ],
|
80
|
+
[ "Job", :class, :out ],
|
81
|
+
],
|
82
|
+
|
83
|
+
# CIM_EnabledLogicalElement.OtherEnabledState
|
84
|
+
"OtherEnabledState" => :string,
|
85
|
+
|
86
|
+
# CIM_EnabledLogicalElement.RequestedState
|
87
|
+
"RequestedState" => :uint16,
|
88
|
+
|
89
|
+
# CIM_EnabledLogicalElement.EnabledDefault
|
90
|
+
"EnabledDefault" => :uint16,
|
91
|
+
|
92
|
+
# CIM_EnabledLogicalElement.TimeOfLastStateChange
|
93
|
+
"TimeOfLastStateChange" => :dateTime,
|
94
|
+
|
95
|
+
# CIM_EnabledLogicalElement.AvailableRequestedStates
|
96
|
+
"AvailableRequestedStates" => :uint16,
|
97
|
+
|
98
|
+
# CIM_EnabledLogicalElement.TransitioningToState
|
99
|
+
"TransitioningToState" => :uint16,
|
100
|
+
|
101
|
+
# CIM_ManagedSystemElement.InstallDate
|
102
|
+
"InstallDate" => :dateTime,
|
103
|
+
|
104
|
+
# CIM_ManagedSystemElement.OperationalStatus
|
105
|
+
"OperationalStatus" => :uint16,
|
106
|
+
|
107
|
+
# CIM_ManagedSystemElement.StatusDescriptions
|
108
|
+
"StatusDescriptions" => :string,
|
109
|
+
|
110
|
+
# CIM_ManagedSystemElement.Status
|
111
|
+
"Status" => :string,
|
112
|
+
|
113
|
+
# CIM_ManagedSystemElement.HealthState
|
114
|
+
"HealthState" => :uint16,
|
115
|
+
|
116
|
+
# CIM_ManagedSystemElement.CommunicationStatus
|
117
|
+
"CommunicationStatus" => :uint16,
|
118
|
+
|
119
|
+
# CIM_ManagedSystemElement.DetailedStatus
|
120
|
+
"DetailedStatus" => :uint16,
|
121
|
+
|
122
|
+
# CIM_ManagedSystemElement.OperatingStatus
|
123
|
+
"OperatingStatus" => :uint16,
|
124
|
+
|
125
|
+
# CIM_ManagedSystemElement.PrimaryStatus
|
126
|
+
"PrimaryStatus" => :uint16,
|
127
|
+
|
128
|
+
# CIM_ManagedElement.InstanceID
|
129
|
+
"InstanceID" => :string,
|
130
|
+
|
131
|
+
# CIM_ManagedElement.Caption
|
132
|
+
"Caption" => :string,
|
133
|
+
|
134
|
+
# CIM_ManagedElement.Description
|
135
|
+
"Description" => :string,
|
136
|
+
|
137
|
+
# CIM_ManagedElement.ElementName
|
138
|
+
"ElementName" => :string,
|
139
|
+
|
140
|
+
# CIM_ManagedElement.Generation
|
141
|
+
"Generation" => :uint64,
|
142
|
+
|
143
|
+
}
|
144
|
+
|
145
|
+
def _typemap
|
146
|
+
TYPEMAP
|
147
|
+
end
|
148
|
+
|
149
|
+
end # class
|
150
|
+
end # module
|
@@ -0,0 +1,112 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
# Class information for CIM_KVMRedirectionSAP
|
4
|
+
# Generated by 'wbem' for use with ruby-wbem
|
5
|
+
|
6
|
+
require 'rubygems'
|
7
|
+
require 'cim'
|
8
|
+
require 'wbem'
|
9
|
+
|
10
|
+
module Wbem
|
11
|
+
|
12
|
+
class CIM_KVMRedirectionSAP < Wbem::Instance
|
13
|
+
|
14
|
+
|
15
|
+
TYPEMAP = {
|
16
|
+
|
17
|
+
# CIM_KVMRedirectionSAP.KVMProtocol
|
18
|
+
"KVMProtocol" => :uint16,
|
19
|
+
|
20
|
+
# CIM_KVMRedirectionSAP.OtherKVMProtocol
|
21
|
+
"OtherKVMProtocol" => :string,
|
22
|
+
|
23
|
+
# CIM_ServiceAccessPoint.SystemCreationClassName
|
24
|
+
"SystemCreationClassName" => :string,
|
25
|
+
|
26
|
+
# CIM_ServiceAccessPoint.SystemName
|
27
|
+
"SystemName" => :string,
|
28
|
+
|
29
|
+
# CIM_ServiceAccessPoint.CreationClassName
|
30
|
+
"CreationClassName" => :string,
|
31
|
+
|
32
|
+
# CIM_ServiceAccessPoint.Name
|
33
|
+
"Name" => :string,
|
34
|
+
|
35
|
+
# CIM_EnabledLogicalElement.EnabledState
|
36
|
+
"EnabledState" => :uint16,
|
37
|
+
|
38
|
+
# CIM_EnabledLogicalElement.OtherEnabledState
|
39
|
+
"OtherEnabledState" => :string,
|
40
|
+
|
41
|
+
# CIM_EnabledLogicalElement.RequestedState
|
42
|
+
"RequestedState" => :uint16,
|
43
|
+
|
44
|
+
# CIM_EnabledLogicalElement.EnabledDefault
|
45
|
+
"EnabledDefault" => :uint16,
|
46
|
+
|
47
|
+
# CIM_EnabledLogicalElement.TimeOfLastStateChange
|
48
|
+
"TimeOfLastStateChange" => :dateTime,
|
49
|
+
|
50
|
+
# CIM_EnabledLogicalElement.AvailableRequestedStates
|
51
|
+
"AvailableRequestedStates" => :uint16,
|
52
|
+
|
53
|
+
# CIM_EnabledLogicalElement.TransitioningToState
|
54
|
+
"TransitioningToState" => :uint16,
|
55
|
+
|
56
|
+
# CIM_EnabledLogicalElement.RequestStateChange()
|
57
|
+
"RequestStateChange" => [ :uint32,
|
58
|
+
[ "RequestedState", :uint16, :in ],
|
59
|
+
[ "Job", :class, :out ],
|
60
|
+
[ "TimeoutPeriod", :dateTime, :in ],
|
61
|
+
],
|
62
|
+
|
63
|
+
# CIM_ManagedSystemElement.InstallDate
|
64
|
+
"InstallDate" => :dateTime,
|
65
|
+
|
66
|
+
# CIM_ManagedSystemElement.OperationalStatus
|
67
|
+
"OperationalStatus" => :uint16,
|
68
|
+
|
69
|
+
# CIM_ManagedSystemElement.StatusDescriptions
|
70
|
+
"StatusDescriptions" => :string,
|
71
|
+
|
72
|
+
# CIM_ManagedSystemElement.Status
|
73
|
+
"Status" => :string,
|
74
|
+
|
75
|
+
# CIM_ManagedSystemElement.HealthState
|
76
|
+
"HealthState" => :uint16,
|
77
|
+
|
78
|
+
# CIM_ManagedSystemElement.CommunicationStatus
|
79
|
+
"CommunicationStatus" => :uint16,
|
80
|
+
|
81
|
+
# CIM_ManagedSystemElement.DetailedStatus
|
82
|
+
"DetailedStatus" => :uint16,
|
83
|
+
|
84
|
+
# CIM_ManagedSystemElement.OperatingStatus
|
85
|
+
"OperatingStatus" => :uint16,
|
86
|
+
|
87
|
+
# CIM_ManagedSystemElement.PrimaryStatus
|
88
|
+
"PrimaryStatus" => :uint16,
|
89
|
+
|
90
|
+
# CIM_ManagedElement.InstanceID
|
91
|
+
"InstanceID" => :string,
|
92
|
+
|
93
|
+
# CIM_ManagedElement.Caption
|
94
|
+
"Caption" => :string,
|
95
|
+
|
96
|
+
# CIM_ManagedElement.Description
|
97
|
+
"Description" => :string,
|
98
|
+
|
99
|
+
# CIM_ManagedElement.ElementName
|
100
|
+
"ElementName" => :string,
|
101
|
+
|
102
|
+
# CIM_ManagedElement.Generation
|
103
|
+
"Generation" => :uint64,
|
104
|
+
|
105
|
+
}
|
106
|
+
|
107
|
+
def _typemap
|
108
|
+
TYPEMAP
|
109
|
+
end
|
110
|
+
|
111
|
+
end # class
|
112
|
+
end # module
|
@@ -0,0 +1,79 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
# Class information for IPS_KVMRedirectionSettingData
|
4
|
+
# Generated by 'wbem' for use with ruby-wbem
|
5
|
+
|
6
|
+
require 'rubygems'
|
7
|
+
require 'cim'
|
8
|
+
require 'wbem'
|
9
|
+
|
10
|
+
module Wbem
|
11
|
+
|
12
|
+
class IPS_KVMRedirectionSettingData < Wbem::Instance
|
13
|
+
|
14
|
+
|
15
|
+
TYPEMAP = {
|
16
|
+
|
17
|
+
# IPS_KVMRedirectionSettingData.EnabledByMEBx
|
18
|
+
"EnabledByMEBx" => :boolean,
|
19
|
+
|
20
|
+
# IPS_KVMRedirectionSettingData.Is5900PortEnabled
|
21
|
+
"Is5900PortEnabled" => :boolean,
|
22
|
+
|
23
|
+
# IPS_KVMRedirectionSettingData.OptInPolicy
|
24
|
+
"OptInPolicy" => :boolean,
|
25
|
+
|
26
|
+
# IPS_KVMRedirectionSettingData.OptInPolicyTimeout
|
27
|
+
"OptInPolicyTimeout" => :uint16,
|
28
|
+
|
29
|
+
# IPS_KVMRedirectionSettingData.SessionTimeout
|
30
|
+
"SessionTimeout" => :uint16,
|
31
|
+
|
32
|
+
# IPS_KVMRedirectionSettingData.RFBPassword
|
33
|
+
"RFBPassword" => :string,
|
34
|
+
|
35
|
+
# IPS_KVMRedirectionSettingData.DefaultScreen
|
36
|
+
"DefaultScreen" => :uint8,
|
37
|
+
|
38
|
+
# IPS_KVMRedirectionSettingData.TerminateSession()
|
39
|
+
"TerminateSession" => [ :uint32,
|
40
|
+
],
|
41
|
+
|
42
|
+
# CIM_SettingData.InstanceID
|
43
|
+
"InstanceID" => :string,
|
44
|
+
|
45
|
+
# CIM_SettingData.ElementName
|
46
|
+
"ElementName" => :string,
|
47
|
+
|
48
|
+
# CIM_SettingData.ConfigurationName
|
49
|
+
"ConfigurationName" => :string,
|
50
|
+
|
51
|
+
# CIM_SettingData.ChangeableType
|
52
|
+
"ChangeableType" => :uint16,
|
53
|
+
|
54
|
+
# CIM_SettingData.ComponentSetting
|
55
|
+
"ComponentSetting" => :string,
|
56
|
+
|
57
|
+
# CIM_SettingData.SoID
|
58
|
+
"SoID" => :string,
|
59
|
+
|
60
|
+
# CIM_SettingData.SoOrgID
|
61
|
+
"SoOrgID" => :string,
|
62
|
+
|
63
|
+
# CIM_ManagedElement.Caption
|
64
|
+
"Caption" => :string,
|
65
|
+
|
66
|
+
# CIM_ManagedElement.Description
|
67
|
+
"Description" => :string,
|
68
|
+
|
69
|
+
# CIM_ManagedElement.Generation
|
70
|
+
"Generation" => :uint64,
|
71
|
+
|
72
|
+
}
|
73
|
+
|
74
|
+
def _typemap
|
75
|
+
TYPEMAP
|
76
|
+
end
|
77
|
+
|
78
|
+
end # class
|
79
|
+
end # module
|
metadata
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: amt
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Klaus Kämpf
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-05-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: yard
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.5'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.5'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: wbem
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.5'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.5'
|
41
|
+
description: |-
|
42
|
+
ruby-amt gives you control over KVM (console
|
43
|
+
redirection via VNC) and SOL (serial-over-lan) function of Intel AMT
|
44
|
+
(part of Intel vPro)
|
45
|
+
email:
|
46
|
+
- kkaempf@suse.de
|
47
|
+
executables:
|
48
|
+
- amt
|
49
|
+
extensions: []
|
50
|
+
extra_rdoc_files:
|
51
|
+
- README.rdoc
|
52
|
+
- MIT-LICENSE
|
53
|
+
files:
|
54
|
+
- CHANGELOG.rdoc
|
55
|
+
- Gemfile
|
56
|
+
- MIT-LICENSE
|
57
|
+
- README.rdoc
|
58
|
+
- Rakefile
|
59
|
+
- amt.gemspec
|
60
|
+
- bin/amt
|
61
|
+
- lib/amt.rb
|
62
|
+
- lib/amt/kvm.rb
|
63
|
+
- lib/amt/sol.rb
|
64
|
+
- lib/amt/version.rb
|
65
|
+
- tasks/clean.rake
|
66
|
+
- tasks/doc.rake
|
67
|
+
- tasks/test.rake
|
68
|
+
- wbem/AMT_RedirectionService.rb
|
69
|
+
- wbem/CIM_KVMRedirectionSAP.rb
|
70
|
+
- wbem/IPS_KVMRedirectionSettingData.rb
|
71
|
+
homepage: http://www.github.com/kkaempf/ruby-amt
|
72
|
+
licenses: []
|
73
|
+
metadata: {}
|
74
|
+
post_install_message: " ____\n/@ ~-.\n/ __ .- | remember to have fun! \n // //
|
75
|
+
\ @ \n\n"
|
76
|
+
rdoc_options: []
|
77
|
+
require_paths:
|
78
|
+
- lib
|
79
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
84
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: 1.3.6
|
89
|
+
requirements: []
|
90
|
+
rubyforge_project:
|
91
|
+
rubygems_version: 2.4.5
|
92
|
+
signing_key:
|
93
|
+
specification_version: 4
|
94
|
+
summary: Command line interface to Intel AMT
|
95
|
+
test_files: []
|