Feature 10239: Distributed VCA 01/10701/3
authorDavid Garcia <david.garcia@canonical.com>
Fri, 23 Apr 2021 10:46:38 +0000 (12:46 +0200)
committerDavid Garcia <david.garcia@canonical.com>
Mon, 3 May 2021 15:25:25 +0000 (17:25 +0200)
Specify vca_id when getting metrics from N2VC

Change-Id: I1688f9eb61f8828ff5276d2642de527aaf649660
Signed-off-by: David Garcia <david.garcia@canonical.com>
osm_mon/collector/vnf_collectors/juju.py
requirements-dev.txt

index ba17d65..30f4586 100644 (file)
@@ -61,9 +61,6 @@ class VCACollector(BaseCollector):
             fs=object(),
             log=log,
             loop=self.loop,
-            url="{}:{}".format(host, port),
-            username=config.get("vca", "user"),
-            vca_config=config.conf["vca"],
             on_update_db=None,
         )
 
@@ -99,7 +96,9 @@ class VCACollector(BaseCollector):
                     continue
                 measures = self.loop.run_until_complete(
                     self.n2vc.get_metrics(
-                        vca_deployment_info["model"], vca_deployment_info["application"]
+                        vca_deployment_info["model"],
+                        vca_deployment_info["application"],
+                        vca_id=vnfr.get("vca-id"),
                     )
                 )
                 log.debug("Measures: %s", measures)
index c8e2c83..18119aa 100644 (file)
@@ -4,6 +4,10 @@
     # via -r requirements-dev.in
 aiokafka==0.7.0
     # via -r https://osm.etsi.org/gitweb/?p=osm/common.git;a=blob_plain;f=requirements.txt;hb=master
+async-timeout==3.0.1
+    # via
+    #   -r https://osm.etsi.org/gitweb/?p=osm/N2VC.git;a=blob_plain;f=requirements.txt;hb=master
+    #   retrying-async
 bcrypt==3.2.0
     # via
     #   -r https://osm.etsi.org/gitweb/?p=osm/N2VC.git;a=blob_plain;f=requirements.txt;hb=master
@@ -58,6 +62,8 @@ macaroonbakery==1.3.1
     #   -r https://osm.etsi.org/gitweb/?p=osm/N2VC.git;a=blob_plain;f=requirements.txt;hb=master
     #   juju
     #   theblues
+motor==1.3.1
+    # via -r https://osm.etsi.org/gitweb/?p=osm/N2VC.git;a=blob_plain;f=requirements.txt;hb=master
 mypy-extensions==0.4.3
     # via
     #   -r https://osm.etsi.org/gitweb/?p=osm/N2VC.git;a=blob_plain;f=requirements.txt;hb=master
@@ -95,7 +101,10 @@ pymacaroons==0.13.0
     #   -r https://osm.etsi.org/gitweb/?p=osm/N2VC.git;a=blob_plain;f=requirements.txt;hb=master
     #   macaroonbakery
 pymongo==3.11.3
-    # via -r https://osm.etsi.org/gitweb/?p=osm/common.git;a=blob_plain;f=requirements.txt;hb=master
+    # via
+    #   -r https://osm.etsi.org/gitweb/?p=osm/N2VC.git;a=blob_plain;f=requirements.txt;hb=master
+    #   -r https://osm.etsi.org/gitweb/?p=osm/common.git;a=blob_plain;f=requirements.txt;hb=master
+    #   motor
 pynacl==1.4.0
     # via
     #   -r https://osm.etsi.org/gitweb/?p=osm/N2VC.git;a=blob_plain;f=requirements.txt;hb=master
@@ -133,6 +142,8 @@ requests==2.25.1
     #   macaroonbakery
     #   requests-oauthlib
     #   theblues
+retrying-async==1.2.0
+    # via -r https://osm.etsi.org/gitweb/?p=osm/N2VC.git;a=blob_plain;f=requirements.txt;hb=master
 rsa==4.7.2
     # via
     #   -r https://osm.etsi.org/gitweb/?p=osm/N2VC.git;a=blob_plain;f=requirements.txt;hb=master