Files
my-rook-config/pkg/rook/client/node.go
T
Bassam Tabbara 7da39894c0 rename castle to rook
switched to using quay.io for all containers -- we are no longer
publishing to hub.docker.com.
2016-10-27 13:42:03 +02:00

27 lines
378 B
Go

package client
import (
"encoding/json"
"github.com/rook/rook/pkg/model"
)
const (
NodeQueryName = "node"
)
func (a *RookNetworkRestClient) GetNodes() ([]model.Node, error) {
body, err := a.DoGet(NodeQueryName)
if err != nil {
return nil, err
}
var nodes []model.Node
err = json.Unmarshal(body, &nodes)
if err != nil {
return nil, err
}
return nodes, nil
}