From: David Garcia Date: Wed, 1 Jul 2020 18:25:30 +0000 (+0200) Subject: Update database with api_endpoints of VCA on initialization X-Git-Tag: release-v9.0-start~42 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F60%2F9260%2F1;p=osm%2FN2VC.git Update database with api_endpoints of VCA on initialization Change-Id: Id5666d8c93d357632efde93e8e60abafdad56e35 Signed-off-by: David Garcia --- diff --git a/n2vc/libjuju.py b/n2vc/libjuju.py index daedc3b..be16e2a 100644 --- a/n2vc/libjuju.py +++ b/n2vc/libjuju.py @@ -70,7 +70,10 @@ class Libjuju: self.log = log or logging.getLogger("Libjuju") self.db = db - self.endpoints = self._get_api_endpoints_db() or [endpoint] + db_endpoints = self._get_api_endpoints_db() + self.endpoints = db_endpoints or [endpoint] + if db_endpoints is None: + self._update_api_endpoints_db(self.endpoints) self.api_proxy = api_proxy self.username = username self.password = password