cli: Add option to wait for async operation completion until timeout
Command
cf create-service, cf delete-service, soon cf bind-service cf unbind-service
What occurred
Currently, when the underlying broker supports async operations, the command returns with an “operation in progress” message.
Users/scripts/tests have to repeatedly poll for completion of the operation using the status command such as cf-service.
What you expected to occur
Add an option to the CLI command such as --poll-until timeoutInSeconds that would periodically poll the status of the async command, and return until the command completes or the specified timeout (in seconds) triggers
CLI Version
cf version 6.35.2+88a03e995.2018-03-15
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 17 (8 by maintainers)
Taking my CC developer hat off and putting my App developer hat on.
A wait mechanism is a feature I would love to see. It would stop us having to write scripts like this.
The Services on K8s
svcattool has something similar e.g:svcat unbind --name vision-binding --wait@gberche-orange The
--waitwill be available only for the cli v8 (given that a bump in the minimum required version of CAPI is considered a breaking change in the CLI).We hope to get a beta for it soon (or you can build it from the master branch for the time being 😃).
Hi all,
Apologies for getting back to this story so late. With the implementation of v3 API we have introduced jobs that related to every async operation. This made it possible to have a reliable way to follow operations in the CLI.
With the new major release of the CLI (that should be available soon), you should be able to specify
--waitflag to wait for the completion of an operation.This is implemented forcf create-service,cf update-service,cf delete-serviceandcf bind-route-serviceandcf unbind-route-serviceas well.You can follow the next set of stories relating bind-service and unbind-service
We look forward to feedback on these commands once they are available.
Thanks, Felisia