Skip to content
Snippets Groups Projects
Commit 9ac7f427 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Pre-merge cleanup

parent 3355487d
No related branches found
No related tags found
2 merge requests!294Release TeraFlowSDN 4.0,!207Resolve "(CTTC) Separation of Monitoring"
// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3"; syntax = "proto3";
package device; package analytics_frontend;
import "context.proto"; import "context.proto";
import "kpi_manager.proto"; import "kpi_manager.proto";
import "kpi_sample_types.proto"; //import "kpi_sample_types.proto";
service AnalyticsFrontendService { service AnalyticsFrontendService {
rpc StartAnalyzer (Analyzer ) returns (AnalyzerId ) {} rpc StartAnalyzer (Analyzer ) returns (AnalyzerId ) {}
...@@ -15,33 +29,39 @@ message AnalyzerId { ...@@ -15,33 +29,39 @@ message AnalyzerId {
context.Uuid analyzer_id = 1; context.Uuid analyzer_id = 1;
} }
enum AnalyzerMode { enum AnalyzerOperationMode {
ANALYZERMODE_BATCH = 0; ANALYZEROPERATIONMODE_BATCH = 0;
ANALYZERMODE_STRAMING = 1; ANALYZEROPERATIONMODE_STREAMING = 1;
} }
message Analyzer { message Analyzer {
repeated kpi_manager.KpiId kpi_id = 1; // The KPI Ids to be processed by the analyzer string algorithm_name = 1; // The algorithm to be executed
AnalyzerMode mode = 2; // Operation mode of the analyzer repeated kpi_manager.KpiId input_kpi_ids = 2; // The KPI Ids to be processed by the analyzer
float batch_min_duration_s = 3; // In batch mode, min duration to collect before executing batch repeated kpi_manager.KpiId output_kpi_ids = 3; // The KPI Ids produced by the analyzer
float batch_max_duration_s = 4; // In batch mode, max duration collected to execute the batch AnalyzerOperationMode operation_mode = 4; // Operation mode of the analyzer
uint64 batch_min_size = 5; // In batch mode, min number of samples to collect before executing batch
uint64 batch_max_size = 6; // In batch mode, max number of samples collected to execute the batch // In batch mode...
float batch_min_duration_s = 5; // ..., min duration to collect before executing batch
float batch_max_duration_s = 6; // ..., max duration collected to execute the batch
uint64 batch_min_size = 7; // ..., min number of samples to collect before executing batch
uint64 batch_max_size = 8; // ..., max number of samples collected to execute the batch
} }
message AnalyzerFilter { message AnalyzerFilter {
// Analyzer that fulfill the filter are those that match ALL the following fields. // Analyzer that fulfill the filter are those that match ALL the following fields.
// An empty list means: any value is accepted. // An empty list means: any value is accepted.
// All fields empty means: list all Analyzers // All fields empty means: list all Analyzers
repeated AnalyzerId analyzer_id = 1; repeated AnalyzerId analyzer_id = 1;
repeated kpi_manager.KpiId kpi_id = 2; repeated string algorithm_names = 2;
repeated kpi_sample_types.KpiSampleType kpi_sample_type = 3; repeated kpi_manager.KpiId input_kpi_ids = 3;
repeated context.DeviceId device_id = 4; repeated kpi_manager.KpiId output_kpi_ids = 4;
repeated context.EndPointId endpoint_id = 5; //repeated kpi_sample_types.KpiSampleType kpi_sample_type = 5; // Not implemented
repeated context.ServiceId service_id = 6; //repeated context.DeviceId device_id = 6; // Not implemented
repeated context.SliceId slice_id = 7; //repeated context.EndPointId endpoint_id = 7; // Not implemented
repeated context.ConnectionId connection_id = 8; //repeated context.ServiceId service_id = 8; // Not implemented
repeated context.LinkId link_id = 9; //repeated context.SliceId slice_id = 9; // Not implemented
//repeated context.ConnectionId connection_id = 10; // Not implemented
//repeated context.LinkId link_id = 11; // Not implemented
} }
message AnalyzerList { message AnalyzerList {
......
...@@ -16,8 +16,7 @@ syntax = "proto3"; ...@@ -16,8 +16,7 @@ syntax = "proto3";
package device; package device;
import "context.proto"; import "context.proto";
//import "monitoring.proto"; import "monitoring.proto"; // to be migrated to: "kpi_manager.proto"
import "kpi_manager.proto";
service DeviceService { service DeviceService {
rpc AddDevice (context.Device ) returns (context.DeviceId ) {} rpc AddDevice (context.Device ) returns (context.DeviceId ) {}
...@@ -28,8 +27,8 @@ service DeviceService { ...@@ -28,8 +27,8 @@ service DeviceService {
} }
message MonitoringSettings { message MonitoringSettings {
kpi_manager.KpiId kpi_id = 1; monitoring.KpiId kpi_id = 1; // to be migrated to: "kpi_manager.KpiId"
kpi_manager.KpiDescriptor kpi_descriptor = 2; monitoring.KpiDescriptor kpi_descriptor = 2; // to be migrated to: "kpi_manager.KpiDescriptor"
float sampling_duration_s = 3; float sampling_duration_s = 3;
float sampling_interval_s = 4; float sampling_interval_s = 4;
} }
...@@ -16,14 +16,14 @@ syntax = "proto3"; ...@@ -16,14 +16,14 @@ syntax = "proto3";
package monitoring; package monitoring;
import "context.proto"; import "context.proto";
import "kpi_manager.proto"; import "monitoring.proto";
//import "kpi_sample_types.proto"; import "kpi_sample_types.proto";
service MonitoringService { service MonitoringService {
// rpc SetKpi (KpiDescriptor ) returns (KpiId ) {} // Stable not final rpc SetKpi (KpiDescriptor ) returns (KpiId ) {} // Stable not final
// rpc DeleteKpi (KpiId ) returns (context.Empty ) {} // Stable and final rpc DeleteKpi (KpiId ) returns (context.Empty ) {} // Stable and final
// rpc GetKpiDescriptor (KpiId ) returns (KpiDescriptor ) {} // Stable and final rpc GetKpiDescriptor (KpiId ) returns (KpiDescriptor ) {} // Stable and final
// rpc GetKpiDescriptorList (context.Empty ) returns (KpiDescriptorList ) {} // Stable and final rpc GetKpiDescriptorList (context.Empty ) returns (KpiDescriptorList ) {} // Stable and final
rpc IncludeKpi (Kpi ) returns (context.Empty ) {} // Stable and final rpc IncludeKpi (Kpi ) returns (context.Empty ) {} // Stable and final
rpc MonitorKpi (MonitorKpiRequest ) returns (context.Empty ) {} // Stable and final rpc MonitorKpi (MonitorKpiRequest ) returns (context.Empty ) {} // Stable and final
rpc QueryKpiData (KpiQuery ) returns (RawKpiTable ) {} // Not implemented rpc QueryKpiData (KpiQuery ) returns (RawKpiTable ) {} // Not implemented
...@@ -36,21 +36,32 @@ service MonitoringService { ...@@ -36,21 +36,32 @@ service MonitoringService {
rpc GetAlarmDescriptor (AlarmID ) returns (AlarmDescriptor ) {} // Stable and final rpc GetAlarmDescriptor (AlarmID ) returns (AlarmDescriptor ) {} // Stable and final
rpc GetAlarmResponseStream(AlarmSubscription ) returns (stream AlarmResponse) {} // Not Stable not final rpc GetAlarmResponseStream(AlarmSubscription ) returns (stream AlarmResponse) {} // Not Stable not final
rpc DeleteAlarm (AlarmID ) returns (context.Empty ) {} // Stable and final rpc DeleteAlarm (AlarmID ) returns (context.Empty ) {} // Stable and final
// rpc GetStreamKpi (KpiId ) returns (stream Kpi ) {} // Stable not final rpc GetStreamKpi (KpiId ) returns (stream Kpi ) {} // Stable not final
// rpc GetInstantKpi (KpiId ) returns (Kpi ) {} // Stable not final rpc GetInstantKpi (KpiId ) returns (Kpi ) {} // Stable not final
} }
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;
}
message MonitorKpiRequest { message MonitorKpiRequest {
kpi_manager.KpiId kpi_id = 1; KpiId kpi_id = 1;
float monitoring_window_s = 2; float monitoring_window_s = 2;
float sampling_rate_s = 3; float sampling_rate_s = 3;
// Pending add field to reflect Available Device Protocols // Pending add field to reflect Available Device Protocols
} }
message KpiQuery { message KpiQuery {
repeated kpi_manager.KpiId kpi_ids = 1; repeated KpiId kpi_ids = 1;
float monitoring_window_s = 2; float monitoring_window_s = 2;
uint32 last_n_samples = 3; // used when you want something like "get the last N many samples uint32 last_n_samples = 3; // used when you want something like "get the last N many samples
context.Timestamp start_timestamp = 4; // used when you want something like "get the samples since X date/time" context.Timestamp start_timestamp = 4; // used when you want something like "get the samples since X date/time"
...@@ -64,7 +75,7 @@ message RawKpi { // cell ...@@ -64,7 +75,7 @@ message RawKpi { // cell
} }
message RawKpiList { // column message RawKpiList { // column
kpi_manager.KpiId kpi_id = 1; KpiId kpi_id = 1;
repeated RawKpi raw_kpis = 2; repeated RawKpi raw_kpis = 2;
} }
...@@ -72,10 +83,12 @@ message RawKpiTable { // table ...@@ -72,10 +83,12 @@ message RawKpiTable { // table
repeated RawKpiList raw_kpi_lists = 1; repeated RawKpiList raw_kpi_lists = 1;
} }
message KpiId {
context.Uuid kpi_id = 1;
}
message Kpi { message Kpi {
kpi_manager.KpiId kpi_id = 1; KpiId kpi_id = 1;
context.Timestamp timestamp = 2; context.Timestamp timestamp = 2;
KpiValue kpi_value = 3; KpiValue kpi_value = 3;
} }
...@@ -109,7 +122,7 @@ message KpiList { ...@@ -109,7 +122,7 @@ message KpiList {
message SubsDescriptor{ message SubsDescriptor{
SubscriptionID subs_id = 1; SubscriptionID subs_id = 1;
kpi_manager.KpiId kpi_id = 2; KpiId kpi_id = 2;
float sampling_duration_s = 3; float sampling_duration_s = 3;
float sampling_interval_s = 4; float sampling_interval_s = 4;
context.Timestamp start_timestamp = 5; // used when you want something like "get the samples since X date/time" context.Timestamp start_timestamp = 5; // used when you want something like "get the samples since X date/time"
...@@ -134,7 +147,7 @@ message AlarmDescriptor { ...@@ -134,7 +147,7 @@ message AlarmDescriptor {
AlarmID alarm_id = 1; AlarmID alarm_id = 1;
string alarm_description = 2; string alarm_description = 2;
string name = 3; string name = 3;
kpi_manager.KpiId kpi_id = 4; KpiId kpi_id = 4;
KpiValueRange kpi_value_range = 5; KpiValueRange kpi_value_range = 5;
context.Timestamp timestamp = 6; context.Timestamp timestamp = 6;
} }
......
...@@ -12,13 +12,11 @@ ...@@ -12,13 +12,11 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// protocol buffers documentation: https://developers.google.com/protocol-buffers/docs/proto3
syntax = "proto3"; syntax = "proto3";
package optical_attack_detector; package optical_attack_detector;
import "context.proto"; import "context.proto";
//import "monitoring.proto"; import "monitoring.proto"; // to be migrated to: "kpi_manager.proto"
import "kpi_manager.proto";
service OpticalAttackDetectorService { service OpticalAttackDetectorService {
...@@ -29,5 +27,5 @@ service OpticalAttackDetectorService { ...@@ -29,5 +27,5 @@ service OpticalAttackDetectorService {
message DetectionRequest { message DetectionRequest {
context.ServiceId service_id = 1; context.ServiceId service_id = 1;
kpi_manager.KpiId kpi_id = 2; monitoring.KpiId kpi_id = 2; // to be migrated to: "kpi_manager.KpiId"
} }
...@@ -15,14 +15,13 @@ ...@@ -15,14 +15,13 @@
syntax = "proto3"; syntax = "proto3";
package policy; package policy;
import "monitoring.proto"; import "monitoring.proto"; // to be migrated to: "kpi_manager.proto"
import "kpi_manager.proto";
// Condition // Condition
message PolicyRuleCondition { message PolicyRuleCondition {
kpi_manager.KpiId kpiId = 1; monitoring.KpiId kpiId = 1; // to be migrated to: "kpi_manager.KpiId"
NumericalOperator numericalOperator = 2; NumericalOperator numericalOperator = 2;
monitoring.KpiValue kpiValue = 3; monitoring.KpiValue kpiValue = 3;
} }
// Operator to be used when comparing Kpis with condition values // Operator to be used when comparing Kpis with condition values
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment