Use bytes in control service proto definition for chainID #885

Merged
fyrchik merged 2 commits from dkirillov/frostfs-node:feature/control_api_make_chain_id_bytes into master 2024-01-11 07:24:27 +00:00
8 changed files with 7 additions and 7 deletions
Showing only changes of commit feecc862b0 - Show all commits

View file

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

View file

@ -41,7 +41,7 @@ func removeRule(cmd *cobra.Command, _ []string) {
Name: cidStr,
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"
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/status"
)
@ -51,7 +51,7 @@ func (s *Server) AddChainLocalOverride(_ context.Context, req *control.AddChainL
resp := &control.AddChainLocalOverrideResponse{
Body: &control.AddChainLocalOverrideResponse_Body{
ChainId: string(chain.ID),
ChainId: []byte(chain.ID),
},
}
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.
// If chain ID is left empty in the request, then
// it will be generated.
string chain_id = 1;
bytes chain_id = 1;
}
Body body = 1;
@ -461,7 +461,7 @@ message GetChainLocalOverrideRequest {
ChainTarget target = 1;
// Chain ID assigned for the added rule chain.
string chain_id = 2;
bytes chain_id = 2;
}
Body body = 1;
@ -511,7 +511,7 @@ message RemoveChainLocalOverrideRequest {
ChainTarget target = 1;
// Chain ID assigned for the added rule chain.
string chain_id = 2;
bytes chain_id = 2;
}
Body body = 1;

Binary file not shown.

Binary file not shown.