X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=osm_lcm%2Fvim_sdn.py;h=3f323d65c07189afdb5c7c0985b30e9f088ff98f;hb=015edaa3de558e66c8520d64ba141c6b0c669833;hp=c81969abd306ede66c2ab035a9cf09544eb2b924;hpb=1b2b840cfdc739e2c7dcd49dafd38577124c58b2;p=osm%2FLCM.git diff --git a/osm_lcm/vim_sdn.py b/osm_lcm/vim_sdn.py index c81969a..3f323d6 100644 --- a/osm_lcm/vim_sdn.py +++ b/osm_lcm/vim_sdn.py @@ -1295,6 +1295,32 @@ class K8sClusterLcm(LcmBase): self.logger.error(logging_text + "Cannot update database: {}".format(e)) self.lcm_tasks.remove("k8scluster", k8scluster_id, order_id) + async def edit(self, k8scluster_content, order_id): + + op_id = k8scluster_content.pop("op_id", None) + if not self.lcm_tasks.lock_HA("k8scluster", "edit", op_id): + return + + k8scluster_id = k8scluster_content["_id"] + logging_text = "Task k8scluster_edit={} ".format(k8scluster_id) + self.logger.debug(logging_text + "Enter") + + # TODO the implementation is pending and will be part of a new feature + # It will support rotation of certificates, update of credentials and K8S API endpoint + # At the moment the operation is set as completed + + operation_state = "COMPLETED" + operation_details = "Not implemented" + + self.lcm_tasks.unlock_HA( + "k8scluster", + "edit", + op_id, + operationState=operation_state, + detailed_status=operation_details, + ) + self.lcm_tasks.remove("k8scluster", k8scluster_id, order_id) + async def delete(self, k8scluster_content, order_id): # HA tasks and backward compatibility: