Permalink
Browse files

Revert "Prevent provisioning a service when name taken"

This reverts commit 1c4120a which introduces a regression

Change-Id: I2ff4a5c3a6d39e6993572a4aa2f1b07370660f9e
  • Loading branch information...
1 parent ab7c467 commit 4f66ec83d46ac9323c292b4d05b421af97039b8c @d d committed Jun 21, 2012
@@ -30,8 +30,6 @@ def self.provision(service, user, cfg_alias, plan, plan_option)
# The upstream is responsible for deleting the dangling config
# the next time it pulls canonical state (since the state
# will lack the handle).
- svc = find_by_alias(cfg_alias)
- raise CloudError.new(CloudError::ALIAS_BEEN_TAKEN) if svc
begin
req = VCAP::Services::Api::GatewayProvisionRequest.new(
@@ -55,7 +55,6 @@ def to_json(options = nil)
SERVICE_GATEWAY_ERROR = [503, HTTP_BAD_GATEWAY, "Unexpected response from service gateway"]
ACCOUNT_TOO_MANY_SERVICES = [504, HTTP_FORBIDDEN, "Too many Services provisioned: %s, you're allowed: %s"]
EXTENSION_NOT_IMPL = [505, HTTP_NOT_IMPLEMENTED, "Service extension %s is not implemented."]
- ALIAS_BEEN_TAKEN = [506, HTTP_BAD_REQUEST, "Service name has already been taken"]
# Account Capacity
ACCOUNT_NOT_ENOUGH_MEMORY = [600, HTTP_FORBIDDEN, "Not enough memory capacity, you're allowed: %s"]
@@ -546,7 +546,6 @@ def unbind_instance(service_id, handle_id, binding_options)
end
response.status.should == 200
- VCAP::Services::Api::ServiceGatewayClient.any_instance.expects(:provision).never
post_msg :provision do
VCAP::Services::Api::CloudControllerProvisionRequest.new(
:label => 'foo-bar',

0 comments on commit 4f66ec8

Please sign in to comment.