From: garciadeblas Date: Tue, 24 Sep 2024 12:41:40 +0000 (+0200) Subject: Pass src_file and dest_filename in kubectl.create_pvc_with_content X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=f291215acf9be3a5a0f0b77444ee02fb724d5e0a;p=osm%2FN2VC.git Pass src_file and dest_filename in kubectl.create_pvc_with_content Change-Id: I81d530c170aad0f3d4e84ef9b687863a4c1983b9 Signed-off-by: garciadeblas --- diff --git a/n2vc/kubectl.py b/n2vc/kubectl.py index f7a0886..7e15269 100644 --- a/n2vc/kubectl.py +++ b/n2vc/kubectl.py @@ -926,15 +926,15 @@ class Kubectl: fallback=Exception("Failed creating the pvc"), ) async def create_pvc_with_content( - self, name: str, namespace: str, src_folder: str, filename: str + self, name: str, namespace: str, src_file: str, dest_filename: str ): """ Create a PVC with content :param: name: Name of the pvc to be created :param: namespace: Name of the namespace where the pvc will be stored - :param: src_folder: Folder where the file to be copied is located - :param: filename: Name of the file to be copied + :param: src_file: File to be copied + :param: filename: Name of the file in the destination folder """ pod_name = f"copy-pod-{name}" await self.create_pvc(name=name, namespace=namespace) @@ -943,8 +943,8 @@ class Kubectl: namespace=namespace, pod_name=pod_name, container_name="copy-container", - src_file=f"{src_folder}/{filename}", - dest_path=f"/mnt/data/{filename}", + src_file=src_file, + dest_path=f"/mnt/data/{dest_filename}", ) @retry(