Azure / azure-sdk-for-ruby

Ruby SDK for Azure Resource Manager: build and manage your Azure cloud infrastructure (Compute, Virtual Networks, Storage, etc...) using Ruby.
MIT License
275 stars 245 forks source link

Cannot delete the staging deployment of a cloud service #157

Closed nicolasdao closed 9 years ago

nicolasdao commented 10 years ago

Missing optional parameter 'slot' on method 'delete_cloud_service_deployment' in file cloud_service_management_service.rb. The current implementation has hardcoded the deployment to 'production'(cf. line 124).

The proposed solution is to add an optional parameter called slot that is defaulted to 'production' as follow:

def delete_cloud_service_deployment(cloud_service_name, slot='production')
  slot = "production" unless slot
  request_path = "/services/hostedservices/#{cloud_service_name}/deploymentslots/#{slot}"
  request = ManagementHttpRequest.new(:delete, request_path)
  Loggerx.info "Deleting deployment of cloud service \"#{cloud_service_name}\" ..."
  request.call
end
devigned commented 9 years ago

Should be fixed in 0.7.0.pre