Consolidate controller rpc into one single service

This commit is contained in:
Harshavardhana
2015-09-20 12:27:40 -07:00
parent 29673fed76
commit d1621691b7
7 changed files with 150 additions and 182 deletions
+28 -7
View File
@@ -16,11 +16,19 @@
package main
// Network properties of a server
type Network struct {
IP string `json:"address"`
Mask string `json:"netmask"`
Ethernet string `json:"networkInterface"`
//// RPC params
// AuthArgs auth params
type AuthArgs struct {
User string `json:"user"`
}
// DonutArgs collections of disks and name to initialize donut
type DonutArgs struct {
Name string
MaxSize uint64
Hostname string
Disks []string
}
// ServerArg server metadata to identify a server
@@ -30,6 +38,8 @@ type ServerArg struct {
ID string `json:"id"`
}
//// RPC replies
// ServerRep server reply container for Server.List
type ServerRep struct {
Name string `json:"name"`
@@ -39,7 +49,7 @@ type ServerRep struct {
// DefaultRep default reply
type DefaultRep struct {
Error int64 `json:"error"`
Error error `json:"error"`
Message string `json:"message"`
}
@@ -61,7 +71,11 @@ type MemStatsRep struct {
// NetStatsRep network statistics of a server
type NetStatsRep struct {
Interfaces []Network
Interfaces []struct {
IP string `json:"address"`
Mask string `json:"netmask"`
Ethernet string `json:"networkInterface"`
}
}
// SysInfoRep system information of a server
@@ -86,3 +100,10 @@ type VersionRep struct {
Architecture string `json:"arch"`
OperatingSystem string `json:"os"`
}
// AuthRep reply with access keys and secret ids for the user
type AuthRep struct {
Name string `json:"name"`
AccessKeyID string `json:"accessKeyId"`
SecretAccessKey string `json:"secretAccessKey"`
}