manifests-vmc-plugin 0.4.18 → 0.4.19
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/lib/manifests-vmc-plugin.rb +18 -19
- data/lib/manifests-vmc-plugin/version.rb +1 -1
- metadata +4 -4
data/lib/manifests-vmc-plugin.rb
CHANGED
@@ -273,14 +273,15 @@ module VMCManifests
|
|
273
273
|
|
274
274
|
def ask_to_save(input, app)
|
275
275
|
return if manifest_file
|
276
|
+
return unless ask("Save configuration?", :default => false)
|
276
277
|
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
278
|
+
manifest = create_manifest_for(app, input[:path])
|
279
|
+
|
280
|
+
with_progress("Saving to #{c("manifest.yml", :name)}") do
|
281
|
+
File.open("manifest.yml", "w") do |io|
|
282
|
+
YAML.dump(
|
283
|
+
{ "applications" => [manifest] },
|
284
|
+
io)
|
284
285
|
end
|
285
286
|
end
|
286
287
|
end
|
@@ -308,7 +309,7 @@ module VMCManifests
|
|
308
309
|
def setup_services(app, info)
|
309
310
|
return if !info[:services] || info[:services].empty?
|
310
311
|
|
311
|
-
|
312
|
+
offerings = client.services
|
312
313
|
|
313
314
|
to_bind = []
|
314
315
|
|
@@ -318,16 +319,16 @@ module VMCManifests
|
|
318
319
|
if instance = client.service_instance_by_name(name)
|
319
320
|
to_bind << instance
|
320
321
|
else
|
321
|
-
|
322
|
-
|
323
|
-
(!svc[:version] ||
|
324
|
-
(
|
322
|
+
offering = offerings.find { |o|
|
323
|
+
o.label == (svc[:label] || svc[:type] || svc[:vendor]) &&
|
324
|
+
(!svc[:version] || o.version == svc[:version]) &&
|
325
|
+
(o.provider == (svc[:provider] || "core"))
|
325
326
|
}
|
326
327
|
|
327
|
-
fail "Unknown service: #{svc.inspect}." unless
|
328
|
+
fail "Unknown service offering: #{svc.inspect}." unless offering
|
328
329
|
|
329
330
|
if v2?
|
330
|
-
plan =
|
331
|
+
plan = offering.service_plans.find { |p|
|
331
332
|
p.name == (svc[:plan] || "D100")
|
332
333
|
}
|
333
334
|
|
@@ -336,17 +337,15 @@ module VMCManifests
|
|
336
337
|
|
337
338
|
invoke :create_service,
|
338
339
|
:name => name,
|
339
|
-
:
|
340
|
+
:offering => offering,
|
340
341
|
:plan => plan,
|
341
342
|
:app => app
|
342
343
|
end
|
343
344
|
end
|
344
345
|
|
345
|
-
to_bind.each do |
|
346
|
+
to_bind.each do |s|
|
346
347
|
# TODO: splat
|
347
|
-
invoke :bind_service,
|
348
|
-
:app => app,
|
349
|
-
:instance => i
|
348
|
+
invoke :bind_service, :app => app, :service => s
|
350
349
|
end
|
351
350
|
end
|
352
351
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: manifests-vmc-plugin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 41
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 19
|
10
|
+
version: 0.4.19
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Alex Suraci
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-12-
|
18
|
+
date: 2012-12-15 00:00:00 -08:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|