From 807b8bf372fee5208a80d2cca64bdb968e9630eb Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Mon, 23 Sep 2024 13:03:00 +0200 Subject: [PATCH] Remove file extraction of OKA package Change-Id: I18638b12e24d792bbe2792f5ff98a8d9f6cc2b01 Signed-off-by: garciadeblas --- osm_nbi/k8s_topics.py | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/osm_nbi/k8s_topics.py b/osm_nbi/k8s_topics.py index 8ce81f7..8d9d244 100644 --- a/osm_nbi/k8s_topics.py +++ b/osm_nbi/k8s_topics.py @@ -15,7 +15,6 @@ import logging import yaml -import tarfile import shutil import os from http import HTTPStatus @@ -1119,22 +1118,6 @@ class OkaTopic(DescriptorTopic): break file_pkg.write(indata_text) - # PACKAGE UPLOADED - file_pkg.seek(0, 0) - if compressed == "gzip": - tar = tarfile.open(mode="r", fileobj=file_pkg) - for tarinfo in tar: - tarname = tarinfo.name - tarname_path = tarname.split("/") - self.logger.debug( - "Tarname: {} Tarname Path: {}".format(tarname, tarname_path) - ) - storage["zipfile"] = filename - self.fs.file_extract(tar, proposed_revision_path) - else: - content = file_pkg.read() - self.logger.debug("Content: {}".format(content)) - # Need to close the file package here so it can be copied from the # revision to the current, unrevisioned record if file_pkg: @@ -1147,6 +1130,7 @@ class OkaTopic(DescriptorTopic): self.fs.sync(from_path=current_revision_path) self.fs.sync(from_path=proposed_revision_path) + # Is this required? if revision > 1: try: self._validate_descriptor_changes( -- 2.25.1