forked from TrueCloudLab/frostfs-node
[#787] cli: Add vub
for control ir
commands
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
bdfa523487
commit
5466e88444
5 changed files with 38 additions and 5 deletions
|
@ -17,7 +17,7 @@ var tickEpochCmd = &cobra.Command{
|
|||
}
|
||||
|
||||
func initControlIRTickEpochCmd() {
|
||||
initControlFlags(tickEpochCmd)
|
||||
initControlIRFlags(tickEpochCmd)
|
||||
}
|
||||
|
||||
func tickEpoch(cmd *cobra.Command, _ []string) {
|
||||
|
@ -25,7 +25,9 @@ func tickEpoch(cmd *cobra.Command, _ []string) {
|
|||
c := getClient(cmd, pk)
|
||||
|
||||
req := new(ircontrol.TickEpochRequest)
|
||||
req.SetBody(new(ircontrol.TickEpochRequest_Body))
|
||||
req.SetBody(&ircontrol.TickEpochRequest_Body{
|
||||
Vub: parseVUB(cmd),
|
||||
})
|
||||
|
||||
err := ircontrolsrv.SignMessage(pk, req)
|
||||
commonCmd.ExitOnErr(cmd, "could not sign request: %w", err)
|
||||
|
@ -40,4 +42,5 @@ func tickEpoch(cmd *cobra.Command, _ []string) {
|
|||
verifyResponse(cmd, resp.GetSignature(), resp.GetBody())
|
||||
|
||||
cmd.Println("Epoch tick requested")
|
||||
printVUB(cmd, resp.GetBody().GetVub())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue