Change add_relation function in libjuju.py to accept saas 39/9639/4
authorDavid Garcia <david.garcia@canonical.com>
Tue, 25 Aug 2020 14:10:07 +0000 (16:10 +0200)
committergarciadav <david.garcia@canonical.com>
Fri, 11 Sep 2020 12:34:31 +0000 (14:34 +0200)
commit8331f7ce83ebe7b1c9b2ca25610dfa7fab3a0e64
treefa8f12619efc434d25527bff18948c6aec562caf
parentbc538e4dc147558118094252f31b762d35392623
Change add_relation function in libjuju.py to accept saas

Before, app_1, endpoint1, app_2, endpoint2 parameters were needed.
Now we directly pass the endpoint names of the relation with the right format.
If "app:endpoint", it is understood that the endpoint it of a charm in the current model.
If "name", it is understood that the endpoint is a consumed endpoint from another model.

This function allows to cross-model-relate charms to external models

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