ganeti

Safe HaskellSafe

Ganeti.ConstantUtils

Contents

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 Source #

PythonChar wraps a Python char

Constructors

PythonChar 

Fields

Instances
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 Source #

showValueList :: [PythonChar] -> String Source #

data PythonNone Source #

PythonNone wraps Python None

Constructors

PythonNone 
Instances
PyValue PythonNone # 
Instance details

Defined in Ganeti.ConstantUtils

Methods

showValue :: PythonNone -> String Source #

showValueList :: [PythonNone] -> String Source #

newtype FrozenSet a Source #

FrozenSet wraps a Haskell Set

See PyValue instance for FrozenSet.

Constructors

FrozenSet 

Fields

Instances
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

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

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

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

Defined in Ganeti.ConstantUtils

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 Source #

showValueList :: [FrozenSet a] -> String Source #

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

toList :: FrozenSet a -> [a] Source #

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

data Protocol Source #

Protocol represents the protocols used by the daemons

Constructors

Tcp 
Udp 
Instances
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 Source #

showValueList :: [Protocol] -> String Source #

exitFailure :: Int Source #

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 Source #

Console device

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

randomUuidFile :: String Source #

Random uuid generator

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

Priority levels

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

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

confdProtocolVersion :: Int Source #

Confd protocol version

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

Confd request query fields

confdReqqIp :: String Source #

ISpec

ispecsStd :: String Source #

ipolicyDts :: String Source #