Revision 842515dd
b/src/Ganeti/Rpc.hs | ||
---|---|---|
66 | 66 |
, RpcCallTestDelay(..) |
67 | 67 |
, RpcResultTestDelay(..) |
68 | 68 |
|
69 |
, RpcCallExportList(..) |
|
70 |
, RpcResultExportList(..) |
|
71 |
|
|
69 | 72 |
, rpcTimeoutFromRaw -- FIXME: Not used anywhere |
70 | 73 |
) where |
71 | 74 |
|
... | ... | |
440 | 443 |
|
441 | 444 |
-- ** TestDelay |
442 | 445 |
|
443 |
|
|
444 | 446 |
-- | Call definition for test delay. |
445 | 447 |
$(buildObject "RpcCallTestDelay" "rpcCallTestDelay" |
446 | 448 |
[ simpleField "duration" [t| Double |] |
... | ... | |
464 | 466 |
|
465 | 467 |
instance Rpc RpcCallTestDelay RpcResultTestDelay where |
466 | 468 |
rpcResultFill _ res = fromJSValueToRes res id |
469 |
|
|
470 |
-- ** ExportList |
|
471 |
|
|
472 |
-- | Call definition for export list. |
|
473 |
|
|
474 |
$(buildObject "RpcCallExportList" "rpcCallExportList" []) |
|
475 |
|
|
476 |
-- | Result definition for export list. |
|
477 |
$(buildObject "RpcResultExportList" "rpcResExportList" |
|
478 |
[ simpleField "exports" [t| [String] |] |
|
479 |
]) |
|
480 |
|
|
481 |
instance RpcCall RpcCallExportList where |
|
482 |
rpcCallName _ = "export_list" |
|
483 |
rpcCallTimeout _ = rpcTimeoutToRaw Fast |
|
484 |
rpcCallAcceptOffline _ = False |
|
485 |
rpcCallData _ = J.encode |
|
486 |
|
|
487 |
instance Rpc RpcCallExportList RpcResultExportList where |
|
488 |
rpcResultFill _ res = fromJSValueToRes res RpcResultExportList |
Also available in: Unified diff