X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osmclient%2Fsol005%2Fvim.py;h=6be1dbb6b3c84c83a201d804d4824ccea6d9a9f9;hb=bffe6b7c226a1a37fdd94da6c45f4244810d3eae;hp=72a0822644a94d51520db580b69450f81c3095a6;hpb=2018277d9c99a7b958b26163ee319ceefa7e9d3c;p=osm%2Fosmclient.git diff --git a/osmclient/sol005/vim.py b/osmclient/sol005/vim.py index 72a0822..6be1dbb 100644 --- a/osmclient/sol005/vim.py +++ b/osmclient/sol005/vim.py @@ -62,10 +62,7 @@ class Vim(object): self._logger.debug("") self._client.get_token() for vim in self.list(): - if name == vim["uuid"]: - return vim["uuid"] - for vim in self.list(): - if name == vim["name"]: + if name == vim["uuid"] or name == vim["name"]: return vim["uuid"] return "" @@ -197,6 +194,8 @@ class Vim(object): vim_account["vim_user"] = vim_access["vim-username"] or "null" vim_account["vim_password"] = vim_access["vim-password"] or "null" vim_account["vim_tenant_name"] = vim_access["vim-tenant-name"] or "null" + if "prometheus-config" in vim_access: + vim_account["prometheus-config"] = vim_access["prometheus-config"] return vim_account def get_id(self, name):