forked from TrueCloudLab/frostfs-node
[#1680] cli/netmap: Support MAINTENANCE mode
Make `netmap snapshot` command to print `MAINTENANCE` state of the nodes with `IsMaintenance()` flag set. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
eb1fba5182
commit
a7668618c9
1 changed files with 4 additions and 0 deletions
|
@ -42,10 +42,14 @@ func prettyPrintNetMap(cmd *cobra.Command, nm netmap.NetMap) {
|
|||
var strState string
|
||||
|
||||
switch {
|
||||
default:
|
||||
strState = "STATE_UNSUPPORTED"
|
||||
case nodes[i].IsOnline():
|
||||
strState = "ONLINE"
|
||||
case nodes[i].IsOffline():
|
||||
strState = "OFFLINE"
|
||||
case nodes[i].IsMaintenance():
|
||||
strState = "MAINTENANCE"
|
||||
}
|
||||
|
||||
cmd.Printf("Node %d: %s %s ", i+1, hex.EncodeToString(nodes[i].PublicKey()), strState)
|
||||
|
|
Loading…
Reference in a new issue