amt 0.1.0 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: af218d59d3784e23b83a798e1fdca0d71721b0ff
4
- data.tar.gz: b4b1f98f5726a0a2cc334ac47b96f41950f24513
3
+ metadata.gz: 35c12ad03ac1ea0cbbbadc3a4942ccc51045ed53
4
+ data.tar.gz: 225e7eea82089abebb0fe71af9f4af63a32cfe53
5
5
  SHA512:
6
- metadata.gz: 58ce00332a2eaa52b383be3256f9387e22052d8ec10356a0a96ca604c8d09f30e6ee71fd1ade549ff284f5b4f9ad67c2036157acfbcdca56621586151fe7e79e
7
- data.tar.gz: 689703ec8b0283e57436a48e3cf01830fe4dc5762031f3bada002387d805830c99504ff7bfd2bff171b4b2ba3379a01a22b140665754a060abceb322b4ade9aa
6
+ metadata.gz: 17255983b08a659c733e9634a178ddbb9d4b119f3bf932aed371c3423102836226cdacc082af1f06c235e3ced34d85ee15249060fee7e3c01f3bf23e2d29e358
7
+ data.tar.gz: 7d2302108b1d30c0d02da5810c46a739315c5ca2c61084e2f7464dfae996f6ad552ba43d60de06d7a3283042c38cce0b1bfa9d57f75d52ee4c660ee1aeb3008d
@@ -1,3 +1,8 @@
1
+ == 0.2.0
2
+
3
+ * add -v (--version) option
4
+ * add 'amt version status' to get iAMT version
5
+
1
6
  == 0.1.0
2
7
 
3
8
  * First public version
@@ -1,7 +1,7 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  lib = File.expand_path('../lib/', __FILE__)
3
3
  $:.unshift lib unless $:.include?(lib)
4
- require "amt/version"
4
+ require "amt"
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "amt"
@@ -17,7 +17,7 @@ redirection via VNC) and SOL (serial-over-lan) function of Intel AMT
17
17
 
18
18
  s.required_rubygems_version = ">= 1.3.6"
19
19
  s.add_development_dependency("yard", [">= 0.5"])
20
- s.add_dependency("wbem", [">= 0.5"])
20
+ s.add_dependency("wbem", [">= 0.5.1"])
21
21
 
22
22
  s.files = `git ls-files`.split("\n")
23
23
  s.files.reject! { |fn| fn == '.gitignore' }
data/bin/amt CHANGED
@@ -17,7 +17,7 @@ def usage msg = nil
17
17
  if msg
18
18
  STDERR.puts "** Err: #{msg}"
19
19
  end
20
- STDERR.puts "amt [-d] <target> <command> <uri>"
20
+ STDERR.puts "amt [-d] [-v] <target> <command> <uri>"
21
21
  STDERR.puts "\t<target>: sol|kvm"
22
22
  STDERR.puts "\t<command>: start|status|stop"
23
23
  STDERR.puts "Example\n\tamt sol status http://user:pass@amt.host.org"
@@ -42,6 +42,9 @@ loop do
42
42
  debug_level += 1
43
43
  when 'h', '-help'
44
44
  usage
45
+ when 'v', '-version'
46
+ puts "Version #{Amt::VERSION}"
47
+ exit 0
45
48
  else
46
49
  usage "Unknown option '#{target}'"
47
50
  end
@@ -66,7 +69,8 @@ end
66
69
  klass = nil
67
70
  begin
68
71
  klass = Amt.const_get(target.capitalize)
69
- rescue
72
+ rescue Exception => e
73
+ usage "Target '#{target.capitalize}' not available: #{e}" if Amt.debug
70
74
  end
71
75
  usage "<target> parameter invalid" unless klass
72
76
 
data/lib/amt.rb CHANGED
@@ -12,6 +12,7 @@ require 'rubygems'
12
12
  require 'wbem'
13
13
 
14
14
  module Amt
15
+ VERSION = "0.2.0"
15
16
  require "amt/version"
16
17
  require "amt/kvm"
17
18
  require "amt/sol"
@@ -1,3 +1,15 @@
1
1
  module Amt
2
- VERSION = "0.1.0"
2
+ class Version
3
+ def initialize client
4
+ @client = client
5
+ end
6
+
7
+ def status
8
+ puts "Protocol_version '#{@client.protocol_version}'"
9
+ puts "Product vendor '#{@client.product_vendor}'"
10
+ puts "Product version '#{@client.product_version}'"
11
+ 0
12
+ end
13
+ end
3
14
  end
15
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
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
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0.5'
33
+ version: 0.5.1
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '0.5'
40
+ version: 0.5.1
41
41
  description: |-
42
42
  ruby-amt gives you control over KVM (console
43
43
  redirection via VNC) and SOL (serial-over-lan) function of Intel AMT