Use the name of the VM as id for gcp vim_connector 65/12865/2
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Wed, 25 Jan 2023 15:11:54 +0000 (16:11 +0100)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Wed, 8 Feb 2023 10:24:18 +0000 (11:24 +0100)
Change-Id: I7472839c5c53dabda12c9fbf5bdfa6d0adc8b5b2
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
src/osm_ngsa/osm_mon/vim_connectors/gcp.py

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),
                     }