[#1382] node: Replace deprecated methods

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2024-09-18 12:27:10 +03:00
parent a603d14d08
commit ac1eee091d
3 changed files with 25 additions and 17 deletions

View file

@ -14,14 +14,14 @@ func PrettyPrintNodeInfo(cmd *cobra.Command, node netmap.NodeInfo,
) {
var strState string
switch {
switch node.Status() {
default:
strState = "STATE_UNSUPPORTED"
case node.IsOnline():
case netmap.Online:
strState = "ONLINE"
case node.IsOffline():
case netmap.Offline:
strState = "OFFLINE"
case node.IsMaintenance():
case netmap.Maintenance:
strState = "MAINTENANCE"
}