Merge cmd/donut into minio cmd, deprecate controller RPC request

This commit is contained in:
Harshavardhana
2015-07-31 12:57:06 -07:00
parent 6be5a2fb7e
commit aabfd541e1
9 changed files with 75 additions and 541 deletions

View File

@@ -109,31 +109,4 @@ func GetAuthKeys(url string) ([]byte, error) {
return json.MarshalIndent(reply, "", "\t")
}
// SetDonut - set donut config
func SetDonut(url, hostname string, disks []string) error {
op := RPCOps{
Method: "Donut.Set",
Request: rpc.DonutArgs{
Hostname: hostname,
Disks: disks,
Name: "default",
MaxSize: 512000000,
},
}
req, err := NewRequest(url, op, http.DefaultTransport)
if err != nil {
return iodine.New(err, nil)
}
resp, err := req.Do()
defer closeResp(resp)
if err != nil {
return iodine.New(err, nil)
}
var reply rpc.Reply
if err := jsonrpc.DecodeClientResponse(resp.Body, &reply); err != nil {
return iodine.New(err, nil)
}
return reply.Error
}
// Add more functions here for other RPC messages