pi 0.1.32 → 0.1.33
Sign up to get free protection for your applications and to get access to all the features.
- data/README +15 -21
- data/lib/cli/choose_helper.rb +15 -6
- data/lib/cli/interact_helper.rb +6 -1
- data/lib/cli/version.rb +1 -1
- metadata +134 -151
data/README
CHANGED
@@ -53,10 +53,10 @@ _Copyright 2010-2012, Samsung.
|
|
53
53
|
|
54
54
|
3. Help
|
55
55
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
56
|
+
Usage: pi [options] command [<args>] [command_options]
|
57
|
+
Try 'pi help [command]' or 'pi help options' for more information.
|
58
|
+
|
59
|
+
Currently available pi commands are:
|
60
60
|
|
61
61
|
User
|
62
62
|
login [url] [--user,--password] Login
|
@@ -109,8 +109,6 @@ _Copyright 2010-2012, Samsung.
|
|
109
109
|
delete-env <appname> <--target TARGET> [--name NAME] Delete the environment for the application
|
110
110
|
app-log [appid] [--instanceid,--file] List the logs for the application
|
111
111
|
app-log <appname> <--target TARGET> [--instanceid,--file] List the logs for the application
|
112
|
-
app-debug [appid] List the debug info for the application
|
113
|
-
app-debug <appname> <--target TARGET> List the debug info for the application
|
114
112
|
|
115
113
|
Service
|
116
114
|
app-service [appid] Display the binded services for the application
|
@@ -125,7 +123,7 @@ _Copyright 2010-2012, Samsung.
|
|
125
123
|
import-service [url] Import dedicated service
|
126
124
|
check-service [serviceid] Check availability for the service
|
127
125
|
delete-service [serviceid] Delete the service
|
128
|
-
register-service [serviceid] [--target
|
126
|
+
register-service [serviceid] [--target TARGET] Register to target
|
129
127
|
deregister-service [serviceid] [--target TARGET] Deregister to target
|
130
128
|
|
131
129
|
DNS
|
@@ -155,14 +153,14 @@ wangjing@wangjing-pc:~$ pi login staging.samsungcloud.org --user wangjing --pass
|
|
155
153
|
Successfully logged into [http://staging.samsungcloud.org]
|
156
154
|
|
157
155
|
wangjing@wangjing-pc:~$ pi version
|
158
|
-
pi 0.1.
|
156
|
+
pi 0.1.32
|
159
157
|
|
160
158
|
wangjing@wangjing-pc:~$ pi info
|
161
159
|
|
162
160
|
Name: api
|
163
161
|
Description: CloudPi API Component
|
164
|
-
Build: nightly-
|
165
|
-
Version: coulibiac-
|
162
|
+
Build: nightly-20121011055902-110
|
163
|
+
Version: coulibiac-21463d
|
166
164
|
|
167
165
|
wangjing@wangjing-pc:~$ pi help
|
168
166
|
|
@@ -222,8 +220,6 @@ Currently available pi commands are:
|
|
222
220
|
delete-env <appname> <--target TARGET> [--name NAME] Delete the environment for the application
|
223
221
|
app-log [appid] [--instanceid,--file] List the logs for the application
|
224
222
|
app-log <appname> <--target TARGET> [--instanceid,--file] List the logs for the application
|
225
|
-
app-debug [appid] List the debug info for the application
|
226
|
-
app-debug <appname> <--target TARGET> List the debug info for the application
|
227
223
|
|
228
224
|
Service
|
229
225
|
app-service [appid] Display the binded services for the application
|
@@ -238,7 +234,7 @@ Currently available pi commands are:
|
|
238
234
|
import-service [url] Import dedicated service
|
239
235
|
check-service [serviceid] Check availability for the service
|
240
236
|
delete-service [serviceid] Delete the service
|
241
|
-
register-service [serviceid] [--target
|
237
|
+
register-service [serviceid] [--target TARGET] Register to target
|
242
238
|
deregister-service [serviceid] [--target TARGET] Deregister to target
|
243
239
|
|
244
240
|
DNS
|
@@ -260,7 +256,7 @@ wangjing@wangjing-pc:~$ pi help options
|
|
260
256
|
|
261
257
|
Available options:
|
262
258
|
|
263
|
-
|
259
|
+
--user USER
|
264
260
|
--password PASS
|
265
261
|
--name NAME
|
266
262
|
--email EMAIL
|
@@ -270,7 +266,6 @@ Available options:
|
|
270
266
|
--projectid ID
|
271
267
|
--target TARG
|
272
268
|
--instance N
|
273
|
-
--type TYPE
|
274
269
|
--value VALUE
|
275
270
|
--service SERVICE
|
276
271
|
--dns DNS
|
@@ -305,7 +300,8 @@ wangjing@wangjing-pc:~$ pi targets
|
|
305
300
|
| Name | URL |
|
306
301
|
+-----------+-----------------------------------+
|
307
302
|
| bst-dev | http://bst-dev.samsungcloud.org |
|
308
|
-
|
|
303
|
+
| target-hq | http://target-hq.samsungcloud.org |
|
304
|
+
| func-test | http://func-test.samsungcloud.org |
|
309
305
|
+-----------+-----------------------------------+
|
310
306
|
|
311
307
|
wangjing@wangjing-pc:~$ pi runtimes
|
@@ -386,7 +382,8 @@ Uploading "spring4mysql-master-slave.war": .....................................
|
|
386
382
|
|
387
383
|
wangjing@wangjing-pc:~$ pi create-app
|
388
384
|
1: bst-dev
|
389
|
-
2:
|
385
|
+
2: target-hq
|
386
|
+
3: func-test
|
390
387
|
Select Target: 1
|
391
388
|
Selected Target: bst-dev
|
392
389
|
Application Name: spring4mysql
|
@@ -407,7 +404,7 @@ Need debug? [yN]: y
|
|
407
404
|
1: restart
|
408
405
|
2: notify
|
409
406
|
Reaction when service changed [notify]: 1
|
410
|
-
Need
|
407
|
+
Need JMX monitoring? [yN]: y
|
411
408
|
Creating application "spring4mysql": ....................................Success to create appliation.
|
412
409
|
|
413
410
|
wangjing@wangjing-pc:~$ pi apps
|
@@ -476,9 +473,6 @@ Select service: 3
|
|
476
473
|
1: bst-dev
|
477
474
|
2: test-farm
|
478
475
|
Select target: 1
|
479
|
-
1: App Service
|
480
|
-
2: Session Service
|
481
|
-
Select service type: 1
|
482
476
|
OK
|
483
477
|
|
484
478
|
wangjing@wangjing-pc:~$ pi bind-service
|
data/lib/cli/choose_helper.rb
CHANGED
@@ -101,12 +101,21 @@ module PI::Cli
|
|
101
101
|
apps.each do |a|
|
102
102
|
app_choices << a[:name]
|
103
103
|
end
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
104
|
+
loop{
|
105
|
+
appname = ask "Select Application", :choices => app_choices, :indexed => true
|
106
|
+
flag = false
|
107
|
+
apps.each do |a|
|
108
|
+
if a[:name] == appname
|
109
|
+
flag = true
|
110
|
+
return a
|
111
|
+
end
|
112
|
+
end
|
113
|
+
if flag == false
|
114
|
+
display "Please input the right choice!"
|
115
|
+
next
|
116
|
+
end
|
117
|
+
}
|
118
|
+
|
110
119
|
end
|
111
120
|
|
112
121
|
def choose_app_help(appid_or_appname)
|
data/lib/cli/interact_helper.rb
CHANGED
@@ -212,7 +212,12 @@ module PI::Cli
|
|
212
212
|
# elsif choices and ans =~ /^\s*(\d+,)*\d+\s*$/ and \
|
213
213
|
elsif choices and ans =~ /^\s*(\d+,)+\d+\s*$/ and \
|
214
214
|
ans.to_i - 1 >= 0
|
215
|
-
ans = ans.split(",")
|
215
|
+
ans = ans.split(",")
|
216
|
+
ans_uniq = ans.uniq
|
217
|
+
unless ans_uniq == ans
|
218
|
+
puts "Numbers repeat, please try again!"
|
219
|
+
return [false, nil]
|
220
|
+
end
|
216
221
|
res = Array.new
|
217
222
|
ans.each do |a|
|
218
223
|
if a.to_i - 1 < choices.to_a.size
|
data/lib/cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,219 +1,202 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: pi
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.33
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 1
|
9
|
-
- 32
|
10
|
-
version: 0.1.32
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Samsung
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-10-19 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: json_pure
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
24
17
|
none: false
|
25
|
-
requirements:
|
18
|
+
requirements:
|
26
19
|
- - ~>
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
hash: 1
|
29
|
-
segments:
|
30
|
-
- 1
|
31
|
-
- 5
|
32
|
-
- 1
|
20
|
+
- !ruby/object:Gem::Version
|
33
21
|
version: 1.5.1
|
34
22
|
type: :runtime
|
35
|
-
version_requirements: *id001
|
36
|
-
- !ruby/object:Gem::Dependency
|
37
|
-
name: highline
|
38
23
|
prerelease: false
|
39
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
25
|
none: false
|
41
|
-
requirements:
|
26
|
+
requirements:
|
42
27
|
- - ~>
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 1.5.1
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: highline
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
49
37
|
version: 1.6.1
|
50
38
|
type: :runtime
|
51
|
-
version_requirements: *id002
|
52
|
-
- !ruby/object:Gem::Dependency
|
53
|
-
name: interact
|
54
39
|
prerelease: false
|
55
|
-
|
56
|
-
none: false
|
57
|
-
requirements:
|
58
|
-
- -
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 1.6.1
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: interact
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
65
53
|
version: 0.4.7
|
66
54
|
type: :runtime
|
67
|
-
version_requirements: *id003
|
68
|
-
- !ruby/object:Gem::Dependency
|
69
|
-
name: rest-client
|
70
55
|
prerelease: false
|
71
|
-
|
72
|
-
none: false
|
73
|
-
requirements:
|
74
|
-
- -
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.4.7
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: rest-client
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
81
69
|
version: 1.6.1
|
82
70
|
- - <
|
83
|
-
- !ruby/object:Gem::Version
|
84
|
-
hash: 11
|
85
|
-
segments:
|
86
|
-
- 1
|
87
|
-
- 7
|
88
|
-
- 0
|
71
|
+
- !ruby/object:Gem::Version
|
89
72
|
version: 1.7.0
|
90
73
|
type: :runtime
|
91
|
-
version_requirements: *id004
|
92
|
-
- !ruby/object:Gem::Dependency
|
93
|
-
name: terminal-table
|
94
74
|
prerelease: false
|
95
|
-
|
75
|
+
version_requirements: !ruby/object:Gem::Requirement
|
96
76
|
none: false
|
97
|
-
requirements:
|
77
|
+
requirements:
|
78
|
+
- - ! '>='
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: 1.6.1
|
81
|
+
- - <
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: 1.7.0
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: terminal-table
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
|
+
none: false
|
88
|
+
requirements:
|
98
89
|
- - ~>
|
99
|
-
- !ruby/object:Gem::Version
|
100
|
-
hash: 3
|
101
|
-
segments:
|
102
|
-
- 1
|
103
|
-
- 4
|
104
|
-
- 2
|
90
|
+
- !ruby/object:Gem::Version
|
105
91
|
version: 1.4.2
|
106
92
|
type: :runtime
|
107
|
-
version_requirements: *id005
|
108
|
-
- !ruby/object:Gem::Dependency
|
109
|
-
name: rake
|
110
93
|
prerelease: false
|
111
|
-
|
112
|
-
none: false
|
113
|
-
requirements:
|
114
|
-
- -
|
115
|
-
- !ruby/object:Gem::Version
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
94
|
+
version_requirements: !ruby/object:Gem::Requirement
|
95
|
+
none: false
|
96
|
+
requirements:
|
97
|
+
- - ~>
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: 1.4.2
|
100
|
+
- !ruby/object:Gem::Dependency
|
101
|
+
name: rake
|
102
|
+
requirement: !ruby/object:Gem::Requirement
|
103
|
+
none: false
|
104
|
+
requirements:
|
105
|
+
- - ! '>='
|
106
|
+
- !ruby/object:Gem::Version
|
107
|
+
version: '0'
|
120
108
|
type: :development
|
121
|
-
version_requirements: *id006
|
122
|
-
- !ruby/object:Gem::Dependency
|
123
|
-
name: rspec
|
124
109
|
prerelease: false
|
125
|
-
|
110
|
+
version_requirements: !ruby/object:Gem::Requirement
|
111
|
+
none: false
|
112
|
+
requirements:
|
113
|
+
- - ! '>='
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: '0'
|
116
|
+
- !ruby/object:Gem::Dependency
|
117
|
+
name: rspec
|
118
|
+
requirement: !ruby/object:Gem::Requirement
|
126
119
|
none: false
|
127
|
-
requirements:
|
120
|
+
requirements:
|
128
121
|
- - ~>
|
129
|
-
- !ruby/object:Gem::Version
|
130
|
-
hash: 27
|
131
|
-
segments:
|
132
|
-
- 1
|
133
|
-
- 3
|
134
|
-
- 0
|
122
|
+
- !ruby/object:Gem::Version
|
135
123
|
version: 1.3.0
|
136
124
|
type: :development
|
137
|
-
version_requirements: *id007
|
138
|
-
- !ruby/object:Gem::Dependency
|
139
|
-
name: webmock
|
140
125
|
prerelease: false
|
141
|
-
|
126
|
+
version_requirements: !ruby/object:Gem::Requirement
|
142
127
|
none: false
|
143
|
-
requirements:
|
128
|
+
requirements:
|
144
129
|
- - ~>
|
145
|
-
- !ruby/object:Gem::Version
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 1.3.0
|
132
|
+
- !ruby/object:Gem::Dependency
|
133
|
+
name: webmock
|
134
|
+
requirement: !ruby/object:Gem::Requirement
|
135
|
+
none: false
|
136
|
+
requirements:
|
137
|
+
- - ~>
|
138
|
+
- !ruby/object:Gem::Version
|
151
139
|
version: 1.5.0
|
152
140
|
type: :development
|
153
|
-
|
141
|
+
prerelease: false
|
142
|
+
version_requirements: !ruby/object:Gem::Requirement
|
143
|
+
none: false
|
144
|
+
requirements:
|
145
|
+
- - ~>
|
146
|
+
- !ruby/object:Gem::Version
|
147
|
+
version: 1.5.0
|
154
148
|
description: Pi Command Line Tool
|
155
149
|
email: bstpaas@gmail.com
|
156
|
-
executables:
|
150
|
+
executables:
|
157
151
|
- pi
|
158
152
|
extensions: []
|
159
|
-
|
160
|
-
extra_rdoc_files:
|
153
|
+
extra_rdoc_files:
|
161
154
|
- README
|
162
|
-
files:
|
155
|
+
files:
|
163
156
|
- README
|
164
157
|
- Rakefile
|
165
|
-
- lib/
|
166
|
-
- lib/
|
158
|
+
- lib/pi.rb
|
159
|
+
- lib/pi/const.rb
|
160
|
+
- lib/pi/client.rb
|
161
|
+
- lib/cli/choose_helper.rb
|
167
162
|
- lib/cli/errors.rb
|
168
|
-
- lib/cli/
|
169
|
-
- lib/cli/
|
170
|
-
- lib/cli/
|
171
|
-
- lib/cli/commands/services.rb
|
172
|
-
- lib/cli/commands/dns.rb
|
173
|
-
- lib/cli/commands/apps.rb
|
163
|
+
- lib/cli/runner.rb
|
164
|
+
- lib/cli/config.rb
|
165
|
+
- lib/cli/interact_helper.rb
|
174
166
|
- lib/cli/commands/user.rb
|
167
|
+
- lib/cli/commands/apps.rb
|
168
|
+
- lib/cli/commands/base.rb
|
175
169
|
- lib/cli/commands/projects.rb
|
176
|
-
- lib/cli/
|
177
|
-
- lib/cli/
|
170
|
+
- lib/cli/commands/dns.rb
|
171
|
+
- lib/cli/commands/services.rb
|
172
|
+
- lib/cli/commands/misc.rb
|
173
|
+
- lib/cli/version.rb
|
178
174
|
- lib/cli/usage.rb
|
179
|
-
- lib/cli/
|
180
|
-
- lib/pi.rb
|
181
|
-
- lib/pi/const.rb
|
182
|
-
- lib/pi/client.rb
|
175
|
+
- lib/cli/core_ext.rb
|
183
176
|
- lib/cli.rb
|
184
177
|
- bin/pi
|
185
178
|
homepage: http://www.samsungcloud.org/
|
186
179
|
licenses: []
|
187
|
-
|
188
180
|
post_install_message:
|
189
181
|
rdoc_options: []
|
190
|
-
|
191
|
-
require_paths:
|
182
|
+
require_paths:
|
192
183
|
- lib
|
193
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
184
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
194
185
|
none: false
|
195
|
-
requirements:
|
196
|
-
- -
|
197
|
-
- !ruby/object:Gem::Version
|
198
|
-
|
199
|
-
|
200
|
-
- 0
|
201
|
-
version: "0"
|
202
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
186
|
+
requirements:
|
187
|
+
- - ! '>='
|
188
|
+
- !ruby/object:Gem::Version
|
189
|
+
version: '0'
|
190
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
203
191
|
none: false
|
204
|
-
requirements:
|
205
|
-
- -
|
206
|
-
- !ruby/object:Gem::Version
|
207
|
-
|
208
|
-
segments:
|
209
|
-
- 0
|
210
|
-
version: "0"
|
192
|
+
requirements:
|
193
|
+
- - ! '>='
|
194
|
+
- !ruby/object:Gem::Version
|
195
|
+
version: '0'
|
211
196
|
requirements: []
|
212
|
-
|
213
197
|
rubyforge_project:
|
214
|
-
rubygems_version: 1.8.
|
198
|
+
rubygems_version: 1.8.24
|
215
199
|
signing_key:
|
216
200
|
specification_version: 3
|
217
201
|
summary: Commandline tool that provides access to Samsung Cloud Platform.
|
218
202
|
test_files: []
|
219
|
-
|