else:
db_cluster["resourceState"] = "ERROR"
+ db_cluster = self.update_operation_history(
+ db_cluster, workflow_status, resource_status
+ )
+
db_cluster["operatingState"] = "IDLE"
- db_cluster = self.update_operation_history(
- db_cluster, workflow_status, resource_status
- )
# self.logger.info("db_cluster: {}".format(db_cluster))
# TODO: verify enxtcondition
# For the moment, if the workflow completed successfully, then we update the db accordingly.
if workflow_status:
if "k8s_version" in op_params:
db_cluster["k8s_version"] = op_params["k8s_version"]
- elif "node_count" in op_params:
+ if "node_count" in op_params:
db_cluster["node_count"] = op_params["node_count"]
+ if "node_size" in op_params:
+ db_cluster["node_count"] = op_params["node_size"]
# self.db.set_one(self.db_collection, {"_id": _id}, db_content)
db_cluster["current_operation"] = None
self.db.set_one("clusters", {"_id": db_cluster["_id"]}, db_cluster)
"cluster", cluster_id, cluster_id, "cluster_get_credentials", task
)
return
- elif command == "upgrade" or command == "scale":
+ elif command == "upgrade" or command == "scale" or command == "update":
# db_vim = self.db.get_one("vim_accounts", {"_id": db_cluster["vim_account"]})
db_vim = self.db.get_one(
"vim_accounts", {"name": db_cluster["vim_account"]}