Skip to content
Browse files

Consolidate the provision and binding response format

Change-Id: I3e668de5d5e400d048c78e7a45f7ecf2b02b74d5
  • Loading branch information...
1 parent ba11bc6 commit b0cc19d5520c9849600dbd8cf2883bff66d7643e Tang Rui committed Jul 24, 2012
Showing with 6 additions and 11 deletions.
  1. +2 −2 lib/services/api/clients/service_gateway_client.rb
  2. +3 −8 lib/services/api/messages.rb
  3. +1 −1 vcap_common.gemspec
View
4 lib/services/api/clients/service_gateway_client.rb
@@ -75,7 +75,7 @@ def initialize(url, token, timeout, opts={})
def provision(args)
msg = GatewayProvisionRequest.new(args)
resp = perform_request(:post, '/gateway/v1/configurations', msg)
- GatewayProvisionResponse.decode(resp)
+ GatewayHandleResponse.decode(resp)
end
def unprovision(args)
@@ -136,7 +136,7 @@ def job_info(args)
def bind(args)
msg = GatewayBindRequest.new(args)
resp = perform_request(:post, "/gateway/v1/configurations/#{msg.service_id}/handles", msg)
- GatewayBindResponse.decode(resp)
+ GatewayHandleResponse.decode(resp)
end
def unbind(args)
View
11 lib/services/api/messages.rb
@@ -81,9 +81,10 @@ class GatewayProvisionRequest < JsonMessage
optional :version, String
end
- class GatewayProvisionResponse < JsonMessage
+ # Provision and bind response use the same format
+ class GatewayHandleResponse < JsonMessage
required :service_id, String
- required :data
+ required :configuration
required :credentials
end
@@ -114,12 +115,6 @@ class CloudControllerBindResponse < JsonMessage
required :binding_token, String
end
- class GatewayBindResponse < JsonMessage
- required :service_id, String
- required :configuration
- required :credentials
- end
-
# Bind app_name using binding_token
class BindExternalRequest < JsonMessage
required :binding_token, String
View
2 vcap_common.gemspec
@@ -1,6 +1,6 @@
spec = Gem::Specification.new do |s|
s.name = 'vcap_common'
- s.version = '2.0.3'
+ s.version = '2.0.4'
s.date = '2012-07-05'
s.summary = 'vcap common'
s.homepage = "http://github.com/vmware-ac/core"

0 comments on commit b0cc19d

Please sign in to comment.
Something went wrong with that request. Please try again.