Revision c1c5aab1
b/htools/Ganeti/Rpc.hs | ||
---|---|---|
44 | 44 |
, RpcCallAllInstancesInfo(..) |
45 | 45 |
, RpcResultAllInstancesInfo(..) |
46 | 46 |
|
47 |
, RpcCallInstanceList(..) |
|
48 |
, RpcResultInstanceList(..) |
|
49 |
|
|
47 | 50 |
, rpcTimeoutFromRaw -- FIXME: Not used anywhere |
48 | 51 |
) where |
49 | 52 |
|
... | ... | |
226 | 229 |
instance RpcResult RpcResultAllInstancesInfo |
227 | 230 |
|
228 | 231 |
instance Rpc RpcCallAllInstancesInfo RpcResultAllInstancesInfo |
232 |
|
|
233 |
-- | InstanceList |
|
234 |
-- Returns the list of running instances on the given nodes. |
|
235 |
$(buildObject "RpcCallInstanceList" "rpcCallInstList" $ |
|
236 |
[ simpleField "hypervisors" [t| [Hypervisor] |] ]) |
|
237 |
|
|
238 |
$(buildObject "RpcResultInstanceList" "rpcResInstList" $ |
|
239 |
[ simpleField "node" [t| Node |] |
|
240 |
, simpleField "instances" [t| [String] |] |
|
241 |
]) |
|
242 |
|
|
243 |
instance RpcCall RpcCallInstanceList where |
|
244 |
rpcCallName _ = "instance_list" |
|
245 |
rpcCallTimeout _ = rpcTimeoutToRaw Urgent |
|
246 |
rpcCallAcceptOffline _ = False |
|
247 |
|
|
248 |
instance RpcResult RpcResultInstanceList |
|
249 |
|
|
250 |
instance Rpc RpcCallInstanceList RpcResultInstanceList |
Also available in: Unified diff