vmc 0.3.18 → 0.3.19
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +5 -1
- data/lib/cli/commands/user.rb +4 -1
- data/lib/cli/console_helper.rb +14 -4
- data/lib/cli/version.rb +1 -1
- metadata +27 -11
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
The VMware Cloud CLI. This is the command line interface to VMware's Application Platform
|
4
4
|
|
5
|
-
_Copyright 2010-
|
5
|
+
_Copyright 2010-2012, VMware, Inc. Licensed under the
|
6
6
|
MIT license, please see the LICENSE file. All rights reserved._
|
7
7
|
|
8
8
|
Usage: vmc [options] command [<args>] [command_options]
|
@@ -100,3 +100,7 @@ MIT license, please see the LICENSE file. All rights reserved._
|
|
100
100
|
vmc login
|
101
101
|
bundle package
|
102
102
|
vmc push
|
103
|
+
|
104
|
+
## File a Bug
|
105
|
+
|
106
|
+
To file a bug against Cloud Foundry Open Source and its components, sign up and use our bug tracking system: [http://cloudfoundry.atlassian.net](http://cloudfoundry.atlassian.net)
|
data/lib/cli/commands/user.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require "cfoundry"
|
2
|
+
|
1
3
|
module VMC::Cli::Command
|
2
4
|
|
3
5
|
class User < Base
|
@@ -56,7 +58,8 @@ module VMC::Cli::Command
|
|
56
58
|
private
|
57
59
|
|
58
60
|
def login_and_save_token(email, password)
|
59
|
-
|
61
|
+
cfoundry = CFoundry::Client.new(client.target)
|
62
|
+
token = cfoundry.login(:username => email, :password => password)
|
60
63
|
VMC::Cli::Config.store_token(token, @options[:token_file])
|
61
64
|
end
|
62
65
|
|
data/lib/cli/console_helper.rb
CHANGED
@@ -32,9 +32,20 @@ module VMC::Cli
|
|
32
32
|
|
33
33
|
def start_local_console(port, appname)
|
34
34
|
auth_info = console_credentials(appname)
|
35
|
-
|
35
|
+
banner = "Connecting to '#{appname}' console: "
|
36
|
+
display banner, false
|
37
|
+
t = Thread.new do
|
38
|
+
count = 0
|
39
|
+
while count < 90 do
|
40
|
+
display '.', false
|
41
|
+
sleep 1
|
42
|
+
count += 1
|
43
|
+
end
|
44
|
+
end
|
36
45
|
prompt = console_login(auth_info, port)
|
37
|
-
|
46
|
+
Thread.kill(t)
|
47
|
+
clear(80)
|
48
|
+
display "#{banner}#{'OK'.green}"
|
38
49
|
display "\n"
|
39
50
|
initialize_readline
|
40
51
|
run_console prompt
|
@@ -47,7 +58,7 @@ module VMC::Cli
|
|
47
58
|
@telnet_client = telnet_client(port)
|
48
59
|
prompt = nil
|
49
60
|
err_msg = "Login attempt timed out."
|
50
|
-
|
61
|
+
3.times do
|
51
62
|
begin
|
52
63
|
results = @telnet_client.login("Name"=>auth_info["username"],
|
53
64
|
"Password"=>auth_info["password"])
|
@@ -67,7 +78,6 @@ module VMC::Cli
|
|
67
78
|
sleep 5
|
68
79
|
@telnet_client = telnet_client(port)
|
69
80
|
end
|
70
|
-
display ".", false
|
71
81
|
end
|
72
82
|
unless prompt
|
73
83
|
close_console
|
data/lib/cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vmc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 53
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 19
|
10
|
+
version: 0.3.19
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- VMware
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-
|
18
|
+
date: 2012-09-04 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: json_pure
|
@@ -162,9 +162,25 @@ dependencies:
|
|
162
162
|
type: :runtime
|
163
163
|
version_requirements: *id008
|
164
164
|
- !ruby/object:Gem::Dependency
|
165
|
-
name:
|
165
|
+
name: cfoundry
|
166
166
|
prerelease: false
|
167
167
|
requirement: &id009 !ruby/object:Gem::Requirement
|
168
|
+
none: false
|
169
|
+
requirements:
|
170
|
+
- - ~>
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
hash: 37
|
173
|
+
segments:
|
174
|
+
- 0
|
175
|
+
- 3
|
176
|
+
- 27
|
177
|
+
version: 0.3.27
|
178
|
+
type: :runtime
|
179
|
+
version_requirements: *id009
|
180
|
+
- !ruby/object:Gem::Dependency
|
181
|
+
name: rake
|
182
|
+
prerelease: false
|
183
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
168
184
|
none: false
|
169
185
|
requirements:
|
170
186
|
- - ">="
|
@@ -174,11 +190,11 @@ dependencies:
|
|
174
190
|
- 0
|
175
191
|
version: "0"
|
176
192
|
type: :development
|
177
|
-
version_requirements: *
|
193
|
+
version_requirements: *id010
|
178
194
|
- !ruby/object:Gem::Dependency
|
179
195
|
name: rspec
|
180
196
|
prerelease: false
|
181
|
-
requirement: &
|
197
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
182
198
|
none: false
|
183
199
|
requirements:
|
184
200
|
- - ~>
|
@@ -190,11 +206,11 @@ dependencies:
|
|
190
206
|
- 0
|
191
207
|
version: 1.3.0
|
192
208
|
type: :development
|
193
|
-
version_requirements: *
|
209
|
+
version_requirements: *id011
|
194
210
|
- !ruby/object:Gem::Dependency
|
195
211
|
name: webmock
|
196
212
|
prerelease: false
|
197
|
-
requirement: &
|
213
|
+
requirement: &id012 !ruby/object:Gem::Requirement
|
198
214
|
none: false
|
199
215
|
requirements:
|
200
216
|
- - ~>
|
@@ -206,7 +222,7 @@ dependencies:
|
|
206
222
|
- 0
|
207
223
|
version: 1.5.0
|
208
224
|
type: :development
|
209
|
-
version_requirements: *
|
225
|
+
version_requirements: *id012
|
210
226
|
description: Client library and CLI that provides access to the VMware Cloud Application Platform.
|
211
227
|
email: support@vmware.com
|
212
228
|
executables:
|
@@ -288,7 +304,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
288
304
|
requirements: []
|
289
305
|
|
290
306
|
rubyforge_project:
|
291
|
-
rubygems_version: 1.8.
|
307
|
+
rubygems_version: 1.8.24
|
292
308
|
signing_key:
|
293
309
|
specification_version: 3
|
294
310
|
summary: Client library and CLI that provides access to the VMware Cloud Application Platform.
|