ganeti-3.1: Cluster-based virtualization management software
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ganeti.ConstantUtils

Description

ConstantUtils contains the helper functions for constants

This module cannot be merged with Utils because it would create a circular dependency if imported, for example, from Constants.

Synopsis

Documentation

newtype PythonChar #

PythonChar wraps a Python char

Constructors

PythonChar 

Fields

Instances

Instances details
Show PythonChar # 
Instance details

Defined in Ganeti.ConstantUtils

Methods

showsPrec :: Int -> PythonChar -> ShowS

show :: PythonChar -> String

showList :: [PythonChar] -> ShowS

PyValue PythonChar # 
Instance details

Defined in Ganeti.ConstantUtils

Methods

showValue :: PythonChar -> String #

showValueList :: [PythonChar] -> String #

data PythonNone #

PythonNone wraps Python None

Constructors

PythonNone 

Instances

Instances details
PyValue PythonNone # 
Instance details

Defined in Ganeti.ConstantUtils

Methods

showValue :: PythonNone -> String #

showValueList :: [PythonNone] -> String #

newtype FrozenSet a #

FrozenSet wraps a Haskell Set

See PyValue instance for FrozenSet.

Constructors

FrozenSet 

Fields

Instances

Instances details
Ord a => Monoid (FrozenSet a) # 
Instance details

Defined in Ganeti.ConstantUtils

Ord a => Semigroup (FrozenSet a) # 
Instance details

Defined in Ganeti.ConstantUtils

Methods

(<>) :: FrozenSet a -> FrozenSet a -> FrozenSet a

sconcat :: NonEmpty (FrozenSet a) -> FrozenSet a

stimes :: Integral b => b -> FrozenSet a -> FrozenSet a

Show a => Show (FrozenSet a) # 
Instance details

Defined in Ganeti.ConstantUtils

Methods

showsPrec :: Int -> FrozenSet a -> ShowS

show :: FrozenSet a -> String

showList :: [FrozenSet a] -> ShowS

PyValue a => PyValue (FrozenSet a) #

Converts a Haskell Set into a Python frozenset

This instance was supposed to be for Set instead of FrozenSet. However, 'ghc-6.12.1' seems to be crashing with 'segmentation fault' due to the presence of more than one instance of Set, namely, this one and the one in OpCodes. For this reason, we wrap Set into FrozenSet.

Instance details

Defined in Ganeti.ConstantUtils

Methods

showValue :: FrozenSet a -> String #

showValueList :: [FrozenSet a] -> String #

Eq a => Eq (FrozenSet a) # 
Instance details

Defined in Ganeti.ConstantUtils

Methods

(==) :: FrozenSet a -> FrozenSet a -> Bool

(/=) :: FrozenSet a -> FrozenSet a -> Bool

Ord a => Ord (FrozenSet a) # 
Instance details

Defined in Ganeti.ConstantUtils

Methods

compare :: FrozenSet a -> FrozenSet a -> Ordering

(<) :: FrozenSet a -> FrozenSet a -> Bool

(<=) :: FrozenSet a -> FrozenSet a -> Bool

(>) :: FrozenSet a -> FrozenSet a -> Bool

(>=) :: FrozenSet a -> FrozenSet a -> Bool

max :: FrozenSet a -> FrozenSet a -> FrozenSet a

min :: FrozenSet a -> FrozenSet a -> FrozenSet a

mkSet :: Ord a => [a] -> FrozenSet a #

toList :: FrozenSet a -> [a] #

union :: Ord a => FrozenSet a -> FrozenSet a -> FrozenSet a #

difference :: Ord a => FrozenSet a -> FrozenSet a -> FrozenSet a #

data Protocol #

Protocol represents the protocols used by the daemons

Constructors

Tcp 
Udp 

Instances

Instances details
Show Protocol # 
Instance details

Defined in Ganeti.ConstantUtils

Methods

showsPrec :: Int -> Protocol -> ShowS

show :: Protocol -> String

showList :: [Protocol] -> ShowS

PyValue Protocol #

PyValue instance of Protocol

This instance is used by the Haskell to Python constants

Instance details

Defined in Ganeti.ConstantUtils

Methods

showValue :: Protocol -> String #

showValueList :: [Protocol] -> String #

exitFailure :: Int #

Failure exit code

These are defined here and not in Constants together with the other exit codes in order to avoid a circular dependency between Constants and Runtime

devConsole :: String #

Console device

This is defined here and not in Constants order to avoid a circular dependency between Constants and Logging

randomUuidFile :: String #

Random uuid generator

This is defined here and not in Constants order to avoid a circular dependendy between Constants and Types

Priority levels

priorityLow :: Int #

buildVersion :: Int -> Int -> Int -> Int #

Calculates int version number from major, minor and revision numbers.

confdProtocolVersion :: Int #

Confd protocol version

This is defined here in order to avoid a circular dependency between Types and Constants.

Confd request query fields

confdReqqLink :: String #

confdReqqIp :: String #

confdReqqIplist :: String #

confdReqqFields :: String #

ISpec

ispecMemSize :: String #

ispecCpuCount :: String #

ispecDiskCount :: String #

ispecDiskSize :: String #

ispecNicCount :: String #

ispecSpindleUse :: String #

ispecsMinmax :: String #

ispecsStd :: String #

ipolicyDts :: String #