From f291215acf9be3a5a0f0b77444ee02fb724d5e0a Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Tue, 24 Sep 2024 14:41:40 +0200 Subject: [PATCH] Pass src_file and dest_filename in kubectl.create_pvc_with_content Change-Id: I81d530c170aad0f3d4e84ef9b687863a4c1983b9 Signed-off-by: garciadeblas --- n2vc/kubectl.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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( -- 2.25.1