From 7a342bb6e3d2a70822befcf6c32f869c96cc3430 Mon Sep 17 00:00:00 2001
From: Waleed Akbar <wakbar@cttc.es>
Date: Tue, 16 Apr 2024 09:22:03 +0000
Subject: [PATCH] Added new message (KpiDescriptorFilter) and updated method
 name

---
 proto/kpi_manager.proto | 42 +++++++++++++++++++++++++++--------------
 1 file changed, 28 insertions(+), 14 deletions(-)

diff --git a/proto/kpi_manager.proto b/proto/kpi_manager.proto
index f5769ed37..ad48eb84f 100644
--- a/proto/kpi_manager.proto
+++ b/proto/kpi_manager.proto
@@ -19,27 +19,41 @@ import "context.proto";
 import "kpi_sample_types.proto";
 
 service KpiManagerService{
-  rpc SetKpi                (KpiDescriptor      ) returns (KpiId               ) {} // Stable not final
-  rpc DeleteKpi             (KpiId              ) returns (context.Empty       ) {} // Stable and final
-  rpc GetKpiDescriptor      (KpiId              ) returns (KpiDescriptor       ) {} // Stable and final
-  rpc GetKpiDescriptorList  (context.Empty      ) returns (KpiDescriptorList   ) {} // Stable and final
+  rpc SetKpiDescriptor    (KpiDescriptor      ) returns (KpiId               ) {} // Stable not final
+  rpc DeleteKpiDescriptor (KpiId              ) returns (context.Empty       ) {} // Stable and final
+  rpc GetKpiDescriptor    (KpiId              ) returns (KpiDescriptor       ) {} // Stable and final
+  rpc SelectKpiDescriptor (KpiDescriptorFilter) returns (KpiDescriptorList   ) {} // Stable and final
+}
+
+
+message KpiId {
+  context.Uuid kpi_id = 1;
 }
 
 message KpiDescriptor {
   KpiId                          kpi_id          = 1;
   string                         kpi_description = 2;
-  repeated KpiId                 kpi_id_list     = 3;
-  kpi_sample_types.KpiSampleType kpi_sample_type = 4;
-  context.DeviceId               device_id       = 5;
-  context.EndPointId             endpoint_id     = 6;
-  context.ServiceId              service_id      = 7;
-  context.SliceId                slice_id        = 8;
-  context.ConnectionId           connection_id   = 9;
-  context.LinkId                 link_id         = 10;
+  kpi_sample_types.KpiSampleType kpi_sample_type = 3;
+  context.DeviceId               device_id       = 4;
+  context.EndPointId             endpoint_id     = 5;
+  context.ServiceId              service_id      = 6;
+  context.SliceId                slice_id        = 7;
+  context.ConnectionId           connection_id   = 8;
+  context.LinkId                 link_id         = 9;
 }
 
-message KpiId {
-  context.Uuid kpi_id = 1;
+message KpiDescriptorFilter {
+  // KPI Descriptors that fulfill the filter are those that match ALL the following fields.
+  // An empty list means: any value is accepted.
+  // All fields empty means: list all KPI Descriptors
+  repeated KpiId                          kpi_id          = 1;
+  repeated kpi_sample_types.KpiSampleType kpi_sample_type = 2;
+  repeated context.DeviceId               device_id       = 3;
+  repeated context.EndPointId             endpoint_id     = 4;
+  repeated context.ServiceId              service_id      = 5;
+  repeated context.SliceId                slice_id        = 6;
+  repeated context.ConnectionId           connection_id   = 7;
+  repeated context.LinkId                 link_id         = 8;
 }
 
 message KpiDescriptorList {
-- 
GitLab