Fix bug 1467 99/10499/1 v9.1.0
authorDavid Garcia <david.garcia@canonical.com>
Mon, 15 Mar 2021 17:41:34 +0000 (18:41 +0100)
committerDavid Garcia <david.garcia@canonical.com>
Tue, 16 Mar 2021 11:06:30 +0000 (12:06 +0100)
commit7ff8ed57dd2b4fe9b8285353bdf59d7a4cd7a010
treea143bb1dd20443d9a213e68d8feb3c4bfef7557d
parentec52d282dcc06a8b9eaef9cbaa0cbfb58348bfe0
Fix bug 1467

Do not raise exceptions in n2vc.libjuju.add_model() or n2vc.libjuju.destroy_model() functions

In general, functions should be as idempotent as possible. In this
particular case, executing the add_model() function several times with
the same arguments should just work. Same thing for destroy_model(). If
the model has already been destroyed, it should return and not give any
errors saying that the model doesn't exist.

Change-Id: I87e11ea0fe1b4063b2f89900fcc2bbf1f915b953
Signed-off-by: David Garcia <david.garcia@canonical.com>
n2vc/libjuju.py
n2vc/tests/unit/test_libjuju.py