Fix bug 1448: minor fix in JujuModelWatcher.wait_for_model 70/10470/5
authorDavid Garcia <david.garcia@canonical.com>
Wed, 10 Mar 2021 10:50:38 +0000 (11:50 +0100)
committerDavid Garcia <david.garcia@canonical.com>
Wed, 10 Mar 2021 13:32:30 +0000 (14:32 +0100)
commitc344117335d4ffbd06ef90ae8dce9cb3910165fb
tree788ce743c927fcdd453fc7e58d97394a500b4855
parentf97b231c021d082f5f56ac88804af3d73be2caa9
Fix bug 1448: minor fix in JujuModelWatcher.wait_for_model

Add an `application_ready` function in the Juju Watcher to check if all the
applications of the model are ready.  This function checks that not only
the application is ready, but also all the units of the application.

Additionally, I have added a stability check. After considering a model
as ready, we will wait for 10 seconds, and check again.

Change-Id: Icd8d88613416b75cfd241e7044dbeffa6cbc6a8e
Signed-off-by: David Garcia <david.garcia@canonical.com>
n2vc/juju_watcher.py