rvc 1.3.5 → 1.3.6
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/README.rdoc +2 -0
- data/VERSION +1 -1
- data/bin/rvc +10 -2
- data/lib/rvc/modules/basic.rb +12 -0
- metadata +3 -7
- data/test/_test_completion.rb +0 -27
- data/test/_test_option_parser.rb +0 -6
data/README.rdoc
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.3.
|
1
|
+
1.3.6
|
data/bin/rvc
CHANGED
@@ -58,8 +58,6 @@ EOS
|
|
58
58
|
opt :cmd, "command to evaluate", :short => 'c', :multi => true, :type => :string
|
59
59
|
end
|
60
60
|
|
61
|
-
Trollop.die "At least 1 argument expected" unless ARGV.length >= 1
|
62
|
-
|
63
61
|
RVC.reload_modules false
|
64
62
|
|
65
63
|
$shell = RVC::Shell.new
|
@@ -97,10 +95,20 @@ elsif $shell.connections.size == 1
|
|
97
95
|
end
|
98
96
|
end
|
99
97
|
|
98
|
+
if defined? Ocra
|
99
|
+
require "net/https"
|
100
|
+
require "digest/sha2"
|
101
|
+
exit
|
102
|
+
end
|
103
|
+
|
100
104
|
unless CMD.vmrc.find_vmrc
|
101
105
|
$stderr.puts "VMRC is not installed. You will be unable to view virtual machine consoles. Use the vmrc.install command to install it."
|
102
106
|
end
|
103
107
|
|
108
|
+
if $shell.connections.empty?
|
109
|
+
$stderr.puts "Use the 'connect' command to connect to an ESX or VC server."
|
110
|
+
end
|
111
|
+
|
104
112
|
CMD.basic.ls lookup_single('.')
|
105
113
|
|
106
114
|
while true
|
data/lib/rvc/modules/basic.rb
CHANGED
@@ -42,6 +42,18 @@ rvc_alias :help
|
|
42
42
|
HELP_ORDER = %w(basic vm)
|
43
43
|
|
44
44
|
def help path
|
45
|
+
if tgt = RVC::ALIASES[path]
|
46
|
+
fail unless tgt =~ /^(.+)\.(.+)$/
|
47
|
+
opts_block = RVC::MODULES[$1].opts_for($2.to_sym)
|
48
|
+
RVC::OptionParser.new(tgt, &opts_block).educate
|
49
|
+
return
|
50
|
+
elsif path =~ /^(.+)\.(.+)$/ and
|
51
|
+
mod = RVC::MODULES[$1] and
|
52
|
+
opts_block = mod.opts_for($2.to_sym)
|
53
|
+
RVC::OptionParser.new(path, &opts_block).educate
|
54
|
+
return
|
55
|
+
end
|
56
|
+
|
45
57
|
obj = lookup_single(path) if path
|
46
58
|
|
47
59
|
if obj
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: rvc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.3.
|
5
|
+
version: 1.3.6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Rich Lane
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-04-
|
13
|
+
date: 2011-04-20 00:00:00 -07:00
|
14
14
|
default_executable: rvc
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -123,8 +123,6 @@ files:
|
|
123
123
|
- test/inventory_fixtures.rb
|
124
124
|
- test/test_fs.rb
|
125
125
|
- test/test_parse_path.rb
|
126
|
-
- test/_test_completion.rb
|
127
|
-
- test/_test_option_parser.rb
|
128
126
|
has_rdoc: true
|
129
127
|
homepage:
|
130
128
|
licenses: []
|
@@ -149,13 +147,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
147
|
requirements: []
|
150
148
|
|
151
149
|
rubyforge_project:
|
152
|
-
rubygems_version: 1.
|
150
|
+
rubygems_version: 1.6.2
|
153
151
|
signing_key:
|
154
152
|
specification_version: 3
|
155
153
|
summary: vSphere console UI
|
156
154
|
test_files:
|
157
|
-
- test/_test_completion.rb
|
158
|
-
- test/_test_option_parser.rb
|
159
155
|
- test/inventory_fixtures.rb
|
160
156
|
- test/test_fs.rb
|
161
157
|
- test/test_parse_path.rb
|
data/test/_test_completion.rb
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
require 'test/unit'
|
2
|
-
require 'rvc'
|
3
|
-
require 'inventory_fixtures'
|
4
|
-
|
5
|
-
class CompletionTest < Test::Unit::TestCase
|
6
|
-
NodeBaz = FixtureNode.new
|
7
|
-
NodeBar = FixtureNode.new
|
8
|
-
NodeFoo = FixtureNode.new('bar' => NodeBar, 'baz' => NodeBaz)
|
9
|
-
Root = FixtureNode.new('foo' => NodeFoo)
|
10
|
-
|
11
|
-
def check word, expected
|
12
|
-
got = RVC::Completion::Completor[word]
|
13
|
-
assert_equal expected, got
|
14
|
-
end
|
15
|
-
|
16
|
-
def setup
|
17
|
-
@context = RVC::Context.new Root
|
18
|
-
end
|
19
|
-
|
20
|
-
def teardown
|
21
|
-
@context = nil
|
22
|
-
end
|
23
|
-
|
24
|
-
def test_simple
|
25
|
-
check
|
26
|
-
end
|
27
|
-
end
|