[#34] Client: Add rules deserialization
Signed-off-by: Pavel Gross <p.gross@yadro.com>
This commit is contained in:
parent
bd8eb7cc60
commit
8835b23ed3
18 changed files with 426 additions and 52 deletions
|
@ -1,7 +1,6 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Frostfs.V2.Ape;
|
||||
using Frostfs.V2.Apemanager;
|
||||
using Google.Protobuf;
|
||||
|
||||
|
@ -61,7 +60,7 @@ internal sealed class ApeManagerServiceProvider : ContextAccessor
|
|||
Verifier.CheckResponse(response);
|
||||
}
|
||||
|
||||
internal async Task<Chain[]> ListChainAsync(PrmApeChainList args, CallContext ctx)
|
||||
internal async Task<FrostFsChain[]> ListChainAsync(PrmApeChainList args, CallContext ctx)
|
||||
{
|
||||
ListChainsRequest request = new()
|
||||
{
|
||||
|
@ -78,6 +77,6 @@ internal sealed class ApeManagerServiceProvider : ContextAccessor
|
|||
|
||||
Verifier.CheckResponse(response);
|
||||
|
||||
return [.. response.Body.Chains];
|
||||
return [.. response.Body.Chains.Select(c => RuleSerializer.Deserialize([.. c.Raw]))];
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue