-
Notifications
You must be signed in to change notification settings - Fork 1
/
check1.proto
161 lines (141 loc) · 6.44 KB
/
check1.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
/*
* Copyright 2020-2024 Exactpro (Exactpro Systems Limited)
*
* 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";
import "google/protobuf/wrappers.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/empty.proto";
import "th2_grpc_common/common.proto";
option java_multiple_files = true;
option java_package = "com.exactpro.th2.check1.grpc";
service Check1 {
rpc createCheckpoint (CheckpointRequest) returns (CheckpointResponse) {}
rpc submitCheckRule (CheckRuleRequest) returns (CheckRuleResponse) {}
rpc submitCheckSequenceRule(CheckSequenceRuleRequest) returns (CheckSequenceRuleResponse) {}
rpc submitNoMessageCheck(NoMessageCheckRequest) returns (NoMessageCheckResponse) {}
rpc waitForResult(WaitForResultRequest) returns (WaitForResultResponse) {}
rpc submitMultipleRules(MultiRulesRequest) returns (MultiRulesResponse) {}
rpc postMultipleRules(MultiRulesRequest) returns (google.protobuf.Empty) {}
}
message CheckpointRequest {
string description = 1;
EventID parent_event_id = 2;
}
message CheckpointResponse {
Checkpoint checkpoint = 1;
RequestStatus status = 2;
}
message ChainID {
string id = 1;
}
message CheckRuleRequest {
ConnectionID connectivity_id = 1;
reserved 2;
RootMessageFilter root_filter = 10;
Checkpoint checkpoint = 3; // Registered Checkpoint. If the chain_id is also set in the request the checkpoint will be ignored
int64 message_timeout = 11; // Timeout to wait for messages after checkpoint. The message's timestamp will be used to compute the timeout
int64 timeout = 4; // Timeout for rule execution. Uses the real time to limit the execution of the rule
bool store_result = 13; // Store the result of the rule for later request by the client
reserved 5; // ReportId reportId = 5; reserved now
EventID parent_event_id = 6;
string description = 7;
Direction direction = 8;
ChainID chain_id = 9; // The chain id to continue checking.
// If it's not set the check will be started from the specified checkpoint otherwise checkpoint will be ignored
string book_name = 12;
}
message CheckRuleResponse {
RequestStatus status = 1;
ChainID chain_id = 2; // You can use it to unite the next rule to the chain with currently submitted one
int64 rule_id = 3; // Can be used for requesting response via 'waitForResult' method
}
message CheckSequenceRuleRequest {
PreFilter pre_filter = 1;
reserved 2;
/*
* Either this field or message_filters must be set. If both are set the error response will be received from check1
*/
repeated RootMessageFilter root_message_filters = 12;
Checkpoint checkpoint = 3; // Registered Checkpoint. If the chain_id is also set in the request the checkpoint will be ignored
int64 message_timeout = 13; // Timeout to wait for messages after checkpoint. The message's timestamp will be used to compute the timeout
int64 timeout = 4; // Timeout for rule execution. Uses the real time to limit the execution of the rule
bool store_result = 16; // Store the result of the rule for later request by the client
ConnectionID connectivity_id = 5;
reserved 6; // ReportId reportId = 5; reserved now
EventID parent_event_id = 7;
bool check_order = 8;
string description = 9;
Direction direction = 10;
ChainID chain_id = 11; // The chain id to continue checking.
// If it's not set the check will be started from the specified checkpoint otherwise checkpoint will be ignored
google.protobuf.BoolValue silence_check = 14;
string book_name = 15;
}
message CheckSequenceRuleResponse {
RequestStatus status = 1;
ChainID chain_id = 2; // You can use it to unite the next rule to the chain with currently submitted one
int64 rule_id = 3; // Can be used for requesting response via 'waitForResult' method
}
message PreFilter {
reserved 1; // don't know why we skipped it but just in case we should reserve this index
map<string, ValueFilter> fields = 2;
MetadataFilter metadata_filter = 3;
}
message NoMessageCheckRequest {
PreFilter pre_filter = 1;
int64 message_timeout = 2; // Timeout to wait for messages after checkpoint. The message's timestamp will be used to compute the timeout
int64 timeout = 3; // Timeout for rule execution. Uses the real time to limit the execution of the rule
bool store_result = 11; // Store the result of the rule for later request by the client
Checkpoint checkpoint = 4; // Registered Checkpoint. If the chain_id is also set in the request the checkpoint will be ignored
ChainID chain_id = 5; // You can use it to unite the next rule to the chain with currently submitted one
ConnectionID connectivity_id = 6;
EventID parent_event_id = 7;
string description = 8;
Direction direction = 9;
string book_name = 10;
}
message NoMessageCheckResponse {
RequestStatus status = 1;
ChainID chain_id = 2; // You can use it to unite the next rule to the chain with currently submitted one
int64 rule_id = 3; // Can be used for requesting response via 'waitForResult' method
}
message WaitForResultRequest {
int64 rule_id = 1;
google.protobuf.Duration timeout = 2; // Timeout for waiting for result
}
message WaitForResultResponse {
RequestStatus status = 1;
EventStatus rule_result = 2;
}
message MultiRulesRequest {
EventID default_parent_event_id = 1;
ChainID default_chain = 2;
repeated Rule rules = 3;
}
message MultiRulesResponse {
repeated RuleResponse responses = 1;
}
message Rule {
oneof one_rule {
CheckRuleRequest checkRuleRequest = 1;
CheckSequenceRuleRequest sequenceRule = 2;
NoMessageCheckRequest noMessageRule = 3;
}
}
message RuleResponse {
RequestStatus status = 1;
ChainID chain_id = 2; // You can use it to unite the next rule to the chain with currently submitted one
int64 rule_id = 3; // Can be used for requesting response via 'waitForResult' method
}