Closed huikang closed 7 years ago
Hi @huikang ,
I revisited my earlier thoughts.
If you pass accepts_incomplete = true
and the service broker can provision it synchronously then it will do so. http://docs.cloudfoundry.org/services/api.html. You can try out with cloudantNoSQLDB service by passing accepts_incomplete = true
The result of creation and deletion are 201 and 204 respectively and not 202 which would have been returned if the service provisioned asynchronously.
So, I think those should be given a default value of true and they already are so at this point in the code base. It basically means if you already know that your service can be provisioned synchronously then you don't need to have any polling mechanism at the client side while if you think your service gets provisioned async you need to poll for the last_operation. This also means client don't need to worry about passing accepts_incomplete
. It is always true
.
I re-checked the API since last discussion and for service instance only deletion API needs async
.
TL;DR
async=true
from definition of create/updaterawURL := "/v2/service_instances?accepts_incomplete=true&async=true"
https://apidocs.cloudfoundry.org/264/service_instances/creating_a_service_instance.html doesn't list it as an input query parameter.accepts_incomplete=true
.Thanks
@ashishth09 thanks for your comment. Will update.
Closed in #60
Signed-off-by: Hui Kang kangh@us.ibm.com