console-launcher 0.0.9 → 0.0.11
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.
- data/bin/console-launcher +5 -14
- data/lib/console-launcher.rb +15 -6
- data/lib/console-launcher_version.rb +1 -1
- metadata +116 -76
- checksums.yaml +0 -15
data/bin/console-launcher
CHANGED
@@ -33,6 +33,8 @@ require 'console-launcher'
|
|
33
33
|
require 'console-launcher_version'
|
34
34
|
require 'optparse'
|
35
35
|
require 'yaml'
|
36
|
+
require 'sfl'
|
37
|
+
|
36
38
|
include Helper
|
37
39
|
|
38
40
|
Helper.load_options
|
@@ -125,20 +127,9 @@ while true do
|
|
125
127
|
|
126
128
|
if (1..vms.size).member?(index)
|
127
129
|
command = rhevm.launch_viewer(index)
|
128
|
-
puts command if Helper::OPTIONS[:print]
|
130
|
+
puts command.join(" ") if Helper::OPTIONS[:print]
|
129
131
|
unless Helper::OPTIONS[:dryrun]
|
130
|
-
|
131
|
-
|
132
|
-
if pid.nil?
|
133
|
-
# In child
|
134
|
-
$stdout.reopen(Tempfile.new("RV-stdout").path, 'w')
|
135
|
-
$stderr.reopen(Tempfile.new("RV-stderr").path, 'w')
|
136
|
-
exec(command)
|
137
|
-
else
|
138
|
-
# In parent
|
139
|
-
Process.detach(pid)
|
140
|
-
end
|
141
|
-
|
132
|
+
spawn(*command)
|
142
133
|
end
|
143
134
|
|
144
135
|
puts "Reloading Virtual Machines Selection Menu ..."
|
@@ -147,7 +138,7 @@ while true do
|
|
147
138
|
puts "ERROR: Your selection #{index} is out of range."
|
148
139
|
end
|
149
140
|
rescue => e
|
150
|
-
puts "There was an error retrieving the Virtual Machines from #{
|
141
|
+
puts "There was an error retrieving the Virtual Machines from #{Helper::OPTIONS[:host]}: #{e.message}"
|
151
142
|
puts e.backtrace
|
152
143
|
exit 1
|
153
144
|
end
|
data/lib/console-launcher.rb
CHANGED
@@ -133,7 +133,16 @@ class RhevManager
|
|
133
133
|
# Now that we have all the information we can print the cmd line
|
134
134
|
puts "Console to VM: #{vm.name} state: #{vm.state} is started"
|
135
135
|
|
136
|
-
command =
|
136
|
+
command = [
|
137
|
+
Helper::OPTIONS[:viewer],
|
138
|
+
"--spice-ca-file",
|
139
|
+
@cert,
|
140
|
+
@vv.path,
|
141
|
+
{
|
142
|
+
:out => Tempfile.new(["RemoteViewer",".out"]).path,
|
143
|
+
:err => Tempfile.new(["RemoteViewer",".err"]).path
|
144
|
+
}
|
145
|
+
]
|
137
146
|
end
|
138
147
|
|
139
148
|
|
@@ -144,11 +153,11 @@ module Helper
|
|
144
153
|
CONFIG_FILE = File.join(ENV['HOME'], '.console-launcher.rc.yaml')
|
145
154
|
|
146
155
|
OPTIONS = {
|
147
|
-
print
|
148
|
-
dryrun
|
149
|
-
host
|
150
|
-
user
|
151
|
-
pass
|
156
|
+
:print => false,
|
157
|
+
:dryrun => false,
|
158
|
+
:host => nil,
|
159
|
+
:user => "admin@internal",
|
160
|
+
:pass => nil
|
152
161
|
}
|
153
162
|
|
154
163
|
OPTIONS[:viewer] = case RbConfig::CONFIG['host_os']
|
metadata
CHANGED
@@ -1,97 +1,127 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: console-launcher
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 9
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 11
|
10
|
+
version: 0.0.11
|
5
11
|
platform: ruby
|
6
|
-
authors:
|
12
|
+
authors:
|
7
13
|
- Juergen Hoffmann
|
8
14
|
- Vinny Valdez
|
9
15
|
- Thomas Crowe
|
10
16
|
autorequire:
|
11
17
|
bindir: bin
|
12
18
|
cert_chain: []
|
13
|
-
|
14
|
-
|
15
|
-
|
19
|
+
|
20
|
+
date: 2013-05-28 00:00:00 Z
|
21
|
+
dependencies:
|
22
|
+
- !ruby/object:Gem::Dependency
|
16
23
|
name: rest-client
|
17
|
-
requirement: !ruby/object:Gem::Requirement
|
18
|
-
requirements:
|
19
|
-
- - ~>
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: 1.6.7
|
22
|
-
type: :runtime
|
23
24
|
prerelease: false
|
24
|
-
|
25
|
-
|
25
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
26
28
|
- - ~>
|
27
|
-
- !ruby/object:Gem::Version
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
hash: 1
|
31
|
+
segments:
|
32
|
+
- 1
|
33
|
+
- 6
|
34
|
+
- 7
|
28
35
|
version: 1.6.7
|
29
|
-
- !ruby/object:Gem::Dependency
|
30
|
-
name: xml-simple
|
31
|
-
requirement: !ruby/object:Gem::Requirement
|
32
|
-
requirements:
|
33
|
-
- - ~>
|
34
|
-
- !ruby/object:Gem::Version
|
35
|
-
version: 1.1.2
|
36
36
|
type: :runtime
|
37
|
+
version_requirements: *id001
|
38
|
+
- !ruby/object:Gem::Dependency
|
39
|
+
name: xml-simple
|
37
40
|
prerelease: false
|
38
|
-
|
39
|
-
|
41
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
40
44
|
- - ~>
|
41
|
-
- !ruby/object:Gem::Version
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
hash: 23
|
47
|
+
segments:
|
48
|
+
- 1
|
49
|
+
- 1
|
50
|
+
- 2
|
42
51
|
version: 1.1.2
|
43
|
-
|
52
|
+
type: :runtime
|
53
|
+
version_requirements: *id002
|
54
|
+
- !ruby/object:Gem::Dependency
|
44
55
|
name: highline
|
45
|
-
|
46
|
-
|
56
|
+
prerelease: false
|
57
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
47
60
|
- - ~>
|
48
|
-
- !ruby/object:Gem::Version
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
hash: 41
|
63
|
+
segments:
|
64
|
+
- 1
|
65
|
+
- 6
|
66
|
+
- 19
|
49
67
|
version: 1.6.19
|
50
68
|
type: :runtime
|
69
|
+
version_requirements: *id003
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: sfl
|
51
72
|
prerelease: false
|
52
|
-
|
53
|
-
|
73
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
54
76
|
- - ~>
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
|
57
|
-
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
hash: 7
|
79
|
+
segments:
|
80
|
+
- 2
|
81
|
+
- 2
|
82
|
+
version: "2.2"
|
83
|
+
type: :runtime
|
84
|
+
version_requirements: *id004
|
85
|
+
- !ruby/object:Gem::Dependency
|
58
86
|
name: rake
|
59
|
-
requirement: !ruby/object:Gem::Requirement
|
60
|
-
requirements:
|
61
|
-
- - ! '>='
|
62
|
-
- !ruby/object:Gem::Version
|
63
|
-
version: '0'
|
64
|
-
type: :development
|
65
87
|
prerelease: false
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
- - ! '>='
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: '0'
|
88
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ">="
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
hash: 3
|
94
|
+
segments:
|
95
|
+
- 0
|
96
|
+
version: "0"
|
78
97
|
type: :development
|
98
|
+
version_requirements: *id005
|
99
|
+
- !ruby/object:Gem::Dependency
|
100
|
+
name: rdoc
|
79
101
|
prerelease: false
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
102
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
103
|
+
none: false
|
104
|
+
requirements:
|
105
|
+
- - ">="
|
106
|
+
- !ruby/object:Gem::Version
|
107
|
+
hash: 3
|
108
|
+
segments:
|
109
|
+
- 0
|
110
|
+
version: "0"
|
111
|
+
type: :development
|
112
|
+
version_requirements: *id006
|
85
113
|
description: This gem provides the ability to launch console sessions on Mac
|
86
|
-
email:
|
114
|
+
email:
|
87
115
|
- buddy@redhat.com
|
88
116
|
- vvaldez@redhat.com
|
89
117
|
- tcrowe@redhat.com
|
90
|
-
executables:
|
118
|
+
executables:
|
91
119
|
- console-launcher
|
92
120
|
extensions: []
|
121
|
+
|
93
122
|
extra_rdoc_files: []
|
94
|
-
|
123
|
+
|
124
|
+
files:
|
95
125
|
- lib/console-launcher.rb
|
96
126
|
- lib/console-launcher_version.rb
|
97
127
|
- lib/rhev-manager/virtual-machine.rb
|
@@ -100,26 +130,36 @@ files:
|
|
100
130
|
- man/console-launcher.1
|
101
131
|
homepage: https://github.com/juhoffma/rhev-console-launcher
|
102
132
|
licenses: []
|
103
|
-
|
133
|
+
|
104
134
|
post_install_message:
|
105
135
|
rdoc_options: []
|
106
|
-
|
136
|
+
|
137
|
+
require_paths:
|
107
138
|
- lib
|
108
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
139
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
140
|
+
none: false
|
141
|
+
requirements:
|
142
|
+
- - ">="
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
hash: 3
|
145
|
+
segments:
|
146
|
+
- 0
|
147
|
+
version: "0"
|
148
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
149
|
+
none: false
|
150
|
+
requirements:
|
151
|
+
- - ">="
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
hash: 3
|
154
|
+
segments:
|
155
|
+
- 0
|
156
|
+
version: "0"
|
157
|
+
requirements:
|
119
158
|
- RemoteViewer - get it from http://people.freedesktop.org/~teuf/spice-gtk-osx/dmg/0.3.1/
|
120
159
|
rubyforge_project:
|
121
|
-
rubygems_version:
|
160
|
+
rubygems_version: 1.8.24
|
122
161
|
signing_key:
|
123
|
-
specification_version:
|
162
|
+
specification_version: 3
|
124
163
|
summary: RHEV-M Console Launcher
|
125
164
|
test_files: []
|
165
|
+
|
checksums.yaml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
---
|
2
|
-
!binary "U0hBMQ==":
|
3
|
-
metadata.gz: !binary |-
|
4
|
-
NTU4NDAyMmFiMTAwNDZjYjNiODRkMTRmODg1MDcxOGFhZjNhYjFkMg==
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
YjQ2ODFhMWNjZWIwNTg3ZjQ0MzIyMmRkNjFjMWJhZTFlNDIxODk5ZQ==
|
7
|
-
!binary "U0hBNTEy":
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
MTQ4MDA2ZjEwZDAyZWJmZDMyYzgxMDliNGVkZDNjOWYwOGMzNWNmMmM1Y2U0
|
10
|
-
ZjdjYmU2MGEzYzc4ZDZiNDI0OWRjYjVjZTkyMjRmYzMzZDViYmFjZTFiNzFk
|
11
|
-
MzkxZmEzZjcyMDNmNjJlMTlmMWUyODExYTQ5ZjhmNTg0NmE4Njc=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
ZWYzM2U2ZWFjZDlkMWQ3MjhjMWM4MDBjOWE5OTg1ODIxZmU1YTA3MTQ2NzIx
|
14
|
-
ZTE2YzE2NzgxN2Y5MzkyMjI0ZGVmMzZlNTYwNmQyODhkNjYzZTMwYzM4Y2M4
|
15
|
-
Zjg5NTUwMDc0ZmQ5ODdkYWVlY2JjZWM3ZDIyYjBkNGRmMWRiN2M=
|