from parallels.core.utils.message_utils import single_line_message
from parallels.core.utils.message_utils import multi_line_message

LOG_EXCEPTION = single_line_message("""
	Exception:
""")
PARSING_ENVIRONMENT_SECTION_OF_FILE = single_line_message("""
	Parsing the 'environment' section of the '%s' file
""")
INPUT_XML_IS_CORRUPTED_IN_FILES_SECTION = single_line_message("""
	Input XML is corrupted in the 'files' section
""")
INFO_ABOUT_ENVIRONMENT_WAS_CLEARED = single_line_message("""
	Information about the environment was cleared in the 'transfer strategy calculator'
""")
ANALYSING_NETWORK_SPEED = single_line_message("""
	Analysing network speed between target and source '%s' nodes
""")
FOLLOWING_CONTENT_TRANSFER_STRATEGY_WAS_SELECTED = single_line_message("""
	The following content transfer strategy was selected: '%s'
""")
INPUT_XML_FILE_IS_CORRUPTED = single_line_message("""
	Input XML file '%s' is corrupted
""")
NET_CRITICAL_USE_COMPRESSION_MSG = single_line_message("""
	NET = CRITICAL: use compression
""")
UNABLE_TO_ESTIMATE_RSYNC_ACCELERATION = single_line_message("""
	Unable to estimate rsync acceleration
""")
TARGET_SERVER_IS_READY_FOR_ANALYSIS = single_line_message("""
	The target server is ready for analysis
""")
CPU_UNKNOWN_RAM_OK_USE_COMPRESSION = single_line_message("""
	CPU = UNKNOWN, RAM = OK: use compression
""")
UNABLE_TO_LOAD_INPUT_DATA_FOR_STRATEGY_CALCULATION = single_line_message("""
	Unable to load input data for the transfer strategy calculation
""")
CALCULATING_RSYNC_ACCELERATION_FOR_COMPRESSION_LEVEL = single_line_message("""
	Calculating 'rsync' acceleration for the compression level %s
""")
UNABLE_TO_DETECT_NETWORK_SPEED = single_line_message("""
	Unable to detect network speed. Skipping the strategy analysis
""")
ERROR_WHILE_READING_RSYNC_OUTPUT = single_line_message("""
	An error occurred while reading rsync output data
""")
UNABLE_TO_FIND_INFO_ABOUT_WEBSPACE = single_line_message("""
	Unable to find information about the '%s' webspace. Skipping the strategy analysis
""")
UNABLE_TO_DETECT_CPU_USAGE = single_line_message("""
	Unable to detect CPU usage. Skipping the strategy analysis
""")
ERROR_WHILE_TRANSFERRING_TEST_FILE = single_line_message("""
	An error occurred while transferring a %d MB test file
""")
INTERNAL_ERROR_UNABLE_TO_ANALYSE_SN = single_line_message("""
	Internal error: Unable to analyse a service node. Contact Odin support for assistance
""")
HOSTING_ANALYZER_NO_PYTHON_AVAILABLE = single_line_message("""
	Server {server} has no Python available to perform the analysis
""")
UNABLE_TO_UPDATE_ENVIRONMENT_ESTIMATION_FOR_SOURCE = single_line_message("""
	Unable to update environment estimation for source nodes
""")
ESTIMATED_TIME_FOR_SENDING_FILES_NO_COMPRESSION = single_line_message("""
	Estimated time for sending files without compression: '%s'
""")
INTERNAL_ERROR_UNABLE_TO_REANALYSE_SOURCE = single_line_message("""
	Internal error: Unable to re-analyse the source nodes. Contact Odin support for assistance
""")
UNABLE_TO_LOG_DEBUG_INFO_ABOUT_RSYNC_CALCULATION = single_line_message("""
	Unable to log debug info about rsync acceleration calculation
""")
DATA_COMPRESSION_IS_NOT_RECOMMENDED = single_line_message("""
	Data compression is not recommended
""")
FASTER_CALCULATION = single_line_message("""
	With the use of compression at the %sth level, data will be transferred %s times faster
""")
INPUT_XML_IS_CORRUPTED_IN_OS_SECTION = single_line_message("""
	Input XML is corrupted in the 'os' section
""")
TARGET_SERVER_IS_READY_FOR_NETWORK_ANALYSIS = single_line_message("""
	The target server is now ready for network speed analysis
""")
NET_CRITICAL_USE_COMPRESSION = single_line_message("""
	NET = CRITICAL: use compression
""")
CHECKING_INPUT_XML_STRUCTURE = single_line_message("""
	Checking the input XML structure
""")
DEFAULT_STRATEGY_SKIP_COMPRESSION = single_line_message("""
	Default strategy: skip compression
""")
ERROR_OCCURRED_WHILE_TRANSFERRING_TEST_FILE = single_line_message("""
	An error occurred while transferring a %d MB test file
""")
DETECTED_PYTHON_BIN = single_line_message("""
	Detected Python: {path}
""")
TRANSFER_STRATEGY_CALCULATOR_WAS_CREATED = single_line_message("""
	The 'transfer strategy calculator' was created
""")
DATA_COMPRESSION_IS_RECOMMENDED = single_line_message("""
	Data compression is recommended
""")
CPU_CRITICAL_SKIP_COMPRESSION = single_line_message("""
	CPU = CRITICAL: skip compression
""")
CPU_UNKNOWN_RAM_CRITICAL_USE_COMPRESSION = single_line_message("""
	CPU = UNKNOWN, RAM = CRITICAL: use compression
""")
ESTIMATED_TIME_FOR_SENDING_FILES_WITH_COMPRESSION = single_line_message("""
	Estimated time for sending files with compression: '%s'
""")
PARSING_FILES_SECTION_OF_FILE = single_line_message("""
	Parsing the 'files' section of the '%s' file
""")
PREPARING_TARGET_SERVER_FOR_NETWORK_ANALYSIS = single_line_message("""
	Preparing a target server for network speed analysis
""")
UNABLE_TO_LOAD_INPUT_XML_DATA = single_line_message("""
	Unable to load input XML data '%s'
""")
DETERMINING_SUITABLE_CONTENT_TRANSFER_STRATEGY = single_line_message("""
	Determining a suitable content transfer strategy
""")
UPDATING_RESULTS_OF_SOURCE_NODES_ANALYSIS = single_line_message("""
	Updating the results of source nodes analysis
""")
ESTIMATED_TIME_FOR_READING_FILES_FROM_HDD = single_line_message("""
	Estimated time for reading files from HDD: '%s'
""")
ESTIMATED_TIME_FOR_COMPRESSING_FILES = single_line_message("""
	Estimated time for compressing files: '%s'
""")
UNABLE_TO_CLEAN_UP_FOLDER = single_line_message("""
	Unable to clean up the folder '%s'
""")
NETWORK_SPEED_ANALYSIS_WAS_SKIPPED = single_line_message("""
	Network speed analysis was skipped: it is impossible to transfer data from a Linux platform to a Windows platform,
	and vice versa
""")
UNABLE_TO_DETERMINE_PROPER_STRATEGY = single_line_message("""
	Unable to determine the proper strategy
""")
INFO_FOR_HOSTING_ENVIRONMENT_ANALYSIS_NOT_AVAILABLE = multi_line_message("""
	Information for hosting environment analysis is not available. For this reason, a search for an effective content transfer strategy will not be performed.
	To gather this information, run 'panel-migrator analyse-hosting config.ini'.
	
""")
XML_FILE_WAS_SUCCESSFULLY_PARSED = single_line_message("""
	The XML file '%s' was successfully parsed
""")
HDD_CRITICAL_SKIP_COMPRESSION = single_line_message("""
	HDD = CRITICAL: skip compression
""")
NOT_ALL_ENVIRONMENT_PARAMETERS_WERE_DETECTED = single_line_message("""
	Not all environment parameters were detected. Skipping the strategy analysis
""")
DEFAULT_STRATEGY_USE_COMPRESSION = single_line_message("""
	Default strategy: use compression
""")
TRYING_TO_LOAD_INPUT_XML_FILE = single_line_message("""
	Trying to load the input XML file '%s'
""")
DEBUG_CALCULATING_NET_SPEED = single_line_message("""
	Calculating the approximate network speed for a %d MB test file. Maximum: %d [B/s], Current: %d [B/s]
""")
DEBUG_NET_SPEED_RESULTS = single_line_message("""
	Network speed measurement results for a %d MB test file: '%s'. Average speed: '%f' [B/s]
""")
DEBUG_NET_SPEED_MAX = single_line_message("""
	The maximum approximate network speed for a %d MB test file is: '%f' [B/s]
""")
DEBUG_NET_SPEED_ESTIMATION_FINISHED = single_line_message("""
	Network speed estimation is finished. The highest value: '%f' [B/s]
""")
LOG_ANALYSING_SOURCE_NODE = single_line_message("""
	Analysing source node '%s'
""")
DEFAULT_TRANSFER_STRATEGY = single_line_message("""
	Default transfer strategy
""")
DEBUG_PARSING_XML_FILE = single_line_message("""
	Parsing the XML file '%s'
""")
LOG_COMPLETED = single_line_message("""
	Completed
""")
DEBUG_INPUT_XML_OK = single_line_message("""
	Input XML is OK
""")
DEBUG_NET_SPEED = single_line_message("""
	Network speed: '%s/sec
""")
DEBUG_RSYNC_ACC_COEF = single_line_message("""
	Rsync acceleration coefficient: '%f'
""")
DEBUG_EST_TIME_COMPRESSION_NO_CACHE = single_line_message("""
	Estimated time for transferring with compression (no file caching): '%s'
""")
DEBUG_EST_TIME_NO_COMPRESSION_NO_CACHE = single_line_message("""
	Estimated time for transferring without compression (no file caching): '%s'
""")
DEBUG_EST_TIME_COMPRESSION_CACHE = single_line_message("""
	Estimated time for transferring with compression (full file caching): '%s'
""")
DEBUG_EST_TIME_NO_COMPRESSION_CACHE = single_line_message("""
	Estimated time for transferring without compression (full file caching): '%s'
""")
DEBUG_SELECTING_STRATEGY = single_line_message("""
	Selecting the proper strategy
""")
DEBUG_ENV_EST_FITS = single_line_message("""
	env_estimation '%s' fits estimation_pattern '%s'
""")
DEBUG_ENV_EST_DOES_NOT_FIT = single_line_message("""
	env_estimation '%s' does not fit estimation_pattern '%s'
""")
DEBUG_ENV_ANALYSIS = single_line_message("""
	Environment analysis
""")
DEBUG_CPU_USAGE = single_line_message("""
	CPU usage: '%d'%%
""")
DEBUG_RAM_USAGE = single_line_message("""
	RAM usage: '%d'%%
""")
DEBUG_HDD_WRITE = single_line_message("""
	HDD write: '%d' B/s
""")
DEBUG_HDD_READ = single_line_message("""
	HDD read: '%d' B/s
""")
DEBUG_NET_UPLOAD_SPEED = single_line_message("""
	Network upload speed: '%d' B/s
""")
DEBUG_ENV_ESTIMATION = single_line_message("""
	Environment estimation (CPU, RAM, HDD, NET): '%s'
""")