From ea93d7343286fb9ec86f4d94278973958c70dba5 Mon Sep 17 00:00:00 2001 From: vavuthu Date: Fri, 10 Nov 2023 19:27:56 +0530 Subject: [PATCH] creata data directory for downloading mcg-cli Signed-off-by: vavuthu --- ocs_ci/ocs/resources/mcg.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ocs_ci/ocs/resources/mcg.py b/ocs_ci/ocs/resources/mcg.py index 3f471456c5e..d7a02f494b8 100644 --- a/ocs_ci/ocs/resources/mcg.py +++ b/ocs_ci/ocs/resources/mcg.py @@ -31,6 +31,7 @@ from ocs_ci.utility import templating, version from ocs_ci.utility.retry import retry from ocs_ci.utility.utils import ( + create_directory_path, get_attr_chain, get_ocs_build_number, exec_cmd, @@ -943,6 +944,10 @@ def retrieve_noobaa_cli_binary(self): pull_secret_path = os.path.join(constants.DATA_DIR, "pull-secret") + # create DATA_DIR if it doesn't exist + if not os.path.exists(constants.DATA_DIR): + create_directory_path(constants.DATA_DIR) + if not os.path.isfile(pull_secret_path): logger.info( f"Extracting pull-secret and placing it under {pull_secret_path}"