From: garciadeblas Date: Fri, 8 Nov 2024 10:51:02 +0000 (+0100) Subject: Fix cluster-list to retrieve vim name and type properly for each cluster X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F17%2F14717%2F1;p=osm%2Fosmclient.git Fix cluster-list to retrieve vim name and type properly for each cluster Change-Id: I5a5719d3c5a2866d9a8519e61eba875926b53a74 Signed-off-by: garciadeblas --- diff --git a/osmclient/sol005/cluster.py b/osmclient/sol005/cluster.py index 8062ce4..e5f1614 100644 --- a/osmclient/sol005/cluster.py +++ b/osmclient/sol005/cluster.py @@ -115,13 +115,14 @@ class Cluster(GenericOSMAPIObject): cluster_list1.append(item) # Complete cluster info with vim_account name and vim_type vim_list = self._client.vim.list() + self._logger.debug(f"VIM list: {vim_list}") for item in cluster_list1: vim_id = item["vim_account"] vim_name, vim_type = next( ( (vim_item["name"], vim_item["vim_type"]) for vim_item in vim_list - if vim_item["_id"] == vim_id or vim_item["name"] + if vim_item["_id"] == vim_id or vim_item["name"] == vim_id ), None, )