diff --git a/cmd/frostfs-cli/modules/control/set_netmap_status.go b/cmd/frostfs-cli/modules/control/set_netmap_status.go index 87c4f3b3d..8cd763bf3 100644 --- a/cmd/frostfs-cli/modules/control/set_netmap_status.go +++ b/cmd/frostfs-cli/modules/control/set_netmap_status.go @@ -68,18 +68,20 @@ func setNetmapStatus(cmd *cobra.Command, _ []string) { } await, _ := cmd.Flags().GetBool(commonflags.AwaitFlag) - var targetStatus control.NetmapStatus + body.SetAwait(await) + + // /var targetStatus control.NetmapStatus switch st, _ := cmd.Flags().GetString(netmapStatusFlag); st { default: commonCmd.ExitOnErr(cmd, "", fmt.Errorf("unsupported status %s", st)) case netmapStatusOnline: body.SetStatus(control.NetmapStatus_ONLINE) printIgnoreForce(control.NetmapStatus_ONLINE) - targetStatus = control.NetmapStatus_ONLINE + // targetStatus = control.NetmapStatus_ONLINE case netmapStatusOffline: body.SetStatus(control.NetmapStatus_OFFLINE) printIgnoreForce(control.NetmapStatus_OFFLINE) - targetStatus = control.NetmapStatus_OFFLINE + // targetStatus = control.NetmapStatus_OFFLINE case netmapStatusMaintenance: body.SetStatus(control.NetmapStatus_MAINTENANCE) @@ -87,7 +89,7 @@ func setNetmapStatus(cmd *cobra.Command, _ []string) { body.SetForceMaintenance(true) common.PrintVerbose(cmd, "Local maintenance will be forced.") } - targetStatus = control.NetmapStatus_MAINTENANCE + // targetStatus = control.NetmapStatus_MAINTENANCE } req := new(control.SetNetmapStatusRequest) @@ -109,9 +111,9 @@ func setNetmapStatus(cmd *cobra.Command, _ []string) { cmd.Println("Network status update request successfully sent.") - if await { - awaitSetNetmapStatus(cmd, pk, cli, targetStatus) - } + // if await { + // awaitSetNetmapStatus(cmd, pk, cli, targetStatus) + // } } func awaitSetNetmapStatus(cmd *cobra.Command, pk *ecdsa.PrivateKey, cli *client.Client, targetStatus control.NetmapStatus) {