Pass src_file and dest_filename in kubectl.create_pvc_with_content
Change-Id: I81d530c170aad0f3d4e84ef9b687863a4c1983b9
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
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 @@
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 @@
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(