From ba8584194906ea3813e9992a1380efafb44d50c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gurhem?= Date: Thu, 15 Sep 2022 10:57:11 +0200 Subject: [PATCH 1/3] Add results service --- .../ArmoniK.Api.Client.csproj | 3 +++ .../ArmoniK.Api.Core/ArmoniK.Api.Core.csproj | 3 +++ Protos/V1/results_common.proto | 21 +++++++++++++++++++ Protos/V1/results_service.proto | 15 +++++++++++++ 4 files changed, 42 insertions(+) create mode 100644 Protos/V1/results_common.proto create mode 100644 Protos/V1/results_service.proto diff --git a/Api/csharp/ArmoniK.Api.Client/ArmoniK.Api.Client.csproj b/Api/csharp/ArmoniK.Api.Client/ArmoniK.Api.Client.csproj index 388ba6753..03b7c9421 100644 --- a/Api/csharp/ArmoniK.Api.Client/ArmoniK.Api.Client.csproj +++ b/Api/csharp/ArmoniK.Api.Client/ArmoniK.Api.Client.csproj @@ -47,5 +47,8 @@ gRPC\Protos\tasks_service.proto + + gRPC\Protos\results_service.proto + diff --git a/Api/csharp/ArmoniK.Api.Core/ArmoniK.Api.Core.csproj b/Api/csharp/ArmoniK.Api.Core/ArmoniK.Api.Core.csproj index 9357d4dff..4896829ce 100644 --- a/Api/csharp/ArmoniK.Api.Core/ArmoniK.Api.Core.csproj +++ b/Api/csharp/ArmoniK.Api.Core/ArmoniK.Api.Core.csproj @@ -46,6 +46,9 @@ gRPC\Protos\tasks_service.proto + + gRPC\Protos\results_service.proto + diff --git a/Protos/V1/results_common.proto b/Protos/V1/results_common.proto new file mode 100644 index 000000000..f46d0de7c --- /dev/null +++ b/Protos/V1/results_common.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; + +package armonik.api.grpc.v1.results; + +import "result_status.proto"; + +option csharp_namespace = "ArmoniK.Api.gRPC.V1.Results"; + +message GetOwnerTaskIdRequest { + string session_id = 1; + repeated string result_id = 2; +} + +message GetOwnerTaskIdResponse { + message MapResultTask { + string result_id = 1; + string task_id = 2; + } + repeated MapResultTask result_task = 1; + string session_id = 2; +} diff --git a/Protos/V1/results_service.proto b/Protos/V1/results_service.proto new file mode 100644 index 000000000..059c3a298 --- /dev/null +++ b/Protos/V1/results_service.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; + +package armonik.api.grpc.v1.results; + +import "results_common.proto"; + +option csharp_namespace = "ArmoniK.Api.gRPC.V1.Results"; + +/** + * The ResultsService provides methods for interacting with results + */ +service Results { + // Get the id of the task that should produce the result + rpc GetOwnerTaskId(GetOwnerTaskIdRequest) returns (GetOwnerTaskIdResponse); +} From e2d61893d1f98c3212963c6de493460470737d89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gurhem?= Date: Thu, 15 Sep 2022 10:59:55 +0200 Subject: [PATCH 2/3] Add doc --- Protos/V1/results_common.proto | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Protos/V1/results_common.proto b/Protos/V1/results_common.proto index f46d0de7c..814ba14fc 100644 --- a/Protos/V1/results_common.proto +++ b/Protos/V1/results_common.proto @@ -6,11 +6,17 @@ import "result_status.proto"; option csharp_namespace = "ArmoniK.Api.gRPC.V1.Results"; +/* +* Request for getting the id of the task that should create this result +*/ message GetOwnerTaskIdRequest { string session_id = 1; repeated string result_id = 2; } +/* +* Response for getting the id of the task that should create this result +*/ message GetOwnerTaskIdResponse { message MapResultTask { string result_id = 1; From 47943ec9a5cc4f0e33c9dc1495e8ce29cbe315de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gurhem?= Date: Thu, 15 Sep 2022 11:15:05 +0200 Subject: [PATCH 3/3] Add results_common in common project --- Api/csharp/ArmoniK.Api.Common/ArmoniK.Api.Common.csproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Api/csharp/ArmoniK.Api.Common/ArmoniK.Api.Common.csproj b/Api/csharp/ArmoniK.Api.Common/ArmoniK.Api.Common.csproj index a25038b54..2574a7aec 100644 --- a/Api/csharp/ArmoniK.Api.Common/ArmoniK.Api.Common.csproj +++ b/Api/csharp/ArmoniK.Api.Common/ArmoniK.Api.Common.csproj @@ -63,6 +63,10 @@ Message True + + Message + True +