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>
Feature 10239: Distributed VCA - Add vca_id in all calls that invoke libjuju. This is for being able to talk to the default VCA or the VCA associated to the VIM - Add store.py: Abstraction to talk to the database. - DBMongoStore: Use the db from common to talk to the database - MotorStore: Use motor, an asynchronous mongodb client to talk to the database - Add vca/connection.py: Represents the data needed to connect the VCA - Add EnvironConfig in config.py: Class to get the environment config, and avoid LCM from passing that Change-Id: I28625e0c56ce408114022c83d4b7cacbb649434c Signed-off-by: David Garcia <david.garcia@canonical.com>
Remove EntityType from juju watcher and workaround juju bug for retrieving the status - The juju watcher was doing an unnecessary translation with the entity types. The entity already provides an attribute .entity_type - Juju has a bug in version 2.8.2 that returns a wrong status. Therefore, charms were getting stuck in waiting for ever. Change-Id: I44709190acc41601e8a67f4c52074fda00c3d495 Signed-off-by: David Garcia <david.garcia@canonical.com>
Add unit tests to N2VC refactor This commit adds unit tests for the following modules: juju_watcher.py 96% coverage libjuju.py 72% coverage utils.py 100% coverage Minor libjuju.py fixes found with unit testing Fix testing with tox Change-Id: I9f23ce2f18aac6765edfa955ed200802c27d9047 Signed-off-by: Dominik Fleischmann <dominik.fleischmann@canonical.com>