Feature 10887: Add cross-model relations support 91/11291/7 release-v11.0-start v11.0.0rc1
authorDavid Garcia <david.garcia@canonical.com>
Tue, 26 Oct 2021 10:30:44 +0000 (12:30 +0200)
committergarciadav <david.garcia@canonical.com>
Thu, 4 Nov 2021 11:06:33 +0000 (12:06 +0100)
commit582b923b8f3f7104411c39ebdba63949d606ecd1
treec15dd086ff30eaa4d1078f495c9537ea38b038da
parent7114f65ca3ba581281fa03639f21db61a111b53e
Feature 10887: Add cross-model relations support

Changes:
- Extend `add_relation` method in N2VCJujuConn to include the CMR case
- Add `add_relation` method to K8sJujuConn
- Add n2vc/definitions.py file that includes definition ofjects for
Offer and RelationEndpoint.
- Change `n2vc.libjuju.Libjuju.list_offers` method to be private, and accept a filter `offer_name` parameter.
- Update `n2vc.libjuju.Libjuju.consume` method arguments.
- Add `n2vc.libjuju.Libjuju.offer` method to create an offer.

Unit tests associated to the code changes have been either created or
updated accordingly

Change-Id: Ibf8d574528dee0fa898e0e97578dd3a6aa68316a
Signed-off-by: David Garcia <david.garcia@canonical.com>
n2vc/definitions.py [new file with mode: 0644]
n2vc/k8s_juju_conn.py
n2vc/libjuju.py
n2vc/n2vc_juju_conn.py
n2vc/tests/unit/test_definitions.py [new file with mode: 0644]
n2vc/tests/unit/test_k8s_juju_conn.py
n2vc/tests/unit/test_libjuju.py
n2vc/tests/unit/test_n2vc_juju_conn.py
n2vc/tests/unit/test_utils.py
n2vc/utils.py