Commit a69ff623 authored by Iustin Pop's avatar Iustin Pop
Browse files

Misc other conversions


Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 56c094b4
......@@ -8,7 +8,7 @@ and this is more IO oriented.
{-
Copyright (C) 2009, 2010 Google Inc.
Copyright (C) 2009, 2010, 2011 Google Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -82,12 +82,13 @@ import System
import Text.Printf (printf)
import qualified Ganeti.HTools.Version as Version(version)
import qualified Ganeti.Constants as C
import Ganeti.HTools.Types
import Ganeti.HTools.Utils
-- | The default value for the luxi socket
defaultLuxiSocket :: FilePath
defaultLuxiSocket = "/var/run/ganeti/socket/ganeti-master"
defaultLuxiSocket = C.masterSocket
-- | Command line options structure.
data Options = Options
......
......@@ -47,6 +47,7 @@ import Ganeti.HTools.Types
import qualified Ganeti.HTools.Group as Group
import qualified Ganeti.HTools.Node as Node
import qualified Ganeti.HTools.Instance as Instance
import qualified Ganeti.Constants as C
-- | Read an URL via curl and return the body if successful.
getUrl :: (Monad m) => String -> IO (m String)
......@@ -76,7 +77,7 @@ getUrl url = do
formatHost :: String -> String
formatHost master =
if ':' `elem` master then master
else "https://" ++ master ++ ":5080"
else "https://" ++ master ++ ":" ++ show C.defaultRapiPort
-- | Parse a instance list in JSON format.
getInstances :: NameAssoc
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment