logic.Interactions_utils module

This class groups the methods related to the interactions between the Manager and the Core.

logic.Interactions_utils.add_new_svc_request(new_request_json)[source]

This method adds a new service request to the related service interaction file of the manager and updates it in the AAS Archive.

Args:

new_request_json: The service requests content in JSON format.

logic.Interactions_utils.create_svc_request_json(interaction_id, svc_id, svc_type, svc_data=None)[source]

This method creates a service request JSON object.

Args:

interaction_id (int): Identifier of the interaction. svc_id (str): Identifier of the service svc_type (str): Type of the service. svc_data (dict, optional): Data of the service in JSON format.

Returns:

dict: a JSON object with the service request information.

logic.Interactions_utils.get_svc_info(requested_entity, interaction_id)[source]
This method obtains the information of the service considering the entity that has requested the service. In the

entity is Manager it has to search in Manager requests and Core responses, and in the case of being the Core the one that has made the request, the opposite.

Args:

requested_entity (str): The entity that has requested the service, to know in which interaction files to search. interaction_id (int): Identifier of the interaction.

Returns:

dict: Information of the service request in JSON format dict: Information of the service response in JSON format.

logic.Interactions_utils.get_svc_request_info(interaction_id)[source]

This method gets the information of a service request.

Args:

interaction_id (int): Identifier of the interaction.

Returns:

dict: the information of the service request in JSON format.

logic.Interactions_utils.get_svc_response_info(interaction_id)[source]

This method gets the information of a response from the AAS Core related to a request made by the AAS Manager.

Args:

interaction_id (int): Identifier of the interaction.

Returns:

dict: the information of the service request in JSON format.

logic.Interactions_utils.save_svc_info_in_log_file(requested_entity, svc_type_log_file_name, interaction_id)[source]

This method saves the information of a service request in the associated log file.

Args:

requested_entity (str): The entity that has requested the service, to know in which interaction files to search. svc_type_log_file_name (str): The log file name of the service type. interaction_id (int): Identifier of the interaction.