Fix bug 1448: minor fix in JujuModelWatcher.wait_for_model 91/10491/2
authorDavid Garcia <david.garcia@canonical.com>
Wed, 10 Mar 2021 10:50:38 +0000 (11:50 +0100)
committergarciadav <david.garcia@canonical.com>
Wed, 17 Mar 2021 14:26:15 +0000 (15:26 +0100)
commit5d7d622b026f6f4c6994fc5fbb1789d7827bf641
treea60f6a495b54a11fc7a6d94cff1934ce2ec09be8
parent7ff8ed57dd2b4fe9b8285353bdf59d7a4cd7a010
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>
(cherry picked from commit c344117335d4ffbd06ef90ae8dce9cb3910165fb)
n2vc/juju_watcher.py