[#885] control: Make chain id bytes in grpc

Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
This commit is contained in:
Denis Kirillov 2023-12-21 15:05:45 +03:00 committed by Evgenii Stratonikov
parent 5c0a736a25
commit c19396d203
8 changed files with 7 additions and 7 deletions

View file

@ -38,7 +38,7 @@ func getRule(cmd *cobra.Command, _ []string) {
Name: cidStr, Name: cidStr,
Type: control.ChainTarget_CONTAINER, Type: control.ChainTarget_CONTAINER,
}, },
ChainId: chainID, ChainId: []byte(chainID),
}, },
} }

View file

@ -41,7 +41,7 @@ func removeRule(cmd *cobra.Command, _ []string) {
Name: cidStr, Name: cidStr,
Type: control.ChainTarget_CONTAINER, Type: control.ChainTarget_CONTAINER,
}, },
ChainId: chainID, ChainId: []byte(chainID),
}, },
} }

Binary file not shown.

View file

@ -7,7 +7,7 @@ import (
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/control" "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/control"
apechain "git.frostfs.info/TrueCloudLab/policy-engine/pkg/chain" apechain "git.frostfs.info/TrueCloudLab/policy-engine/pkg/chain"
engine "git.frostfs.info/TrueCloudLab/policy-engine/pkg/engine" "git.frostfs.info/TrueCloudLab/policy-engine/pkg/engine"
"google.golang.org/grpc/codes" "google.golang.org/grpc/codes"
"google.golang.org/grpc/status" "google.golang.org/grpc/status"
) )
@ -51,7 +51,7 @@ func (s *Server) AddChainLocalOverride(_ context.Context, req *control.AddChainL
resp := &control.AddChainLocalOverrideResponse{ resp := &control.AddChainLocalOverrideResponse{
Body: &control.AddChainLocalOverrideResponse_Body{ Body: &control.AddChainLocalOverrideResponse_Body{
ChainId: string(chain.ID), ChainId: []byte(chain.ID),
}, },
} }
err = SignMessage(s.key, resp) err = SignMessage(s.key, resp)

Binary file not shown.

View file

@ -446,7 +446,7 @@ message AddChainLocalOverrideResponse {
// Chain ID assigned for the added rule chain. // Chain ID assigned for the added rule chain.
// If chain ID is left empty in the request, then // If chain ID is left empty in the request, then
// it will be generated. // it will be generated.
string chain_id = 1; bytes chain_id = 1;
} }
Body body = 1; Body body = 1;
@ -461,7 +461,7 @@ message GetChainLocalOverrideRequest {
ChainTarget target = 1; ChainTarget target = 1;
// Chain ID assigned for the added rule chain. // Chain ID assigned for the added rule chain.
string chain_id = 2; bytes chain_id = 2;
} }
Body body = 1; Body body = 1;
@ -511,7 +511,7 @@ message RemoveChainLocalOverrideRequest {
ChainTarget target = 1; ChainTarget target = 1;
// Chain ID assigned for the added rule chain. // Chain ID assigned for the added rule chain.
string chain_id = 2; bytes chain_id = 2;
} }
Body body = 1; Body body = 1;

Binary file not shown.

Binary file not shown.