Note that juju-jitsu has a helpful command to simulate this:
$ jitsu watch john/0 -e local --state=started
2012-06-20 12:53:52,934 watch:INFO Waiting for unit john/0...
2012-06-20 12:53:52,946 watch:INFO Waiting for unit john/0 to be in ['started'] and not in []
I think this bug is really important though, and needs an answer at some point. The resolution I think would be:
* jitsu watch seems useful, lets put that in core
* we also need compound commands. If I could do
Then I could simulate the desired effect.
* Finally I think all commands should have a defined "complete" state, and then a --wait flag. So
$ juju deploy foo --wait
... do something which interrogates foo
$ juju set foo tuning-parameter=x --wait
... verify tuning-parameter is set to x and had desired effect
Note that juju-jitsu has a helpful command to simulate this:
$ jitsu watch john/0 -e local --state=started
2012-06-20 12:53:52,934 watch:INFO Waiting for unit john/0...
2012-06-20 12:53:52,946 watch:INFO Waiting for unit john/0 to be in ['started'] and not in []
I think this bug is really important though, and needs an answer at some point. The resolution I think would be:
* jitsu watch seems useful, lets put that in core
* we also need compound commands. If I could do
$ juju -c 'deploy foo; watch foo/0 --state=started'
Then I could simulate the desired effect.
* Finally I think all commands should have a defined "complete" state, and then a --wait flag. So
$ juju deploy foo --wait
... do something which interrogates foo
$ juju set foo tuning-parameter=x --wait
... verify tuning-parameter is set to x and had desired effect