forked from TrueCloudLab/frostfs-node
[#397] cli: Fix evacuation method names
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
2613351008
commit
9119199f6e
2 changed files with 25 additions and 25 deletions
|
@ -67,7 +67,7 @@ func startEvacuateShard(cmd *cobra.Command, _ []string) {
|
||||||
var resp *control.StartShardEvacuationResponse
|
var resp *control.StartShardEvacuationResponse
|
||||||
var err error
|
var err error
|
||||||
err = cli.ExecRaw(func(client *client.Client) error {
|
err = cli.ExecRaw(func(client *client.Client) error {
|
||||||
resp, err = control.StartEvacuateShard(client, req)
|
resp, err = control.StartShardEvacuation(client, req)
|
||||||
return err
|
return err
|
||||||
})
|
})
|
||||||
commonCmd.ExitOnErr(cmd, "Start evacuate shards failed, rpc error: %w", err)
|
commonCmd.ExitOnErr(cmd, "Start evacuate shards failed, rpc error: %w", err)
|
||||||
|
@ -95,7 +95,7 @@ func getEvacuateShardStatus(cmd *cobra.Command, _ []string) {
|
||||||
var resp *control.GetShardEvacuationStatusResponse
|
var resp *control.GetShardEvacuationStatusResponse
|
||||||
var err error
|
var err error
|
||||||
err = cli.ExecRaw(func(client *client.Client) error {
|
err = cli.ExecRaw(func(client *client.Client) error {
|
||||||
resp, err = control.GetEvacuateShardStatus(client, req)
|
resp, err = control.GetShardEvacuationStatus(client, req)
|
||||||
return err
|
return err
|
||||||
})
|
})
|
||||||
commonCmd.ExitOnErr(cmd, "Get evacuate shards status failed, rpc error: %w", err)
|
commonCmd.ExitOnErr(cmd, "Get evacuate shards status failed, rpc error: %w", err)
|
||||||
|
@ -118,7 +118,7 @@ func stopEvacuateShardStatus(cmd *cobra.Command, _ []string) {
|
||||||
var resp *control.StopShardEvacuationResponse
|
var resp *control.StopShardEvacuationResponse
|
||||||
var err error
|
var err error
|
||||||
err = cli.ExecRaw(func(client *client.Client) error {
|
err = cli.ExecRaw(func(client *client.Client) error {
|
||||||
resp, err = control.StopEvacuateShard(client, req)
|
resp, err = control.StopShardEvacuation(client, req)
|
||||||
return err
|
return err
|
||||||
})
|
})
|
||||||
commonCmd.ExitOnErr(cmd, "Stop evacuate shards failed, rpc error: %w", err)
|
commonCmd.ExitOnErr(cmd, "Stop evacuate shards failed, rpc error: %w", err)
|
||||||
|
@ -166,7 +166,7 @@ func waitEvacuateCompletion(cmd *cobra.Command, pk *ecdsa.PrivateKey, cli *clien
|
||||||
|
|
||||||
var err error
|
var err error
|
||||||
err = cli.ExecRaw(func(client *client.Client) error {
|
err = cli.ExecRaw(func(client *client.Client) error {
|
||||||
resp, err = control.GetEvacuateShardStatus(client, req)
|
resp, err = control.GetShardEvacuationStatus(client, req)
|
||||||
return err
|
return err
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -8,18 +8,18 @@ import (
|
||||||
const serviceName = "control.ControlService"
|
const serviceName = "control.ControlService"
|
||||||
|
|
||||||
const (
|
const (
|
||||||
rpcHealthCheck = "HealthCheck"
|
rpcHealthCheck = "HealthCheck"
|
||||||
rpcSetNetmapStatus = "SetNetmapStatus"
|
rpcSetNetmapStatus = "SetNetmapStatus"
|
||||||
rpcDropObjects = "DropObjects"
|
rpcDropObjects = "DropObjects"
|
||||||
rpcListShards = "ListShards"
|
rpcListShards = "ListShards"
|
||||||
rpcSetShardMode = "SetShardMode"
|
rpcSetShardMode = "SetShardMode"
|
||||||
rpcSynchronizeTree = "SynchronizeTree"
|
rpcSynchronizeTree = "SynchronizeTree"
|
||||||
rpcEvacuateShard = "EvacuateShard"
|
rpcEvacuateShard = "EvacuateShard"
|
||||||
rpcStartEvacuateShard = "StartEvacuateShard"
|
rpcStartShardEvacuation = "StartShardEvacuation"
|
||||||
rpcGetEvacuateShardStatus = "GetEvacuateShardStatus"
|
rpcGetShardEvacuationStatus = "GetShardEvacuationStatus"
|
||||||
rpcStopEvacuateShardStatus = "StopEvacuateShard"
|
rpcStopShardEvacuation = "StopShardEvacuation"
|
||||||
rpcFlushCache = "FlushCache"
|
rpcFlushCache = "FlushCache"
|
||||||
rpcDoctor = "Doctor"
|
rpcDoctor = "Doctor"
|
||||||
)
|
)
|
||||||
|
|
||||||
// HealthCheck executes ControlService.HealthCheck RPC.
|
// HealthCheck executes ControlService.HealthCheck RPC.
|
||||||
|
@ -144,12 +144,12 @@ func EvacuateShard(cli *client.Client, req *EvacuateShardRequest, opts ...client
|
||||||
return wResp.message, nil
|
return wResp.message, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// StartEvacuateShard executes ControlService.StartEvacuateShard RPC.
|
// StartShardEvacuation executes ControlService.StartShardEvacuation RPC.
|
||||||
func StartEvacuateShard(cli *client.Client, req *StartShardEvacuationRequest, opts ...client.CallOption) (*StartShardEvacuationResponse, error) {
|
func StartShardEvacuation(cli *client.Client, req *StartShardEvacuationRequest, opts ...client.CallOption) (*StartShardEvacuationResponse, error) {
|
||||||
wResp := newResponseWrapper[StartShardEvacuationResponse]()
|
wResp := newResponseWrapper[StartShardEvacuationResponse]()
|
||||||
wReq := &requestWrapper{m: req}
|
wReq := &requestWrapper{m: req}
|
||||||
|
|
||||||
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceName, rpcStartEvacuateShard), wReq, wResp, opts...)
|
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceName, rpcStartShardEvacuation), wReq, wResp, opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -157,12 +157,12 @@ func StartEvacuateShard(cli *client.Client, req *StartShardEvacuationRequest, op
|
||||||
return wResp.message, nil
|
return wResp.message, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetEvacuateShardStatus executes ControlService.GetEvacuateShardStatus RPC.
|
// GetShardEvacuationStatus executes ControlService.GetShardEvacuationStatus RPC.
|
||||||
func GetEvacuateShardStatus(cli *client.Client, req *GetShardEvacuationStatusRequest, opts ...client.CallOption) (*GetShardEvacuationStatusResponse, error) {
|
func GetShardEvacuationStatus(cli *client.Client, req *GetShardEvacuationStatusRequest, opts ...client.CallOption) (*GetShardEvacuationStatusResponse, error) {
|
||||||
wResp := newResponseWrapper[GetShardEvacuationStatusResponse]()
|
wResp := newResponseWrapper[GetShardEvacuationStatusResponse]()
|
||||||
wReq := &requestWrapper{m: req}
|
wReq := &requestWrapper{m: req}
|
||||||
|
|
||||||
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceName, rpcGetEvacuateShardStatus), wReq, wResp, opts...)
|
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceName, rpcGetShardEvacuationStatus), wReq, wResp, opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -170,12 +170,12 @@ func GetEvacuateShardStatus(cli *client.Client, req *GetShardEvacuationStatusReq
|
||||||
return wResp.message, nil
|
return wResp.message, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// StopEvacuateShard executes ControlService.StopEvacuateShard RPC.
|
// StopShardEvacuation executes ControlService.StopShardEvacuation RPC.
|
||||||
func StopEvacuateShard(cli *client.Client, req *StopShardEvacuationRequest, opts ...client.CallOption) (*StopShardEvacuationResponse, error) {
|
func StopShardEvacuation(cli *client.Client, req *StopShardEvacuationRequest, opts ...client.CallOption) (*StopShardEvacuationResponse, error) {
|
||||||
wResp := newResponseWrapper[StopShardEvacuationResponse]()
|
wResp := newResponseWrapper[StopShardEvacuationResponse]()
|
||||||
wReq := &requestWrapper{m: req}
|
wReq := &requestWrapper{m: req}
|
||||||
|
|
||||||
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceName, rpcStopEvacuateShardStatus), wReq, wResp, opts...)
|
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceName, rpcStopShardEvacuation), wReq, wResp, opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue