import yaml
-from osm_lcm.lcm_utils import LcmException
async def create_oka(self, op_id, op_params, content):
oka_folder = f"{oka_fs_info['path']}{oka_fs_info['folder']}"
oka_filename = oka_fs_info["zipfile"]
self.fs.sync(oka_folder)
- if not self.fs.file_exists(f"{oka_folder}/{oka_filename}"):
- raise LcmException(message="Not able to find oka", bad_args=["oka_path"])
+ self.logger.info("OKA Folder: {} OKA filename: {}".format(oka_folder, oka_filename))
+ # TODO: check if file exists
+ # if not self.fs.file_exists(f"{oka_folder}/{oka_filename}"):
+ # raise LcmException(message="Not able to find oka", bad_args=["oka_path"])
+ self.logger.debug("Processing....")
# Create temporary volume for the OKA package and copy the content
temp_volume_name = f"temp-pvc-oka-{op_id}"
await self._kubectl.create_pvc_with_content(
name=temp_volume_name,
namespace="osm-workflows",
- src_folder=oka_folder,
- filename=oka_filename,
+ src_file=f"{oka_folder}/{oka_filename}",
+ dest_filename=f"{oka_name}.tar.gz",
)
# Render workflow