- http_code, resp = self._http.put_cmd(endpoint='{}/{}'.format(self._apiBase,cluster['_id']),
- postfields_dict=k8s_cluster)
- # print 'HTTP CODE: {}'.format(http_code)
- # print 'RESP: {}'.format(resp)
+ if "vim_account" in k8s_cluster:
+ vim_account = self._get_vim_account(k8s_cluster["vim_account"])
+ k8s_cluster["vim_account"] = vim_account["_id"]
+ if "vca" in vim_account:
+ k8s_cluster["vca_id"] = vim_account["vca"]
+ http_code, resp = self._http.patch_cmd(
+ endpoint="{}/{}".format(self._apiBase, cluster["_id"]),
+ postfields_dict=k8s_cluster,
+ )
+
+ if wait:
+ wait_id = cluster["_id"]
+ self._wait(wait_id, wait)
+
+ self._logger.debug("HTTP CODE: {}".format(http_code))
+ self._logger.debug("RESP: {}".format(resp))
+