Skip to content

Commit

Permalink
Multisubmit rules (#51)
Browse files Browse the repository at this point in the history
multiSubmitRules method added
  • Loading branch information
lumber1000 authored Jan 31, 2024
1 parent 565056c commit aa4b12c
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 7 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# th2 gRPC check1 library (4.3.0)
# th2 gRPC check1 library (4.4.0)

This library contains proto messages and `Check1` service with RPC methods that are used
in [th2 check1](https://github.com/th2-net/th2-check1 "th2-check1").
Expand Down Expand Up @@ -47,6 +47,10 @@ If you wish to manually create and publish a package for Python:
## Release notes
### 4.4.0
+ `multiSubmitRules` method added
### 4.3.1
+ Correct dependencies: replace snapshots with release versions
Expand All @@ -55,7 +59,7 @@ If you wish to manually create and publish a package for Python:
+ Update to `th2-grpc-common` version `3.12.0` (added `check_simple_collections_order` parameter to `RootComparisonSettings`).
+ gRPC method `WaitForResult` added
+ `WaitForResult` method added
+ `waitForResult` method added
+ `store_result` parameter added to rule creation requests, `rule_id` added to responses
### 4.2.0
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ repositories {
}

dependencies {
api platform('com.exactpro.th2:bom:4.4.0')
api platform('com.exactpro.th2:bom:4.5.0')
api 'com.exactpro.th2:grpc-common:4.4.0-dev'

api "com.google.protobuf:protobuf-java-util"
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
release_version=4.3.1
release_version=4.4.0
description='th2 gRPC check1 library'

vcs_url=https://github.com/th2-net/th2-grpc-check1
2 changes: 1 addition & 1 deletion package_info.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"package_name": "th2_grpc_check1",
"package_version": "4.3.1"
"package_version": "4.4.0"
}
30 changes: 28 additions & 2 deletions src/main/proto/th2_grpc_check1/check1.proto
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020-2023 Exactpro (Exactpro Systems Limited)
* 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.
Expand All @@ -18,18 +18,20 @@ 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 {
Expand Down Expand Up @@ -132,4 +134,28 @@ message WaitForResultRequest {
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
}

0 comments on commit aa4b12c

Please sign in to comment.