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

Ganeti.PyValue

Description

PyValue contains instances for the PyValue typeclass.

The typeclass PyValue converts Haskell values to Python values. This module contains instances of this typeclass for several generic types. These instances are used in the Haskell to Python generation of opcodes and constants, for example.

Synopsis

Documentation

class PyValue a where #

Converts Haskell values into Python values

This is necessary for the default values of opcode parameters and return values. For example, if a default value or return type is a Data.Map, then it must be shown as a Python dictioanry.

Minimal complete definition

showValue

Methods

showValue :: a -> String #

showValueList :: [a] -> String #

Instances

Instances details
PyValue ByteString # 
Instance details

Defined in Ganeti.PyValue

Methods

showValue :: ByteString -> String #

showValueList :: [ByteString] -> String #

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 #

PyValue PythonChar # 
Instance details

Defined in Ganeti.ConstantUtils

Methods

showValue :: PythonChar -> String #

showValueList :: [PythonChar] -> String #

PyValue PythonNone # 
Instance details

Defined in Ganeti.ConstantUtils

Methods

showValue :: PythonNone -> String #

showValueList :: [PythonNone] -> String #

PyValue DiskIndex # 
Instance details

Defined in Ganeti.OpCodes

Methods

showValue :: DiskIndex -> String #

showValueList :: [DiskIndex] -> String #

PyValue IDiskParams # 
Instance details

Defined in Ganeti.OpCodes

Methods

showValue :: IDiskParams -> String #

showValueList :: [IDiskParams] -> String #

PyValue INicParams # 
Instance details

Defined in Ganeti.OpCodes

Methods

showValue :: INicParams -> String #

showValueList :: [INicParams] -> String #

PyValue RecreateDisksInfo # 
Instance details

Defined in Ganeti.OpCodes

Methods

showValue :: RecreateDisksInfo -> String #

showValueList :: [RecreateDisksInfo] -> String #

PyValue PyValueEx # 
Instance details

Defined in Ganeti.PyValue

Methods

showValue :: PyValueEx -> String #

showValueList :: [PyValueEx] -> String #

PyValue InstanceState # 
Instance details

Defined in Ganeti.Rpc

Methods

showValue :: InstanceState -> String #

showValueList :: [InstanceState] -> String #

PyValue PyType # 
Instance details

Defined in Ganeti.THH.PyType

Methods

showValue :: PyType -> String #

showValueList :: [PyType] -> String #

PyValue AdminStateSource # 
Instance details

Defined in Ganeti.Types

Methods

showValue :: AdminStateSource -> String #

showValueList :: [AdminStateSource] -> String #

PyValue CVErrorCode # 
Instance details

Defined in Ganeti.OpCodes

Methods

showValue :: CVErrorCode -> String #

showValueList :: [CVErrorCode] -> String #

PyValue DiskTemplate # 
Instance details

Defined in Ganeti.Types

Methods

showValue :: DiskTemplate -> String #

showValueList :: [DiskTemplate] -> String #

PyValue ExportMode # 
Instance details

Defined in Ganeti.OpCodes

Methods

showValue :: ExportMode -> String #

showValueList :: [ExportMode] -> String #

PyValue Hypervisor # 
Instance details

Defined in Ganeti.Types

Methods

showValue :: Hypervisor -> String #

showValueList :: [Hypervisor] -> String #

PyValue VType # 
Instance details

Defined in Ganeti.Types

Methods

showValue :: VType -> String #

showValueList :: [VType] -> String #

PyValue VerifyOptionalChecks # 
Instance details

Defined in Ganeti.OpCodes

PyValue JSValue # 
Instance details

Defined in Ganeti.OpCodes

Methods

showValue :: JSValue -> String #

showValueList :: [JSValue] -> String #

PyValue Integer # 
Instance details

Defined in Ganeti.PyValue

Methods

showValue :: Integer -> String #

showValueList :: [Integer] -> String #

PyValue Bool # 
Instance details

Defined in Ganeti.PyValue

Methods

showValue :: Bool -> String #

showValueList :: [Bool] -> String #

PyValue Char # 
Instance details

Defined in Ganeti.PyValue

Methods

showValue :: Char -> String #

showValueList :: [Char] -> String #

PyValue Double # 
Instance details

Defined in Ganeti.PyValue

Methods

showValue :: Double -> String #

showValueList :: [Double] -> String #

PyValue Int # 
Instance details

Defined in Ganeti.PyValue

Methods

showValue :: Int -> String #

showValueList :: [Int] -> String #

PyValue a => PyValue (ListSet a) # 
Instance details

Defined in Ganeti.PyValue

Methods

showValue :: ListSet a -> String #

showValueList :: [ListSet a] -> String #

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 #

PyValue a => PyValue (SetParamsMods a) # 
Instance details

Defined in Ganeti.OpCodes

Methods

showValue :: SetParamsMods a -> String #

showValueList :: [SetParamsMods a] -> String #

PyValue a => PyValue (NonEmpty a) # 
Instance details

Defined in Ganeti.OpCodes

Methods

showValue :: NonEmpty a -> String #

showValueList :: [NonEmpty a] -> String #

PyValue a => PyValue (NonNegative a) # 
Instance details

Defined in Ganeti.OpCodes

Methods

showValue :: NonNegative a -> String #

showValueList :: [NonNegative a] -> String #

PyValue a => PyValue (Private a) # 
Instance details

Defined in Ganeti.Types

Methods

showValue :: Private a -> String #

showValueList :: [Private a] -> String #

PyValue a => PyValue (Secret a) # 
Instance details

Defined in Ganeti.Types

Methods

showValue :: Secret a -> String #

showValueList :: [Secret a] -> String #

PyValue a => PyValue (JSObject a) # 
Instance details

Defined in Ganeti.OpCodes

Methods

showValue :: JSObject a -> String #

showValueList :: [JSObject a] -> String #

PyValue a => PyValue [a] # 
Instance details

Defined in Ganeti.PyValue

Methods

showValue :: [a] -> String #

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

(PyValue k, PyValue a) => PyValue (Map k a) # 
Instance details

Defined in Ganeti.PyValue

Methods

showValue :: Map k a -> String #

showValueList :: [Map k a] -> String #

(PyValue a, PyValue b) => PyValue (a, b) # 
Instance details

Defined in Ganeti.PyValue

Methods

showValue :: (a, b) -> String #

showValueList :: [(a, b)] -> String #

(PyValue a, PyValue b, PyValue c) => PyValue (a, b, c) # 
Instance details

Defined in Ganeti.PyValue

Methods

showValue :: (a, b, c) -> String #

showValueList :: [(a, b, c)] -> String #

data PyValueEx #

Encapsulates Python default values

Constructors

forall a.PyValue a => PyValueEx a 

Instances

Instances details
PyValue PyValueEx # 
Instance details

Defined in Ganeti.PyValue

Methods

showValue :: PyValueEx -> String #

showValueList :: [PyValueEx] -> String #