Permalink
Browse files

Use new provision response format

Change-Id: Ib1fa1fa3d1be93770463e648f0f8d538aafeca26
  • Loading branch information...
1 parent adec879 commit 9295d1204d8e26a9380c66b16acac2a96ea10355 Tang Rui committed Jul 30, 2012
Showing with 169 additions and 122 deletions.
  1. +2 −2 atmos/Gemfile
  2. +9 −5 atmos/Gemfile.lock
  3. +1 −8 atmos/lib/atmos_service/provisioner.rb
  4. BIN atmos/vendor/cache/httpclient-2.2.5.gem
  5. BIN atmos/vendor/cache/membrane-0.0.2.gem
  6. +2 −2 couchdb/Gemfile
  7. +9 −5 couchdb/Gemfile.lock
  8. BIN couchdb/vendor/cache/httpclient-2.2.5.gem
  9. BIN couchdb/vendor/cache/membrane-0.0.2.gem
  10. +2 −2 echo/Gemfile
  11. +9 −5 echo/Gemfile.lock
  12. BIN echo/vendor/cache/httpclient-2.2.5.gem
  13. BIN echo/vendor/cache/membrane-0.0.2.gem
  14. +2 −2 elasticsearch/Gemfile
  15. +9 −5 elasticsearch/Gemfile.lock
  16. BIN elasticsearch/vendor/cache/httpclient-2.2.5.gem
  17. BIN elasticsearch/vendor/cache/membrane-0.0.2.gem
  18. +2 −2 filesystem/Gemfile
  19. +9 −5 filesystem/Gemfile.lock
  20. +1 −7 filesystem/lib/filesystem_service/base_provisioner.rb
  21. +1 −1 filesystem/spec/provisioner_spec.rb
  22. BIN filesystem/vendor/cache/httpclient-2.2.5.gem
  23. BIN filesystem/vendor/cache/membrane-0.0.2.gem
  24. +2 −2 memcached/Gemfile
  25. +9 −5 memcached/Gemfile.lock
  26. BIN memcached/vendor/cache/httpclient-2.2.5.gem
  27. BIN memcached/vendor/cache/membrane-0.0.2.gem
  28. +2 −2 mongodb/Gemfile
  29. +9 −5 mongodb/Gemfile.lock
  30. BIN mongodb/vendor/cache/httpclient-2.2.5.gem
  31. BIN mongodb/vendor/cache/membrane-0.0.2.gem
  32. +2 −2 mysql/Gemfile
  33. +9 −5 mysql/Gemfile.lock
  34. BIN mysql/vendor/cache/httpclient-2.2.5.gem
  35. BIN mysql/vendor/cache/membrane-0.0.2.gem
  36. +2 −2 neo4j/Gemfile
  37. +9 −5 neo4j/Gemfile.lock
  38. BIN neo4j/vendor/cache/httpclient-2.2.5.gem
  39. BIN neo4j/vendor/cache/membrane-0.0.2.gem
  40. +2 −2 postgresql/Gemfile
  41. +9 −5 postgresql/Gemfile.lock
  42. BIN postgresql/vendor/cache/httpclient-2.2.5.gem
  43. BIN postgresql/vendor/cache/membrane-0.0.2.gem
  44. +2 −2 rabbit/Gemfile
  45. +9 −5 rabbit/Gemfile.lock
  46. BIN rabbit/vendor/cache/httpclient-2.2.5.gem
  47. BIN rabbit/vendor/cache/membrane-0.0.2.gem
  48. +2 −2 redis/Gemfile
  49. +9 −5 redis/Gemfile.lock
  50. BIN redis/vendor/cache/httpclient-2.2.5.gem
  51. BIN redis/vendor/cache/membrane-0.0.2.gem
  52. +2 −2 service_broker/Gemfile
  53. +9 −5 service_broker/Gemfile.lock
  54. +1 −1 service_broker/lib/service_broker/async_gateway.rb
  55. BIN service_broker/vendor/cache/httpclient-2.2.5.gem
  56. BIN service_broker/vendor/cache/membrane-0.0.2.gem
  57. +2 −2 tools/backup/manager/Gemfile
  58. +9 −5 tools/backup/manager/Gemfile.lock
  59. BIN tools/backup/manager/vendor/cache/httpclient-2.2.5.gem
  60. BIN tools/backup/manager/vendor/cache/membrane-0.0.2.gem
  61. +2 −2 vblob/Gemfile
  62. +9 −5 vblob/Gemfile.lock
  63. BIN vblob/vendor/cache/httpclient-2.2.5.gem
  64. BIN vblob/vendor/cache/membrane-0.0.2.gem
View
@@ -11,9 +11,9 @@ gem "sinatra"
gem "thin"
gem "xml-simple"
-gem 'vcap_common', :require => ['vcap/common', 'vcap/component'], :git => 'git://github.com/cloudfoundry/vcap-common.git', :ref => 'b7e3508eb9'
+gem 'vcap_common', :require => ['vcap/common', 'vcap/component'], :git => 'git://github.com/cloudfoundry/vcap-common.git', :ref => 'b0cc19d5'
gem 'vcap_logging', :require => ['vcap/logging'], :git => 'git://github.com/cloudfoundry/common.git', :ref => 'b96ec1192'
-gem 'vcap_services_base', :git => 'git://github.com/cloudfoundry/vcap-services-base.git', :ref => '4db4cc92ce'
+gem 'vcap_services_base', :git => 'git://github.com/cloudfoundry/vcap-services-base.git', :ref => 'b8a47d1b'
gem 'warden-client', :require => ['warden/client'], :git => 'git://github.com/cloudfoundry/warden.git', :ref => 'd8334ce8a3'
gem 'warden-protocol', :require => ['warden/protocol'], :git => 'git://github.com/cloudfoundry/warden.git', :ref => 'd8334ce8a3'
View
@@ -15,20 +15,22 @@ GIT
GIT
remote: git://github.com/cloudfoundry/vcap-common.git
- revision: b7e3508eb96b86162ca385f1f46a13ecfcce359d
- ref: b7e3508eb9
+ revision: b0cc19d5520c9849600dbd8cf2883bff66d7643e
+ ref: b0cc19d5
specs:
- vcap_common (1.0.14)
+ vcap_common (2.0.4)
eventmachine
+ httpclient
+ membrane (~> 0.0.2)
nats (~> 0.4.22.beta.8)
posix-spawn (~> 0.3.6)
thin (~> 1.3.1)
yajl-ruby (~> 0.8.3)
GIT
remote: git://github.com/cloudfoundry/vcap-services-base.git
- revision: 4db4cc92ce5dc83d2cce95999508dbda51b34f0b
- ref: 4db4cc92ce
+ revision: b8a47d1bc7d8901362db938a146107ccfb4f92e4
+ ref: b8a47d1b
specs:
vcap_services_base (0.1.12)
curb (~> 0.7.16)
@@ -128,10 +130,12 @@ GEM
eventmachine_httpserver (0.2.1)
fastercsv (1.5.5)
http_parser.rb (0.5.3)
+ httpclient (2.2.5)
json (1.4.6)
json_pure (1.7.3)
macaddr (1.6.1)
systemu (~> 2.5.0)
+ membrane (0.0.2)
multi_json (1.0.4)
nats (0.4.24)
daemons (>= 1.1.5)
@@ -45,20 +45,13 @@ def provision_service(request, prov_handle=nil, &blk)
shared_secret = @atmos_helper.create_user(token, st_name)
svc = {
- :data => {:subtenant_name => st_name, :subtenant_id => st_id, :host => @host},
- :service_id => st_name,
- :credentials => {:host => @host, :port => @port, :token => token,
- :shared_secret => shared_secret, :subtenant_id => st_id}
- }
- # set 'configuration' instead of 'data' to keep local hash consistent
- svc_local = {
:configuration => {"subtenant_name" => st_name, "subtenant_id" => st_id, "host" => @host},
:service_id => st_name,
:credentials => {"host" => @host, "port" => @port, "token" => token,
"shared_secret" => shared_secret, "subtenant_id" => st_id}
}
@logger.debug("Service provisioned: #{svc.inspect}")
- @prov_svcs[svc[:service_id]] = svc_local
+ @prov_svcs[svc[:service_id]] = svc
blk.call(success(svc))
rescue => e
# roll back work
Binary file not shown.
Binary file not shown.
View
@@ -12,9 +12,9 @@ gem "sinatra"
gem "thin"
gem "couchrest"
-gem 'vcap_common', :require => ['vcap/common', 'vcap/component'], :git => 'git://github.com/cloudfoundry/vcap-common.git', :ref => 'b7e3508eb9'
+gem 'vcap_common', :require => ['vcap/common', 'vcap/component'], :git => 'git://github.com/cloudfoundry/vcap-common.git', :ref => 'b0cc19d5'
gem 'vcap_logging', :require => ['vcap/logging'], :git => 'git://github.com/cloudfoundry/common.git', :ref => 'b96ec1192'
-gem 'vcap_services_base', :git => 'git://github.com/cloudfoundry/vcap-services-base.git', :ref => '4db4cc92ce'
+gem 'vcap_services_base', :git => 'git://github.com/cloudfoundry/vcap-services-base.git', :ref => 'b8a47d1b'
gem 'warden-client', :require => ['warden/client'], :git => 'git://github.com/cloudfoundry/warden.git', :ref => 'd8334ce8a3'
gem 'warden-protocol', :require => ['warden/protocol'], :git => 'git://github.com/cloudfoundry/warden.git', :ref => 'd8334ce8a3'
View
@@ -15,20 +15,22 @@ GIT
GIT
remote: git://github.com/cloudfoundry/vcap-common.git
- revision: b7e3508eb96b86162ca385f1f46a13ecfcce359d
- ref: b7e3508eb9
+ revision: b0cc19d5520c9849600dbd8cf2883bff66d7643e
+ ref: b0cc19d5
specs:
- vcap_common (1.0.14)
+ vcap_common (2.0.4)
eventmachine
+ httpclient
+ membrane (~> 0.0.2)
nats (~> 0.4.22.beta.8)
posix-spawn (~> 0.3.6)
thin (~> 1.3.1)
yajl-ruby (~> 0.8.3)
GIT
remote: git://github.com/cloudfoundry/vcap-services-base.git
- revision: 4db4cc92ce5dc83d2cce95999508dbda51b34f0b
- ref: 4db4cc92ce
+ revision: b8a47d1bc7d8901362db938a146107ccfb4f92e4
+ ref: b8a47d1b
specs:
vcap_services_base (0.1.12)
curb (~> 0.7.16)
@@ -132,10 +134,12 @@ GEM
eventmachine_httpserver (0.2.1)
fastercsv (1.5.5)
http_parser.rb (0.5.3)
+ httpclient (2.2.5)
json (1.4.6)
json_pure (1.7.3)
macaddr (1.6.1)
systemu (~> 2.5.0)
+ membrane (0.0.2)
mime-types (1.18)
multi_json (1.3.6)
nats (0.4.24)
Binary file not shown.
Binary file not shown.
View
@@ -11,9 +11,9 @@ gem "do_sqlite3"
gem "sinatra", "~> 1.2.3"
gem "thin"
-gem 'vcap_common', :require => ['vcap/common', 'vcap/component'], :git => 'git://github.com/cloudfoundry/vcap-common.git', :ref => 'b7e3508eb9'
+gem 'vcap_common', :require => ['vcap/common', 'vcap/component'], :git => 'git://github.com/cloudfoundry/vcap-common.git', :ref => 'b0cc19d5'
gem 'vcap_logging', :require => ['vcap/logging'], :git => 'git://github.com/cloudfoundry/common.git', :ref => 'b96ec1192'
-gem 'vcap_services_base', :git => 'git://github.com/cloudfoundry/vcap-services-base.git', :ref => '4db4cc92ce'
+gem 'vcap_services_base', :git => 'git://github.com/cloudfoundry/vcap-services-base.git', :ref => 'b8a47d1b'
gem 'warden-client', :require => ['warden/client'], :git => 'git://github.com/cloudfoundry/warden.git', :ref => 'd8334ce8a3'
gem 'warden-protocol', :require => ['warden/protocol'], :git => 'git://github.com/cloudfoundry/warden.git', :ref => 'd8334ce8a3'
View
@@ -15,20 +15,22 @@ GIT
GIT
remote: git://github.com/cloudfoundry/vcap-common.git
- revision: b7e3508eb96b86162ca385f1f46a13ecfcce359d
- ref: b7e3508eb9
+ revision: b0cc19d5520c9849600dbd8cf2883bff66d7643e
+ ref: b0cc19d5
specs:
- vcap_common (1.0.14)
+ vcap_common (2.0.4)
eventmachine
+ httpclient
+ membrane (~> 0.0.2)
nats (~> 0.4.22.beta.8)
posix-spawn (~> 0.3.6)
thin (~> 1.3.1)
yajl-ruby (~> 0.8.3)
GIT
remote: git://github.com/cloudfoundry/vcap-services-base.git
- revision: 4db4cc92ce5dc83d2cce95999508dbda51b34f0b
- ref: 4db4cc92ce
+ revision: b8a47d1bc7d8901362db938a146107ccfb4f92e4
+ ref: b8a47d1b
specs:
vcap_services_base (0.1.12)
curb (~> 0.7.16)
@@ -128,10 +130,12 @@ GEM
eventmachine_httpserver (0.2.1)
fastercsv (1.5.5)
http_parser.rb (0.5.3)
+ httpclient (2.2.5)
json (1.4.6)
json_pure (1.7.3)
macaddr (1.6.1)
systemu (~> 2.5.0)
+ membrane (0.0.2)
multi_json (1.3.6)
nats (0.4.24)
daemons (>= 1.1.5)
Binary file not shown.
Binary file not shown.
View
@@ -10,9 +10,9 @@ gem "sinatra"
gem "thin"
gem "rest-client"
-gem 'vcap_common', :require => ['vcap/common', 'vcap/component'], :git => 'git://github.com/cloudfoundry/vcap-common.git', :ref => 'b7e3508eb9'
+gem 'vcap_common', :require => ['vcap/common', 'vcap/component'], :git => 'git://github.com/cloudfoundry/vcap-common.git', :ref => 'b0cc19d5'
gem 'vcap_logging', :require => ['vcap/logging'], :git => 'git://github.com/cloudfoundry/common.git', :ref => 'b96ec1192'
-gem 'vcap_services_base', :git => 'git://github.com/cloudfoundry/vcap-services-base.git', :ref => '4db4cc92ce'
+gem 'vcap_services_base', :git => 'git://github.com/cloudfoundry/vcap-services-base.git', :ref => 'b8a47d1b'
gem 'warden-client', :require => ['warden/client'], :git => 'git://github.com/cloudfoundry/warden.git', :ref => 'd8334ce8a3'
gem 'warden-protocol', :require => ['warden/protocol'], :git => 'git://github.com/cloudfoundry/warden.git', :ref => 'd8334ce8a3'
View
@@ -15,20 +15,22 @@ GIT
GIT
remote: git://github.com/cloudfoundry/vcap-common.git
- revision: b7e3508eb96b86162ca385f1f46a13ecfcce359d
- ref: b7e3508eb9
+ revision: b0cc19d5520c9849600dbd8cf2883bff66d7643e
+ ref: b0cc19d5
specs:
- vcap_common (1.0.14)
+ vcap_common (2.0.4)
eventmachine
+ httpclient
+ membrane (~> 0.0.2)
nats (~> 0.4.22.beta.8)
posix-spawn (~> 0.3.6)
thin (~> 1.3.1)
yajl-ruby (~> 0.8.3)
GIT
remote: git://github.com/cloudfoundry/vcap-services-base.git
- revision: 4db4cc92ce5dc83d2cce95999508dbda51b34f0b
- ref: 4db4cc92ce
+ revision: b8a47d1bc7d8901362db938a146107ccfb4f92e4
+ ref: b8a47d1b
specs:
vcap_services_base (0.1.12)
curb (~> 0.7.16)
@@ -128,10 +130,12 @@ GEM
eventmachine_httpserver (0.2.1)
fastercsv (1.5.5)
http_parser.rb (0.5.3)
+ httpclient (2.2.5)
json (1.4.6)
json_pure (1.7.3)
macaddr (1.6.1)
systemu (~> 2.5.0)
+ membrane (0.0.2)
mime-types (1.16)
multi_json (1.0.4)
nats (0.4.24)
Binary file not shown.
Binary file not shown.
View
@@ -10,9 +10,9 @@ gem "do_sqlite3"
gem "sinatra"
gem "thin"
-gem 'vcap_common', :require => ['vcap/common', 'vcap/component'], :git => 'git://github.com/cloudfoundry/vcap-common.git', :ref => 'b7e3508eb9'
+gem 'vcap_common', :require => ['vcap/common', 'vcap/component'], :git => 'git://github.com/cloudfoundry/vcap-common.git', :ref => 'b0cc19d5'
gem 'vcap_logging', :require => ['vcap/logging'], :git => 'git://github.com/cloudfoundry/common.git', :ref => 'b96ec1192'
-gem 'vcap_services_base', :git => 'git://github.com/cloudfoundry/vcap-services-base.git', :ref => '4db4cc92ce'
+gem 'vcap_services_base', :git => 'git://github.com/cloudfoundry/vcap-services-base.git', :ref => 'b8a47d1b'
gem 'warden-client', :require => ['warden/client'], :git => 'git://github.com/cloudfoundry/warden.git', :ref => 'd8334ce8a3'
gem 'warden-protocol', :require => ['warden/protocol'], :git => 'git://github.com/cloudfoundry/warden.git', :ref => 'd8334ce8a3'
View
@@ -15,20 +15,22 @@ GIT
GIT
remote: git://github.com/cloudfoundry/vcap-common.git
- revision: b7e3508eb96b86162ca385f1f46a13ecfcce359d
- ref: b7e3508eb9
+ revision: b0cc19d5520c9849600dbd8cf2883bff66d7643e
+ ref: b0cc19d5
specs:
- vcap_common (1.0.14)
+ vcap_common (2.0.4)
eventmachine
+ httpclient
+ membrane (~> 0.0.2)
nats (~> 0.4.22.beta.8)
posix-spawn (~> 0.3.6)
thin (~> 1.3.1)
yajl-ruby (~> 0.8.3)
GIT
remote: git://github.com/cloudfoundry/vcap-services-base.git
- revision: 4db4cc92ce5dc83d2cce95999508dbda51b34f0b
- ref: 4db4cc92ce
+ revision: b8a47d1bc7d8901362db938a146107ccfb4f92e4
+ ref: b8a47d1b
specs:
vcap_services_base (0.1.12)
curb (~> 0.7.16)
@@ -128,10 +130,12 @@ GEM
eventmachine_httpserver (0.2.1)
fastercsv (1.5.5)
http_parser.rb (0.5.3)
+ httpclient (2.2.5)
json (1.4.6)
json_pure (1.7.3)
macaddr (1.6.1)
systemu (~> 2.5.0)
+ membrane (0.0.2)
multi_json (1.0.4)
nats (0.4.24)
daemons (>= 1.1.5)
@@ -118,18 +118,12 @@ def provision_service(request, prov_handle=nil, &blk)
credentials = gen_credentials(name, backend)
svc = {
- :data => prov_req.dup,
- :service_id => name,
- :credentials => credentials
- }
- # FIXME: workaround for inconsistant representation of bind handle and provision handle
- svc_local = {
:configuration => prov_req.dup,
:service_id => name,
:credentials => credentials
}
@logger.debug("Provisioned #{svc.inspect}")
- @prov_svcs[svc[:service_id]] = svc_local
+ @prov_svcs[svc[:service_id]] = svc
blk.call(success(svc))
rescue => e
if e.instance_of? FilesystemError
@@ -112,7 +112,7 @@ class BaseProvisioner
it "should return the credentials when provision successful" do
@provisioner.provision_service(@request) do |msg|
msg["success"].should == true
- msg["response"][:data][:plan].should == "free"
+ msg["response"][:configuration][:plan].should == "free"
msg["response"][:service_id].should be
msg["response"][:credentials]["internal"].should be
msg["response"][:credentials]["internal"]["name"].should be
Binary file not shown.
Binary file not shown.
View
@@ -10,9 +10,9 @@ gem "sinatra"
gem "thin"
gem "dalli"
-gem 'vcap_common', :require => ['vcap/common', 'vcap/component'], :git => 'git://github.com/cloudfoundry/vcap-common.git', :ref => 'b7e3508eb9'
+gem 'vcap_common', :require => ['vcap/common', 'vcap/component'], :git => 'git://github.com/cloudfoundry/vcap-common.git', :ref => 'b0cc19d5'
gem 'vcap_logging', :require => ['vcap/logging'], :git => 'git://github.com/cloudfoundry/common.git', :ref => 'b96ec1192'
-gem 'vcap_services_base', :git => 'git://github.com/cloudfoundry/vcap-services-base.git', :ref => '4db4cc92ce'
+gem 'vcap_services_base', :git => 'git://github.com/cloudfoundry/vcap-services-base.git', :ref => 'b8a47d1b'
gem 'warden-client', :require => ['warden/client'], :git => 'git://github.com/cloudfoundry/warden.git', :ref => 'd8334ce8a3'
gem 'warden-protocol', :require => ['warden/protocol'], :git => 'git://github.com/cloudfoundry/warden.git', :ref => 'd8334ce8a3'
View
@@ -15,20 +15,22 @@ GIT
GIT
remote: git://github.com/cloudfoundry/vcap-common.git
- revision: b7e3508eb96b86162ca385f1f46a13ecfcce359d
- ref: b7e3508eb9
+ revision: b0cc19d5520c9849600dbd8cf2883bff66d7643e
+ ref: b0cc19d5
specs:
- vcap_common (1.0.14)
+ vcap_common (2.0.4)
eventmachine
+ httpclient
+ membrane (~> 0.0.2)
nats (~> 0.4.22.beta.8)
posix-spawn (~> 0.3.6)
thin (~> 1.3.1)
yajl-ruby (~> 0.8.3)
GIT
remote: git://github.com/cloudfoundry/vcap-services-base.git
- revision: 4db4cc92ce5dc83d2cce95999508dbda51b34f0b
- ref: 4db4cc92ce
+ revision: b8a47d1bc7d8901362db938a146107ccfb4f92e4
+ ref: b8a47d1b
specs:
vcap_services_base (0.1.12)
curb (~> 0.7.16)
@@ -129,10 +131,12 @@ GEM
eventmachine_httpserver (0.2.1)
fastercsv (1.5.5)
http_parser.rb (0.5.3)
+ httpclient (2.2.5)
json (1.4.6)
json_pure (1.7.3)
macaddr (1.6.1)
systemu (~> 2.5.0)
+ membrane (0.0.2)
multi_json (1.3.6)
nats (0.4.24)
daemons (>= 1.1.5)
Binary file not shown.
Binary file not shown.
View
@@ -13,9 +13,9 @@ gem "bson_ext"
gem "thin"
gem "sinatra"
-gem 'vcap_common', :require => ['vcap/common', 'vcap/component'], :git => 'git://github.com/cloudfoundry/vcap-common.git', :ref => 'b7e3508eb9'
+gem 'vcap_common', :require => ['vcap/common', 'vcap/component'], :git => 'git://github.com/cloudfoundry/vcap-common.git', :ref => 'b0cc19d5'
gem 'vcap_logging', :require => ['vcap/logging'], :git => 'git://github.com/cloudfoundry/common.git', :ref => 'b96ec1192'
-gem 'vcap_services_base', :git => 'git://github.com/cloudfoundry/vcap-services-base.git', :ref => '4db4cc92ce'
+gem 'vcap_services_base', :git => 'git://github.com/cloudfoundry/vcap-services-base.git', :ref => 'b8a47d1b'
gem 'warden-client', :require => ['warden/client'], :git => 'git://github.com/cloudfoundry/warden.git', :ref => 'd8334ce8a3'
gem 'warden-protocol', :require => ['warden/protocol'], :git => 'git://github.com/cloudfoundry/warden.git', :ref => 'd8334ce8a3'
Oops, something went wrong.

0 comments on commit 9295d12

Please sign in to comment.