Feature 10239: Distributed VCA 16/10616/9
authorDavid Garcia <david.garcia@canonical.com>
Mon, 12 Apr 2021 10:07:37 +0000 (12:07 +0200)
committerDavid Garcia <david.garcia@canonical.com>
Mon, 3 May 2021 11:30:40 +0000 (13:30 +0200)
commiteb8943a887e2fb8cce0240382811f9e504f3c7fb
tree5c4c40b579e897a4914a87c8dae1ae0ac19a1b07
parent6331b04745fcd6d44b1b0320ca6e3e63cdebd0e8
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>
26 files changed:
n2vc/config.py
n2vc/juju_watcher.py
n2vc/k8s_helm3_conn.py
n2vc/k8s_helm_base_conn.py
n2vc/k8s_helm_conn.py
n2vc/k8s_juju_conn.py
n2vc/libjuju.py
n2vc/n2vc_conn.py
n2vc/n2vc_juju_conn.py
n2vc/store.py [new file with mode: 0644]
n2vc/tests/unit/test_config.py [new file with mode: 0644]
n2vc/tests/unit/test_connection.py [new file with mode: 0644]
n2vc/tests/unit/test_juju_watcher.py
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_store.py [new file with mode: 0644]
n2vc/tests/unit/test_utils.py
n2vc/tests/unit/utils.py
n2vc/utils.py
n2vc/vca/__init__.py [new file with mode: 0644]
n2vc/vca/cloud.py [new file with mode: 0644]
n2vc/vca/connection.py [new file with mode: 0644]
n2vc/vca/connection_data.py [new file with mode: 0644]
requirements.in
requirements.txt