utilities.AAS_Archive_utils module¶
File to group useful methods for accessing and managing the AAS Archive.
- utilities.AAS_Archive_utils.create_status_file()[source]¶
This method creates the status file of the AAS Manager and sets it to “initializing”. If the file exists because the AAS Manager has been restarted without terminating the Pod where it is running, the status file will be rewritten.
- utilities.AAS_Archive_utils.create_interaction_files()[source]¶
This method creates the necessary interaction files to exchange information between AAS Core and AAS Manager.
- utilities.AAS_Archive_utils.create_log_files()[source]¶
This method creates the necessary log files to save services information.
- utilities.AAS_Archive_utils.get_log_file_by_service_type(svc_type)[source]¶
This method obtains the path to the log file associated to the type of the service. :param svc_type: type of the service. :type svc_type: str
- Returns:
path to the log file
- Return type:
str
- utilities.AAS_Archive_utils.save_svc_log_info(svc_info, svc_type)[source]¶
This method saves the information about a realized service in the log file associated to the type of the service.
- Parameters:
svc_info (dict) – the information of the service in JSON format.
svc_type (str) – type of the service.
- utilities.AAS_Archive_utils.change_status(new_status)[source]¶
This method updated the status of an AAS Manager instance.
- Parameters:
new_status (str) – the new status of the AAS Manager instance.
- utilities.AAS_Archive_utils.get_status(entity)[source]¶
This method gets the status of the requested entity.
- Parameters:
entity (str) – The entity to get the status for.
- Returns:
status in JSON format.
- Return type:
dict
- utilities.AAS_Archive_utils.check_core_initialization()[source]¶
This method checks if the core has initialized so the Manager can be started.
- utilities.AAS_Archive_utils.file_to_json(file_path)[source]¶
This method gets the content of a JSON file.
- Parameters:
file_path (str) – the path of the JSON file.
- Returns:
content of the file in JSON format.
- Return type:
dict