We need to be able to do this from Haskell, as this task has to be taken over by luxid.
Signed-off-by: Klaus Aehlig <[email protected]> --- src/Ganeti/Rpc.hs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/Ganeti/Rpc.hs b/src/Ganeti/Rpc.hs index 5043b8a..4142847 100644 --- a/src/Ganeti/Rpc.hs +++ b/src/Ganeti/Rpc.hs @@ -49,6 +49,9 @@ module Ganeti.Rpc , toCompressed , getCompressed + , RpcCallNodeActivateMasterIp(..) + , RpcResultNodeActivateMasterIp(..) + , RpcCallInstanceInfo(..) , InstanceState(..) , InstanceInfo(..) @@ -790,3 +793,25 @@ instance Rpc RpcCallWriteSsconfFiles RpcResultWriteSsconfFiles where J.JSNull -> Right RpcResultWriteSsconfFiles _ -> Left $ JsonDecodeError ("Expected JSNull, got " ++ show (pp_value res)) + +-- | Activate the master IP address + +$(buildObject "RpcCallNodeActivateMasterIp" "rpcCallNodeActivateMasterIp" + [ simpleField "params" [t| MasterNetworkParameters |] + , simpleField "ems" [t| Bool |] + ]) + +instance RpcCall RpcCallNodeActivateMasterIp where + rpcCallName _ = "node_activate_master_ip" + rpcCallTimeout _ = rpcTimeoutToRaw Fast + rpcCallAcceptOffline _ = False + +$(buildObject "RpcResultNodeActivateMasterIp" "rpcResultNodeActivateMasterIp" + []) + +instance Rpc RpcCallNodeActivateMasterIp RpcResultNodeActivateMasterIp where + rpcResultFill _ res = + case res of + J.JSNull -> Right RpcResultNodeActivateMasterIp + _ -> Left $ JsonDecodeError + ("Expected JSNull, got " ++ show (pp_value res)) -- 1.9.1.423.g4596e3a
