hula 0.13.0 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hula/service_broker/api.rb +9 -4
- data/lib/hula/service_broker/client.rb +5 -3
- data/lib/hula/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b4c38be76de983b5aaac31968971f1adab49693
|
4
|
+
data.tar.gz: 4d2e150bf75735b6ad6acf12d8a2da6f59806db7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2da7c1a0d091c6a03c06e3fff8f3c6424e21b71bd37eab7b367bf6ecacce0cd91445ffce55509410b1458d4522fb91926fc8a52c9059e855e70631a71010b17
|
7
|
+
data.tar.gz: 31421bf4cf6bf5ba0b56321a0335111e1096855043c26f6746fb5d177bdfb09fc634de85f5ae816ff8e40fb2656dd27fdecda380d3297eedf0757fc868c15a20
|
@@ -52,10 +52,12 @@ module Hula
|
|
52
52
|
http_deprovision_service(service_instance_id: service_instance.id, plan_id: plan.id, service_id: plan.service_id)
|
53
53
|
end
|
54
54
|
|
55
|
-
def bind_instance(service_instance, binding_id: SecureRandom.uuid)
|
55
|
+
def bind_instance(service_instance, plan, binding_id: SecureRandom.uuid)
|
56
56
|
result = http_bind_instance(
|
57
57
|
service_instance_id: service_instance.id,
|
58
|
-
binding_id: binding_id
|
58
|
+
binding_id: binding_id,
|
59
|
+
service_id: plan.service_id,
|
60
|
+
plan_id: plan.id
|
59
61
|
)
|
60
62
|
|
61
63
|
InstanceBinding.new(
|
@@ -105,10 +107,13 @@ module Hula
|
|
105
107
|
)
|
106
108
|
end
|
107
109
|
|
108
|
-
def http_bind_instance(service_instance_id:, binding_id:)
|
110
|
+
def http_bind_instance(service_instance_id:, binding_id:, service_id:, plan_id:)
|
109
111
|
http_client.put(
|
110
112
|
url_for("/v2/service_instances/#{service_instance_id}/service_bindings/#{binding_id}"),
|
111
|
-
body: {
|
113
|
+
body: {
|
114
|
+
service_id: service_id,
|
115
|
+
plan_id: plan_id,
|
116
|
+
},
|
112
117
|
auth: { username: username, password: password },
|
113
118
|
headers: { 'X-Broker-Api-Version': @broker_api_version }
|
114
119
|
)
|
@@ -32,8 +32,10 @@ module Hula
|
|
32
32
|
|
33
33
|
def provision_and_bind(service_name, plan_name, &block)
|
34
34
|
raise Error, 'no block given' unless block_given?
|
35
|
+
plan = catalog.service_plan(service_name, plan_name)
|
36
|
+
|
35
37
|
provision_instance(service_name, plan_name) do |service_instance|
|
36
|
-
bind_instance(service_instance, &block)
|
38
|
+
bind_instance(service_instance, plan, &block)
|
37
39
|
end
|
38
40
|
end
|
39
41
|
|
@@ -49,8 +51,8 @@ module Hula
|
|
49
51
|
end
|
50
52
|
end
|
51
53
|
|
52
|
-
def bind_instance(service_instance, &block)
|
53
|
-
binding = api.bind_instance(service_instance)
|
54
|
+
def bind_instance(service_instance, plan, &block)
|
55
|
+
binding = api.bind_instance(service_instance, plan)
|
54
56
|
return binding unless block
|
55
57
|
|
56
58
|
begin
|
data/lib/hula/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hula
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Will Pragnell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|