vmc 0.4.0.beta.28 → 0.4.0.beta.29
Sign up to get free protection for your applications and to get access to all the features.
- data/vmc-ng/lib/vmc/cli/service.rb +25 -25
- data/vmc-ng/lib/vmc/version.rb +1 -1
- metadata +7 -7
@@ -25,15 +25,13 @@ module VMC
|
|
25
25
|
|
26
26
|
desc "List your service instances"
|
27
27
|
group :services
|
28
|
-
input :name, :desc => "Filter by name
|
29
|
-
input :
|
30
|
-
input :service, :desc => "Filter by service regexp"
|
28
|
+
input :name, :desc => "Filter by name"
|
29
|
+
input :service, :desc => "Filter by service type"
|
31
30
|
input :plan, :desc => "Filter by service plan"
|
32
31
|
input :provider, :desc => "Filter by service provider"
|
33
32
|
input :version, :desc => "Filter by service version"
|
34
|
-
|
35
|
-
|
36
|
-
input :tier, :desc => "Filter by service tier regexp"
|
33
|
+
input :app, :desc => "Limit to application's service bindings",
|
34
|
+
:from_given => by_name("app")
|
37
35
|
def services(input)
|
38
36
|
instances =
|
39
37
|
with_progress("Getting service instances") do
|
@@ -271,37 +269,39 @@ module VMC
|
|
271
269
|
|
272
270
|
def instance_matches(i, options)
|
273
271
|
if app = options[:app]
|
274
|
-
return false
|
275
|
-
b.app.name == app
|
276
|
-
}
|
272
|
+
return false unless app.services.include? i
|
277
273
|
end
|
278
274
|
|
279
275
|
if name = options[:name]
|
280
|
-
return false
|
276
|
+
return false unless File.fnmatch(name, i.name)
|
281
277
|
end
|
282
278
|
|
283
|
-
|
284
|
-
return false if i.service_plan.service.label !~ /#{service}/
|
285
|
-
end
|
279
|
+
plan = i.service_plan if v2?
|
286
280
|
|
287
|
-
if
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
281
|
+
if service = options[:service]
|
282
|
+
if v2?
|
283
|
+
return false unless File.fnmatch(service, plan.service.label)
|
284
|
+
else
|
285
|
+
return false unless File.fnmatch(service, i.vendor)
|
286
|
+
end
|
293
287
|
end
|
294
288
|
|
295
|
-
if
|
296
|
-
|
289
|
+
if plan = options[:plan]
|
290
|
+
fail "--plan is not supported on this target" unless v2?
|
291
|
+
return false unless File.fnmatch(plan.upcase, plan.name.upcase)
|
297
292
|
end
|
298
293
|
|
299
|
-
if
|
300
|
-
|
294
|
+
if provider = options[:provider]
|
295
|
+
fail "--provider is not supported on this target" unless v2?
|
296
|
+
return false unless File.fnmatch(provider, plan.service.provider)
|
301
297
|
end
|
302
298
|
|
303
|
-
if
|
304
|
-
|
299
|
+
if version = options[:version]
|
300
|
+
if v2?
|
301
|
+
return false unless File.fnmatch(version, plan.service.version)
|
302
|
+
else
|
303
|
+
return false unless File.fnmatch(version, i.version)
|
304
|
+
end
|
305
305
|
end
|
306
306
|
|
307
307
|
true
|
data/vmc-ng/lib/vmc/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vmc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 62196441
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
9
|
- 0
|
10
10
|
- beta
|
11
|
-
-
|
12
|
-
version: 0.4.0.beta.
|
11
|
+
- 29
|
12
|
+
version: 0.4.0.beta.29
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- VMware
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2012-07-
|
20
|
+
date: 2012-07-30 00:00:00 Z
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
23
23
|
name: json_pure
|
@@ -249,12 +249,12 @@ dependencies:
|
|
249
249
|
requirements:
|
250
250
|
- - ~>
|
251
251
|
- !ruby/object:Gem::Version
|
252
|
-
hash:
|
252
|
+
hash: 49
|
253
253
|
segments:
|
254
254
|
- 0
|
255
255
|
- 3
|
256
|
-
-
|
257
|
-
version: 0.3.
|
256
|
+
- 17
|
257
|
+
version: 0.3.17
|
258
258
|
type: :runtime
|
259
259
|
version_requirements: *id014
|
260
260
|
- !ruby/object:Gem::Dependency
|