[#1382] node: Replace deprecated methods
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
a603d14d08
commit
ac1eee091d
3 changed files with 25 additions and 17 deletions
|
@ -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"
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue