cf 5.0.0.rc4 → 5.1.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,3 +3,4 @@ require "admin/guid"
3
3
  require "admin/set_quota"
4
4
  require "admin/service_auth_token"
5
5
  require "admin/service_broker/add"
6
+ require "admin/service_broker/service_brokers"
@@ -0,0 +1,23 @@
1
+ require "cf/cli"
2
+
3
+ module CFAdmin::ServiceBroker
4
+ class ServiceBrokers < CF::CLI
5
+ def precondition
6
+ check_target
7
+ end
8
+
9
+ desc "List Registered Service Brokers."
10
+ group :admin
11
+
12
+ def service_brokers
13
+ brokers = client.service_brokers
14
+ table(
15
+ %w(name url),
16
+ brokers.collect { |broker|
17
+ [c(broker.name, :name), broker.broker_url]
18
+ }
19
+ )
20
+ end
21
+
22
+ end
23
+ end
@@ -1,3 +1,3 @@
1
1
  module CF
2
- VERSION = "5.0.0.rc4".freeze
2
+ VERSION = "5.1.0.rc1".freeze
3
3
  end
@@ -0,0 +1,32 @@
1
+ require "spec_helper"
2
+
3
+ describe CFAdmin::ServiceBroker::ServiceBrokers do
4
+ let(:fake_home_dir) { "#{SPEC_ROOT}/fixtures/fake_admin_dir" }
5
+
6
+ stub_home_dir_with { fake_home_dir }
7
+
8
+ let(:client) { build(:client) }
9
+
10
+ before do
11
+ CFAdmin::ServiceBroker::ServiceBrokers.client = client
12
+ end
13
+
14
+ context "when there are no brokers registered" do
15
+ let(:brokers_data) { [] }
16
+ it "says there are no brokers" do
17
+ client.should_receive(:service_brokers).and_return(brokers_data)
18
+ cf %W[service-brokers]
19
+ expect(stdout.string).to eq("name url\n")
20
+ end
21
+ end
22
+
23
+ context "when there are brokers registered" do
24
+ let(:brokers_data) { [ double(guid: 'guiddy', name: 'mysql', broker_url: 'http://mysql.example.com/') ] }
25
+
26
+ it "lists the brokers" do
27
+ client.should_receive(:service_brokers).and_return(brokers_data)
28
+ cf %W[service-brokers]
29
+ expect(stdout.string).to match(/mysql.*mysql.example.com/)
30
+ end
31
+ end
32
+ end
@@ -8,28 +8,41 @@ describe "Service Broker Management", components: [:nats, :uaa, :ccng] do
8
8
  before do
9
9
  create_user_in_ccng
10
10
  logout
11
- end
12
-
13
- after do
14
- logout
15
- end
16
11
 
17
- it "allows an admin user to add a service broker" do
18
12
  BlueShell::Runner.run("#{cf_bin} target #{target}") do |runner|
19
13
  runner.wait_for_exit
20
-
21
14
  expect(runner).to be_successful
22
15
  end
23
16
 
24
17
  BlueShell::Runner.run("#{cf_bin} login #{username} --password #{password}") do |runner|
25
18
  expect(runner).to say "Authenticating... OK"
26
19
  end
20
+ end
27
21
 
22
+ after do
23
+ logout
24
+ end
25
+
26
+ it "allows an admin user to add a service broker" do
28
27
  BlueShell::Runner.run("#{cf_bin} add-service-broker --name cf-mysql --url http://cf-mysql.cfapp.io --token cfmysqlsecret") do |runner|
29
28
  expect(runner).to say "... OK"
30
29
  end
31
30
  end
32
-
31
+
32
+ context "with some service brokers already registered" do
33
+ before do
34
+ BlueShell::Runner.run("#{cf_bin} add-service-broker --name cf-mysql --url http://cf-mysql.cfapp.io --token cfmysqlsecret") do |runner|
35
+ expect(runner).to say "... OK"
36
+ end
37
+ end
38
+
39
+ it "allows an admin user to list service brokers" do
40
+ BlueShell::Runner.run("#{cf_bin} service-brokers") do |runner|
41
+ expect(runner).to say /cf-mysql.*cf-mysql.cfapp.io/
42
+ end
43
+ end
44
+ end
45
+
33
46
  def create_user_in_ccng
34
47
  ccng_post "/v2/users", {
35
48
  guid: user_guid
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cf
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0.rc4
4
+ version: 5.1.0.rc1
5
+ prerelease: 6
5
6
  platform: ruby
6
7
  authors:
7
8
  - Cloud Foundry Team
@@ -14,6 +15,7 @@ dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: addressable
16
17
  requirement: !ruby/object:Gem::Requirement
18
+ none: false
17
19
  requirements:
18
20
  - - ~>
19
21
  - !ruby/object:Gem::Version
@@ -21,6 +23,7 @@ dependencies:
21
23
  type: :runtime
22
24
  prerelease: false
23
25
  version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
24
27
  requirements:
25
28
  - - ~>
26
29
  - !ruby/object:Gem::Version
@@ -28,6 +31,7 @@ dependencies:
28
31
  - !ruby/object:Gem::Dependency
29
32
  name: caldecott-client
30
33
  requirement: !ruby/object:Gem::Requirement
34
+ none: false
31
35
  requirements:
32
36
  - - ~>
33
37
  - !ruby/object:Gem::Version
@@ -35,6 +39,7 @@ dependencies:
35
39
  type: :runtime
36
40
  prerelease: false
37
41
  version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
38
43
  requirements:
39
44
  - - ~>
40
45
  - !ruby/object:Gem::Version
@@ -42,6 +47,7 @@ dependencies:
42
47
  - !ruby/object:Gem::Dependency
43
48
  name: cfoundry
44
49
  requirement: !ruby/object:Gem::Requirement
50
+ none: false
45
51
  requirements:
46
52
  - - ~>
47
53
  - !ruby/object:Gem::Version
@@ -49,6 +55,7 @@ dependencies:
49
55
  type: :runtime
50
56
  prerelease: false
51
57
  version_requirements: !ruby/object:Gem::Requirement
58
+ none: false
52
59
  requirements:
53
60
  - - ~>
54
61
  - !ruby/object:Gem::Version
@@ -56,6 +63,7 @@ dependencies:
56
63
  - !ruby/object:Gem::Dependency
57
64
  name: interact
58
65
  requirement: !ruby/object:Gem::Requirement
66
+ none: false
59
67
  requirements:
60
68
  - - ~>
61
69
  - !ruby/object:Gem::Version
@@ -63,6 +71,7 @@ dependencies:
63
71
  type: :runtime
64
72
  prerelease: false
65
73
  version_requirements: !ruby/object:Gem::Requirement
74
+ none: false
66
75
  requirements:
67
76
  - - ~>
68
77
  - !ruby/object:Gem::Version
@@ -70,6 +79,7 @@ dependencies:
70
79
  - !ruby/object:Gem::Dependency
71
80
  name: json_pure
72
81
  requirement: !ruby/object:Gem::Requirement
82
+ none: false
73
83
  requirements:
74
84
  - - ~>
75
85
  - !ruby/object:Gem::Version
@@ -77,6 +87,7 @@ dependencies:
77
87
  type: :runtime
78
88
  prerelease: false
79
89
  version_requirements: !ruby/object:Gem::Requirement
90
+ none: false
80
91
  requirements:
81
92
  - - ~>
82
93
  - !ruby/object:Gem::Version
@@ -84,6 +95,7 @@ dependencies:
84
95
  - !ruby/object:Gem::Dependency
85
96
  name: mothership
86
97
  requirement: !ruby/object:Gem::Requirement
98
+ none: false
87
99
  requirements:
88
100
  - - ! '>='
89
101
  - !ruby/object:Gem::Version
@@ -94,6 +106,7 @@ dependencies:
94
106
  type: :runtime
95
107
  prerelease: false
96
108
  version_requirements: !ruby/object:Gem::Requirement
109
+ none: false
97
110
  requirements:
98
111
  - - ! '>='
99
112
  - !ruby/object:Gem::Version
@@ -104,6 +117,7 @@ dependencies:
104
117
  - !ruby/object:Gem::Dependency
105
118
  name: multi_json
106
119
  requirement: !ruby/object:Gem::Requirement
120
+ none: false
107
121
  requirements:
108
122
  - - ~>
109
123
  - !ruby/object:Gem::Version
@@ -111,6 +125,7 @@ dependencies:
111
125
  type: :runtime
112
126
  prerelease: false
113
127
  version_requirements: !ruby/object:Gem::Requirement
128
+ none: false
114
129
  requirements:
115
130
  - - ~>
116
131
  - !ruby/object:Gem::Version
@@ -118,6 +133,7 @@ dependencies:
118
133
  - !ruby/object:Gem::Dependency
119
134
  name: rest-client
120
135
  requirement: !ruby/object:Gem::Requirement
136
+ none: false
121
137
  requirements:
122
138
  - - ~>
123
139
  - !ruby/object:Gem::Version
@@ -125,6 +141,7 @@ dependencies:
125
141
  type: :runtime
126
142
  prerelease: false
127
143
  version_requirements: !ruby/object:Gem::Requirement
144
+ none: false
128
145
  requirements:
129
146
  - - ~>
130
147
  - !ruby/object:Gem::Version
@@ -132,6 +149,7 @@ dependencies:
132
149
  - !ruby/object:Gem::Dependency
133
150
  name: uuidtools
134
151
  requirement: !ruby/object:Gem::Requirement
152
+ none: false
135
153
  requirements:
136
154
  - - ~>
137
155
  - !ruby/object:Gem::Version
@@ -139,6 +157,7 @@ dependencies:
139
157
  type: :runtime
140
158
  prerelease: false
141
159
  version_requirements: !ruby/object:Gem::Requirement
160
+ none: false
142
161
  requirements:
143
162
  - - ~>
144
163
  - !ruby/object:Gem::Version
@@ -146,6 +165,7 @@ dependencies:
146
165
  - !ruby/object:Gem::Dependency
147
166
  name: blue-shell
148
167
  requirement: !ruby/object:Gem::Requirement
168
+ none: false
149
169
  requirements:
150
170
  - - ! '>='
151
171
  - !ruby/object:Gem::Version
@@ -153,6 +173,7 @@ dependencies:
153
173
  type: :development
154
174
  prerelease: false
155
175
  version_requirements: !ruby/object:Gem::Requirement
176
+ none: false
156
177
  requirements:
157
178
  - - ! '>='
158
179
  - !ruby/object:Gem::Version
@@ -160,6 +181,7 @@ dependencies:
160
181
  - !ruby/object:Gem::Dependency
161
182
  name: factory_girl
162
183
  requirement: !ruby/object:Gem::Requirement
184
+ none: false
163
185
  requirements:
164
186
  - - ! '>='
165
187
  - !ruby/object:Gem::Version
@@ -167,6 +189,7 @@ dependencies:
167
189
  type: :development
168
190
  prerelease: false
169
191
  version_requirements: !ruby/object:Gem::Requirement
192
+ none: false
170
193
  requirements:
171
194
  - - ! '>='
172
195
  - !ruby/object:Gem::Version
@@ -174,6 +197,7 @@ dependencies:
174
197
  - !ruby/object:Gem::Dependency
175
198
  name: fakefs
176
199
  requirement: !ruby/object:Gem::Requirement
200
+ none: false
177
201
  requirements:
178
202
  - - ~>
179
203
  - !ruby/object:Gem::Version
@@ -181,6 +205,7 @@ dependencies:
181
205
  type: :development
182
206
  prerelease: false
183
207
  version_requirements: !ruby/object:Gem::Requirement
208
+ none: false
184
209
  requirements:
185
210
  - - ~>
186
211
  - !ruby/object:Gem::Version
@@ -188,6 +213,7 @@ dependencies:
188
213
  - !ruby/object:Gem::Dependency
189
214
  name: ffaker
190
215
  requirement: !ruby/object:Gem::Requirement
216
+ none: false
191
217
  requirements:
192
218
  - - '='
193
219
  - !ruby/object:Gem::Version
@@ -195,6 +221,7 @@ dependencies:
195
221
  type: :development
196
222
  prerelease: false
197
223
  version_requirements: !ruby/object:Gem::Requirement
224
+ none: false
198
225
  requirements:
199
226
  - - '='
200
227
  - !ruby/object:Gem::Version
@@ -202,6 +229,7 @@ dependencies:
202
229
  - !ruby/object:Gem::Dependency
203
230
  name: gem-release
204
231
  requirement: !ruby/object:Gem::Requirement
232
+ none: false
205
233
  requirements:
206
234
  - - ! '>='
207
235
  - !ruby/object:Gem::Version
@@ -209,6 +237,7 @@ dependencies:
209
237
  type: :development
210
238
  prerelease: false
211
239
  version_requirements: !ruby/object:Gem::Requirement
240
+ none: false
212
241
  requirements:
213
242
  - - ! '>='
214
243
  - !ruby/object:Gem::Version
@@ -216,6 +245,7 @@ dependencies:
216
245
  - !ruby/object:Gem::Dependency
217
246
  name: rake
218
247
  requirement: !ruby/object:Gem::Requirement
248
+ none: false
219
249
  requirements:
220
250
  - - ~>
221
251
  - !ruby/object:Gem::Version
@@ -223,6 +253,7 @@ dependencies:
223
253
  type: :development
224
254
  prerelease: false
225
255
  version_requirements: !ruby/object:Gem::Requirement
256
+ none: false
226
257
  requirements:
227
258
  - - ~>
228
259
  - !ruby/object:Gem::Version
@@ -230,6 +261,7 @@ dependencies:
230
261
  - !ruby/object:Gem::Dependency
231
262
  name: rspec
232
263
  requirement: !ruby/object:Gem::Requirement
264
+ none: false
233
265
  requirements:
234
266
  - - ~>
235
267
  - !ruby/object:Gem::Version
@@ -237,6 +269,7 @@ dependencies:
237
269
  type: :development
238
270
  prerelease: false
239
271
  version_requirements: !ruby/object:Gem::Requirement
272
+ none: false
240
273
  requirements:
241
274
  - - ~>
242
275
  - !ruby/object:Gem::Version
@@ -244,6 +277,7 @@ dependencies:
244
277
  - !ruby/object:Gem::Dependency
245
278
  name: rspec-instafail
246
279
  requirement: !ruby/object:Gem::Requirement
280
+ none: false
247
281
  requirements:
248
282
  - - ~>
249
283
  - !ruby/object:Gem::Version
@@ -251,6 +285,7 @@ dependencies:
251
285
  type: :development
252
286
  prerelease: false
253
287
  version_requirements: !ruby/object:Gem::Requirement
288
+ none: false
254
289
  requirements:
255
290
  - - ~>
256
291
  - !ruby/object:Gem::Version
@@ -258,6 +293,7 @@ dependencies:
258
293
  - !ruby/object:Gem::Dependency
259
294
  name: webmock
260
295
  requirement: !ruby/object:Gem::Requirement
296
+ none: false
261
297
  requirements:
262
298
  - - ~>
263
299
  - !ruby/object:Gem::Version
@@ -265,6 +301,7 @@ dependencies:
265
301
  type: :development
266
302
  prerelease: false
267
303
  version_requirements: !ruby/object:Gem::Requirement
304
+ none: false
268
305
  requirements:
269
306
  - - ~>
270
307
  - !ruby/object:Gem::Version
@@ -272,6 +309,7 @@ dependencies:
272
309
  - !ruby/object:Gem::Dependency
273
310
  name: httpclient
274
311
  requirement: !ruby/object:Gem::Requirement
312
+ none: false
275
313
  requirements:
276
314
  - - ~>
277
315
  - !ruby/object:Gem::Version
@@ -279,6 +317,7 @@ dependencies:
279
317
  type: :development
280
318
  prerelease: false
281
319
  version_requirements: !ruby/object:Gem::Requirement
320
+ none: false
282
321
  requirements:
283
322
  - - ~>
284
323
  - !ruby/object:Gem::Version
@@ -286,6 +325,7 @@ dependencies:
286
325
  - !ruby/object:Gem::Dependency
287
326
  name: yajl-ruby
288
327
  requirement: !ruby/object:Gem::Requirement
328
+ none: false
289
329
  requirements:
290
330
  - - ! '>='
291
331
  - !ruby/object:Gem::Version
@@ -293,6 +333,7 @@ dependencies:
293
333
  type: :development
294
334
  prerelease: false
295
335
  version_requirements: !ruby/object:Gem::Requirement
336
+ none: false
296
337
  requirements:
297
338
  - - ! '>='
298
339
  - !ruby/object:Gem::Version
@@ -300,6 +341,7 @@ dependencies:
300
341
  - !ruby/object:Gem::Dependency
301
342
  name: nats
302
343
  requirement: !ruby/object:Gem::Requirement
344
+ none: false
303
345
  requirements:
304
346
  - - ! '>='
305
347
  - !ruby/object:Gem::Version
@@ -307,6 +349,7 @@ dependencies:
307
349
  type: :development
308
350
  prerelease: false
309
351
  version_requirements: !ruby/object:Gem::Requirement
352
+ none: false
310
353
  requirements:
311
354
  - - ! '>='
312
355
  - !ruby/object:Gem::Version
@@ -314,6 +357,7 @@ dependencies:
314
357
  - !ruby/object:Gem::Dependency
315
358
  name: typhoeus
316
359
  requirement: !ruby/object:Gem::Requirement
360
+ none: false
317
361
  requirements:
318
362
  - - ! '>='
319
363
  - !ruby/object:Gem::Version
@@ -321,6 +365,7 @@ dependencies:
321
365
  type: :development
322
366
  prerelease: false
323
367
  version_requirements: !ruby/object:Gem::Requirement
368
+ none: false
324
369
  requirements:
325
370
  - - ! '>='
326
371
  - !ruby/object:Gem::Version
@@ -328,6 +373,7 @@ dependencies:
328
373
  - !ruby/object:Gem::Dependency
329
374
  name: anchorman
330
375
  requirement: !ruby/object:Gem::Requirement
376
+ none: false
331
377
  requirements:
332
378
  - - ! '>='
333
379
  - !ruby/object:Gem::Version
@@ -335,6 +381,7 @@ dependencies:
335
381
  type: :development
336
382
  prerelease: false
337
383
  version_requirements: !ruby/object:Gem::Requirement
384
+ none: false
338
385
  requirements:
339
386
  - - ! '>='
340
387
  - !ruby/object:Gem::Version
@@ -355,6 +402,7 @@ files:
355
402
  - lib/admin/README.md
356
403
  - lib/admin/service_auth_token.rb
357
404
  - lib/admin/service_broker/add.rb
405
+ - lib/admin/service_broker/service_brokers.rb
358
406
  - lib/admin/set_quota.rb
359
407
  - lib/cf/cli/app/app.rb
360
408
  - lib/cf/cli/app/apps.rb
@@ -469,6 +517,7 @@ files:
469
517
  - spec/admin/curl_spec.rb
470
518
  - spec/admin/guid_spec.rb
471
519
  - spec/admin/service_broker/add_spec.rb
520
+ - spec/admin/service_broker/service_brokers_spec.rb
472
521
  - spec/admin/set_quota_spec.rb
473
522
  - spec/assets/env/env_test.rb
474
523
  - spec/assets/env/Gemfile
@@ -631,31 +680,36 @@ files:
631
680
  homepage: http://github.com/cloudfoundry/cf
632
681
  licenses:
633
682
  - Apache 2.0
634
- metadata: {}
635
683
  post_install_message:
636
684
  rdoc_options: []
637
685
  require_paths:
638
686
  - lib
639
687
  required_ruby_version: !ruby/object:Gem::Requirement
688
+ none: false
640
689
  requirements:
641
690
  - - ! '>='
642
691
  - !ruby/object:Gem::Version
643
692
  version: '0'
693
+ segments:
694
+ - 0
695
+ hash: 2798281479240975836
644
696
  required_rubygems_version: !ruby/object:Gem::Requirement
697
+ none: false
645
698
  requirements:
646
699
  - - ! '>'
647
700
  - !ruby/object:Gem::Version
648
701
  version: 1.3.1
649
702
  requirements: []
650
703
  rubyforge_project: cf
651
- rubygems_version: 2.0.5
704
+ rubygems_version: 1.8.25
652
705
  signing_key:
653
- specification_version: 4
706
+ specification_version: 3
654
707
  summary: Friendly command-line interface for Cloud Foundry.
655
708
  test_files:
656
709
  - spec/admin/curl_spec.rb
657
710
  - spec/admin/guid_spec.rb
658
711
  - spec/admin/service_broker/add_spec.rb
712
+ - spec/admin/service_broker/service_brokers_spec.rb
659
713
  - spec/admin/set_quota_spec.rb
660
714
  - spec/assets/env/env_test.rb
661
715
  - spec/assets/env/Gemfile
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NWNjYmY2YzgzNDMyM2FmZDIyMmI2NDk4YzcxZWI1NmNmNTZmMzY0ZQ==
5
- data.tar.gz: !binary |-
6
- ZTlmOWVjYmJlMDdmNzQwZTk2ZGNjYWYxZTQ2MTZkZDNmYzg1NTdiYg==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- NWVhNmNiZmM4M2FiMzcxYmQ3NGY1ZDRmMzQ3MWRiYTQ5YmJhOWJmMTZjNTRi
10
- ZDA3ZTI3NDZmM2YwYmE4NWQ1Y2ExZWYwMGEwMmJiMWM5Y2MwNTNmMzAwNTRl
11
- YjQ0NjEyZjIzZDVhOGQ5MjkxNmM3ZWM3M2Y5MGYyYmVkNGE1MGM=
12
- data.tar.gz: !binary |-
13
- MGIxOTIyNjBjN2EyOTk3NzkwMmZjNzI3ZGEyNWUwMzkzYmQzYzdkOTJlZTEy
14
- NTE0ZTA2ZWExZTE5OTM4YmU1NjhhOTIyMDFlNjM1NWM4NjZmODBmMDM4MjQ4
15
- OGE3NDk1YjViOGY4M2NkY2Q4NTdmMjVmMWQ5MGQ3NGUxNmE5ZTk=