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 ""
if vim_config:
vim_account["config"] = vim_config
# vim_account['config'] = json.dumps(vim_config)
+
http_code, resp = self._http.post_cmd(
endpoint=self._apiBase, postfields_dict=vim_account
)
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"]
+ vim_account["prometheus-config"] = vim_access["prometheus-config"]
return vim_account
def get_id(self, name):