IBM-Cloud / bluemix-go

Go library for accessing the Bluemix API
Apache License 2.0
37 stars 88 forks source link

fail to delete a watson discovery instance #56

Closed huikang closed 6 years ago

huikang commented 6 years ago

Hi, I saw the following error when deleting a discovery instance. However, I could not find any field in the bluemix client config. Could anyone help? Thanks.

{
  "description": "The following error occurred in the region 'US South': Service instance test-discovery: Service broker error: {\"error\"=>\"AsyncRequired\", \"description\"=>\"This service plan requires client support for asynchronous service operations.\"}",
  "error_code": "CF-ServiceBrokerBadResponse",
  "code": 10001,
  "http": {
    "uri": "https://provision-broker.ng.bluemix.net/bmx/provisioning/brokers/1867973154-7bc1c9a9-9fd7-462f-930e-96f5557c2f5a/v2/service_instances/bdfd19ba-f8ad-4a97-979a-aff3e3a59329",
    "method": "DELETE",
    "status": 422
  },
huikang commented 6 years ago

Here is the link to the API: https://apidocs.cloudfoundry.org/272/service_instances/delete_a_service_instance.html

However, the delete method in bluemix-go does not accept async parameter https://github.com/IBM-Bluemix/bluemix-go/blob/master/api/mccp/mccpv2/service_instances.go#L124

ashishth09 commented 6 years ago

This sounds more like API enhancement.

huikang commented 6 years ago

@ashishth09 I can look into this, if you don't mind.

huikang commented 6 years ago

Fixed by PR #57

huikang commented 6 years ago

Thanks, @ashishth09