Bug 1651 fix 56/11156/2
authorgatici <gulsumatici@gmail.com>
Wed, 8 Sep 2021 07:35:18 +0000 (07:35 +0000)
committeratici <gulsum.atici@ulakhaberlesme.com.tr>
Mon, 13 Sep 2021 14:08:47 +0000 (16:08 +0200)
This fix is required to fix VCA metric collection for SOL006 compatible descriptors.

Related bug: https://osm.etsi.org/bugzilla/show_bug.cgi?id=1651

Change-Id: I5a25c97b48692c23b5520cf72becb7b5bbcf327a
Signed-off-by: gatici <gulsumatici@gmail.com>
n2vc/vca/connection.py

index 98de0ff..0b4e75b 100644 (file)
@@ -73,11 +73,11 @@ class Connection:
                 "user": envs["user"],
                 "secret": envs["secret"],
                 "cacert": envs["cacert"],
-                "pubkey": envs["pubkey"],
-                "lxd-cloud": envs["cloud"],
-                "lxd-credentials": envs.get("credentials", envs["cloud"]),
-                "k8s-cloud": envs["k8s_cloud"],
-                "k8s-credentials": envs.get("k8s_credentials", envs["k8s_cloud"]),
+                "pubkey": envs.get("pubkey"),
+                "lxd-cloud": envs.get("cloud"),
+                "lxd-credentials": envs.get("credentials", envs.get("cloud")),
+                "k8s-cloud": envs.get("k8s_cloud"),
+                "k8s-credentials": envs.get("k8s_credentials", envs.get("k8s_cloud")),
                 "model-config": ModelConfig(envs),
                 "api-proxy": envs.get("api_proxy", None),
             }