From aa4b12c04cb5b7a6f6a77c449f16fb209cba0bb4 Mon Sep 17 00:00:00 2001 From: Oleg Smelov <45400511+lumber1000@users.noreply.github.com> Date: Wed, 31 Jan 2024 10:07:31 +0100 Subject: [PATCH] Multisubmit rules (#51) multiSubmitRules method added --- README.md | 8 ++++-- build.gradle | 2 +- gradle.properties | 2 +- package_info.json | 2 +- src/main/proto/th2_grpc_check1/check1.proto | 30 +++++++++++++++++++-- 5 files changed, 37 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index c9a0a4c..a87f58c 100644 --- a/README.md +++ b/README.md @@ -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"). @@ -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 @@ -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 diff --git a/build.gradle b/build.gradle index f2b5391..dd68ee8 100644 --- a/build.gradle +++ b/build.gradle @@ -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" diff --git a/gradle.properties b/gradle.properties index fd512c9..a44cdb3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 \ No newline at end of file diff --git a/package_info.json b/package_info.json index 689fc8a..8f08c78 100644 --- a/package_info.json +++ b/package_info.json @@ -1,4 +1,4 @@ { "package_name": "th2_grpc_check1", - "package_version": "4.3.1" + "package_version": "4.4.0" } \ No newline at end of file diff --git a/src/main/proto/th2_grpc_check1/check1.proto b/src/main/proto/th2_grpc_check1/check1.proto index 27521af..c6c1cc2 100644 --- a/src/main/proto/th2_grpc_check1/check1.proto +++ b/src/main/proto/th2_grpc_check1/check1.proto @@ -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. @@ -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 { @@ -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 } \ No newline at end of file