Use the name of the VM as id for gcp vim_connector 48/12948/1
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Wed, 25 Jan 2023 15:11:54 +0000 (16:11 +0100)
committerMark Beierl <mark.beierl@canonical.com>
Thu, 9 Feb 2023 20:30:58 +0000 (15:30 -0500)
Change-Id: I7472839c5c53dabda12c9fbf5bdfa6d0adc8b5b2
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
Signed-off-by: Mark Beierl <mark.beierl@canonical.com>
requirements-dev.in
requirements-dev.txt
src/osm_ngsa/osm_mon/vim_connectors/gcp.py

index ed3f514..443025b 100644 (file)
@@ -15,6 +15,6 @@
 # limitations under the License.
 #######################################################################################
 
-git+https://osm.etsi.org/gerrit/osm/common.git@master#egg=osm-common
--r https://osm.etsi.org/gitweb/?p=osm/common.git;a=blob_plain;f=requirements.txt;hb=master
+git+https://osm.etsi.org/gerrit/osm/common.git@paas#egg=osm-common
+-r https://osm.etsi.org/gitweb/?p=osm/common.git;a=blob_plain;f=requirements.txt;hb=paas
 apache-airflow==2.4.*
index 973bdcb..41f5d69 100644 (file)
@@ -15,7 +15,7 @@
 # limitations under the License.
 #######################################################################################
 aiokafka==0.8.0
-    # 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/common.git;a=blob_plain;f=requirements.txt;hb=paas
 alembic==1.9.2
     # via apache-airflow
 anyio==3.6.2
@@ -40,7 +40,7 @@ argcomplete==2.0.0
     # via apache-airflow
 async-timeout==4.0.2
     # via
-    #   -r https://osm.etsi.org/gitweb/?p=osm/common.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=paas
     #   aiokafka
 attrs==22.2.0
     # via
@@ -88,7 +88,7 @@ croniter==1.3.8
 cryptography==39.0.0
     # via apache-airflow
 dataclasses==0.6
-    # 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/common.git;a=blob_plain;f=requirements.txt;hb=paas
 deprecated==1.2.13
     # via apache-airflow
 dill==0.3.6
@@ -184,7 +184,7 @@ jsonschema==4.17.3
     #   flask-appbuilder
 kafka-python==2.0.2
     # via
-    #   -r https://osm.etsi.org/gitweb/?p=osm/common.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=paas
     #   aiokafka
 lazy-object-proxy==1.9.0
     # via apache-airflow
@@ -227,12 +227,12 @@ mdit-py-plugins==0.3.3
 mdurl==0.1.2
     # via markdown-it-py
 motor==1.3.1
-    # via -r https://osm.etsi.org/gitweb/?p=osm/common.git;a=blob_plain;f=requirements.txt;hb=master
-osm-common @ git+https://osm.etsi.org/gerrit/osm/common.git@master
+    # via -r https://osm.etsi.org/gitweb/?p=osm/common.git;a=blob_plain;f=requirements.txt;hb=paas
+osm-common @ git+https://osm.etsi.org/gerrit/osm/common.git@paas
     # via -r requirements-dev.in
 packaging==23.0
     # via
-    #   -r https://osm.etsi.org/gitweb/?p=osm/common.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=paas
     #   aiokafka
     #   apache-airflow
     #   connexion
@@ -252,7 +252,7 @@ psutil==5.9.4
 pycparser==2.21
     # via cffi
 pycryptodome==3.17
-    # 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/common.git;a=blob_plain;f=requirements.txt;hb=paas
 pygments==2.14.0
     # via
     #   apache-airflow
@@ -264,7 +264,7 @@ pyjwt==2.6.0
     #   flask-jwt-extended
 pymongo==3.13.0
     # via
-    #   -r https://osm.etsi.org/gitweb/?p=osm/common.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=paas
     #   motor
 pyrsistent==0.19.3
     # via jsonschema
@@ -290,7 +290,7 @@ pytzdata==2020.1
     # via pendulum
 pyyaml==5.4.1
     # via
-    #   -r https://osm.etsi.org/gitweb/?p=osm/common.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=paas
     #   apispec
     #   clickclick
     #   connexion
index 396e136..73d09af 100644 (file)
@@ -82,7 +82,7 @@ class GcpCollector(VIMConnector):
                 log.info(response["items"])
                 for server in response["items"]:
                     vm = {
-                        "id": server["id"],
+                        "id": server["name"],
                         "name": server["name"],
                         "status": (1 if (server["status"] == "RUNNING") else 0),
                     }