Skip to content
Snippets Groups Projects
Commit 6fac40e1 authored by garciadeblas's avatar garciadeblas
Browse files

Fix cluster-list to retrieve vim name and type properly for each cluster


Change-Id: I5a5719d3c5a2866d9a8519e61eba875926b53a74
Signed-off-by: default avatargarciadeblas <gerardo.garciadeblas@telefonica.com>
parent 4f231287
No related branches found
No related tags found
No related merge requests found
Pipeline #17220 passed with stage
in 3 minutes and 33 seconds
......@@ -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,
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment