def list_file_names_and_parse_to_complete_json(self):
        """Prepare the file names and make complete json."""
        __method_name = inspect.currentframe().f_code.co_name
        try:
            applogger.debug(
                consts.LOG_FORMAT.format(
                    consts.LOGS_STARTS_WITH,
                    __method_name,
                    consts.PARSE_RAW_JSON_DATA_FUNCTION_NAME,
                    "Started",
                )
            )

            list_of_files = self.utils_obj.list_file_names_in_file_share(self.parent_dir, consts.FILE_NAME_PREFIX)
            if not list_of_files:
                applogger.info(
                    consts.LOG_FORMAT.format(
                        consts.LOGS_STARTS_WITH,
                        __method_name,
                        consts.PARSE_RAW_JSON_DATA_FUNCTION_NAME,
                        "No files found in file share.",
                    )
                )
                return

            def extract_number(s):
                match = re.search(r"(\d+)$", s)
                return int(match.group(1)) if match else None

            list_of_files = sorted(list_of_files, key=extract_number)

            list_of_files_to_parse = self.return_file_names_to_parse(list_of_files)

            nested_combined_files_list = self.create_list_of_file_name_list(list_of_files_to_parse)

            # Iterate over each sublist and send it to the combine_and_make_complete_json function.
            for threat_iocs_file_list in nested_combined_files_list:
                if len(threat_iocs_file_list) > 0:
                    file_prefix = "_".join(threat_iocs_file_list[0].split("_")[:-1])
                    file_prefix = file_prefix.replace("raw", "parse")
                    index = self.get_checkpoint_data(file_prefix)
                    self.combine_and_make_complete_json(threat_iocs_file_list, index)

        except Exception as error:
            applogger.error(
                consts.LOG_FORMAT.format(
                    consts.LOGS_STARTS_WITH,
                    __method_name,
                    consts.PARSE_RAW_JSON_DATA_FUNCTION_NAME,
                    "Unknow error while parsing files: Error-{}".format(error),
                )
            )
            raise InfobloxException()
Prepare the file names and make complete json.
Solutions/Infoblox/Data Connectors/InfobloxCloudDataConnector/InfobloxParseRawIndicators/parse_json_files.py