ganeti
Safe HaskellNone

Ganeti.Objects

Description

Implementation of the Ganeti config objects.

Synopsis

Generic definitions

fillDict :: Ord k => Map k v -> Map k v -> [k] -> Map k v Source #

Fills one map with keys from the other map, if not already existing. Mirrors objects.py:FillDict.

Network definitions

Ipv4 types

data Ip4Address Source #

Constructors

Ip4Address Word8 Word8 Word8 Word8 

Instances

Instances details
Eq Ip4Address # 
Instance details

Defined in Ganeti.Objects

Methods

(==) :: Ip4Address -> Ip4Address -> Bool

(/=) :: Ip4Address -> Ip4Address -> Bool

Ord Ip4Address # 
Instance details

Defined in Ganeti.Objects

Show Ip4Address # 
Instance details

Defined in Ganeti.Objects

Methods

showsPrec :: Int -> Ip4Address -> ShowS

show :: Ip4Address -> String

showList :: [Ip4Address] -> ShowS

IsString Ip4Address

IsString instance for Ip4Address, to help write the tests.

Instance details

Defined in Test.Ganeti.Objects

Methods

fromString :: String -> Ip4Address

JSON Ip4Address # 
Instance details

Defined in Ganeti.Objects

Methods

readJSON :: JSValue -> Result Ip4Address

showJSON :: Ip4Address -> JSValue

readJSONs :: JSValue -> Result [Ip4Address]

showJSONs :: [Ip4Address] -> JSValue

Arbitrary Ip4Address 
Instance details

Defined in Test.Ganeti.Objects

mkIp4Address :: (Word8, Word8, Word8, Word8) -> Ip4Address Source #

readIp4Address :: (Applicative m, MonadFail m) => String -> m Ip4Address Source #

ip4AddressToNumber :: Ip4Address -> Integer Source #

Converts an address into its ordinal number. This is needed for indexing IP adresses in reservation pools.

ip4AddressFromNumber :: Integer -> Ip4Address Source #

Converts a number into an address. This is needed for indexing IP adresses in reservation pools.

data Ip4Network Source #

Custom type for an IPv4 network.

Constructors

Ip4Network 

Fields

Instances

Instances details
Eq Ip4Network # 
Instance details

Defined in Ganeti.Objects

Methods

(==) :: Ip4Network -> Ip4Network -> Bool

(/=) :: Ip4Network -> Ip4Network -> Bool

Show Ip4Network # 
Instance details

Defined in Ganeti.Objects

Methods

showsPrec :: Int -> Ip4Network -> ShowS

show :: Ip4Network -> String

showList :: [Ip4Network] -> ShowS

JSON Ip4Network #

JSON instance for Ip4Network.

Instance details

Defined in Ganeti.Objects

Methods

readJSON :: JSValue -> Result Ip4Network

showJSON :: Ip4Network -> JSValue

readJSONs :: JSValue -> Result [Ip4Network]

showJSONs :: [Ip4Network] -> JSValue

Arbitrary Ip4Network 
Instance details

Defined in Test.Ganeti.Objects

Address pools

newtype AddressPool Source #

Currently address pools just wrap a reservation BitArray.

In future, Network might be extended to include several address pools and address pools might include their own ranges of addresses.

Constructors

AddressPool 

Instances

Instances details
Eq AddressPool # 
Instance details

Defined in Ganeti.Objects

Methods

(==) :: AddressPool -> AddressPool -> Bool

(/=) :: AddressPool -> AddressPool -> Bool

Ord AddressPool # 
Instance details

Defined in Ganeti.Objects

Show AddressPool # 
Instance details

Defined in Ganeti.Objects

Methods

showsPrec :: Int -> AddressPool -> ShowS

show :: AddressPool -> String

showList :: [AddressPool] -> ShowS

JSON AddressPool # 
Instance details

Defined in Ganeti.Objects

Methods

readJSON :: JSValue -> Result AddressPool

showJSON :: AddressPool -> JSValue

readJSONs :: JSValue -> Result [AddressPool]

showJSONs :: [AddressPool] -> JSValue

Arbitrary AddressPool 
Instance details

Defined in Test.Ganeti.Objects

Ganeti "network" config object.

data Network Source #

Constructors

Network 

Fields

Instances

Instances details
Eq Network # 
Instance details

Defined in Ganeti.Objects

Methods

(==) :: Network -> Network -> Bool

(/=) :: Network -> Network -> Bool

Show Network # 
Instance details

Defined in Ganeti.Objects

Methods

showsPrec :: Int -> Network -> ShowS

show :: Network -> String

showList :: [Network] -> ShowS

JSON Network # 
Instance details

Defined in Ganeti.Objects

Methods

readJSON :: JSValue -> Result Network

showJSON :: Network -> JSValue

readJSONs :: JSValue -> Result [Network]

showJSONs :: [Network] -> JSValue

ArrayObject Network # 
Instance details

Defined in Ganeti.Objects

Methods

toJSArray :: Network -> [JSValue] Source #

fromJSArray :: [JSValue] -> Result Network Source #

DictObject Network # 
Instance details

Defined in Ganeti.Objects

Methods

toDict :: Network -> [(String, JSValue)] Source #

fromDictWKeys :: [(String, JSValue)] -> WriterT UsedKeys Result Network Source #

fromDict :: [(String, JSValue)] -> Result Network Source #

TagsObject Network # 
Instance details

Defined in Ganeti.Objects

SerialNoObject Network # 
Instance details

Defined in Ganeti.Objects

Methods

serialOf :: Network -> Int Source #

UuidObject Network # 
Instance details

Defined in Ganeti.Objects

Methods

uuidOf :: Network -> String Source #

TimeStampObject Network # 
Instance details

Defined in Ganeti.Objects

Methods

cTimeOf :: Network -> ClockTime Source #

mTimeOf :: Network -> ClockTime Source #

TagsObjectL Network # 
Instance details

Defined in Ganeti.Objects.Lens

Methods

tagsL :: Lens' Network TagSet Source #

SerialNoObjectL Network # 
Instance details

Defined in Ganeti.Objects.Lens

Methods

serialL :: Lens' Network Int Source #

UuidObjectL Network # 
Instance details

Defined in Ganeti.Objects.Lens

Methods

uuidL :: Lens' Network String Source #

TimeStampObjectL Network # 
Instance details

Defined in Ganeti.Objects.Lens

Methods

mTimeL :: Lens' Network ClockTime Source #

Arbitrary Network 
Instance details

Defined in Test.Ganeti.Objects

Methods

arbitrary :: Gen Network

shrink :: Network -> [Network]

loadNetwork :: JSValue -> Result Network Source #

saveNetwork :: Network -> JSValue Source #

Datacollector definitions

type MicroSeconds = Integer Source #

data DataCollectorConfig Source #

The configuration regarding a single data collector.

Instances

Instances details
Eq DataCollectorConfig # 
Instance details

Defined in Ganeti.Objects

Show DataCollectorConfig # 
Instance details

Defined in Ganeti.Objects

Methods

showsPrec :: Int -> DataCollectorConfig -> ShowS

show :: DataCollectorConfig -> String

showList :: [DataCollectorConfig] -> ShowS

Semigroup DataCollectorConfig #

Central default values of the data collector config.

Instance details

Defined in Ganeti.Objects

Monoid DataCollectorConfig # 
Instance details

Defined in Ganeti.Objects

JSON DataCollectorConfig # 
Instance details

Defined in Ganeti.Objects

Methods

readJSON :: JSValue -> Result DataCollectorConfig

showJSON :: DataCollectorConfig -> JSValue

readJSONs :: JSValue -> Result [DataCollectorConfig]

showJSONs :: [DataCollectorConfig] -> JSValue

ArrayObject DataCollectorConfig # 
Instance details

Defined in Ganeti.Objects

Methods

toJSArray :: DataCollectorConfig -> [JSValue] Source #

fromJSArray :: [JSValue] -> Result DataCollectorConfig Source #

DictObject DataCollectorConfig # 
Instance details

Defined in Ganeti.Objects

Methods

toDict :: DataCollectorConfig -> [(String, JSValue)] Source #

fromDictWKeys :: [(String, JSValue)] -> WriterT UsedKeys Result DataCollectorConfig Source #

fromDict :: [(String, JSValue)] -> Result DataCollectorConfig Source #

Arbitrary (Container DataCollectorConfig) 
Instance details

Defined in Test.Ganeti.Objects

IPolicy definitions

data FilledISpecParams Source #

Constructors

FilledISpecParams 

Fields

Instances

Instances details
Eq FilledISpecParams # 
Instance details

Defined in Ganeti.Objects

Show FilledISpecParams # 
Instance details

Defined in Ganeti.Objects

Methods

showsPrec :: Int -> FilledISpecParams -> ShowS

show :: FilledISpecParams -> String

showList :: [FilledISpecParams] -> ShowS

JSON FilledISpecParams # 
Instance details

Defined in Ganeti.Objects

Methods

readJSON :: JSValue -> Result FilledISpecParams

showJSON :: FilledISpecParams -> JSValue

readJSONs :: JSValue -> Result [FilledISpecParams]

showJSONs :: [FilledISpecParams] -> JSValue

ArrayObject FilledISpecParams # 
Instance details

Defined in Ganeti.Objects

Methods

toJSArray :: FilledISpecParams -> [JSValue] Source #

fromJSArray :: [JSValue] -> Result FilledISpecParams Source #

DictObject FilledISpecParams # 
Instance details

Defined in Ganeti.Objects

Methods

toDict :: FilledISpecParams -> [(String, JSValue)] Source #

fromDictWKeys :: [(String, JSValue)] -> WriterT UsedKeys Result FilledISpecParams Source #

fromDict :: [(String, JSValue)] -> Result FilledISpecParams Source #

Arbitrary FilledISpecParams 
Instance details

Defined in Test.Ganeti.Objects

PartialParams FilledISpecParams PartialISpecParams # 
Instance details

Defined in Ganeti.Objects

data PartialISpecParams Source #

Constructors

PartialISpecParams 

Fields

Instances

Instances details
Eq PartialISpecParams # 
Instance details

Defined in Ganeti.Objects

Show PartialISpecParams # 
Instance details

Defined in Ganeti.Objects

Methods

showsPrec :: Int -> PartialISpecParams -> ShowS

show :: PartialISpecParams -> String

showList :: [PartialISpecParams] -> ShowS

Semigroup PartialISpecParams # 
Instance details

Defined in Ganeti.Objects

Monoid PartialISpecParams # 
Instance details

Defined in Ganeti.Objects

JSON PartialISpecParams # 
Instance details

Defined in Ganeti.Objects

Methods

readJSON :: JSValue -> Result PartialISpecParams

showJSON :: PartialISpecParams -> JSValue

readJSONs :: JSValue -> Result [PartialISpecParams]

showJSONs :: [PartialISpecParams] -> JSValue

ArrayObject PartialISpecParams # 
Instance details

Defined in Ganeti.Objects

Methods

toJSArray :: PartialISpecParams -> [JSValue] Source #

fromJSArray :: [JSValue] -> Result PartialISpecParams Source #

DictObject PartialISpecParams # 
Instance details

Defined in Ganeti.Objects

Methods

toDict :: PartialISpecParams -> [(String, JSValue)] Source #

fromDictWKeys :: [(String, JSValue)] -> WriterT UsedKeys Result PartialISpecParams Source #

fromDict :: [(String, JSValue)] -> Result PartialISpecParams Source #

Arbitrary PartialISpecParams

FIXME: This generates completely random data, without normal validation rules.

Instance details

Defined in Test.Ganeti.Objects

PartialParams FilledISpecParams PartialISpecParams # 
Instance details

Defined in Ganeti.Objects

data MinMaxISpecs Source #

Instances

Instances details
Eq MinMaxISpecs # 
Instance details

Defined in Ganeti.Objects

Methods

(==) :: MinMaxISpecs -> MinMaxISpecs -> Bool

(/=) :: MinMaxISpecs -> MinMaxISpecs -> Bool

Show MinMaxISpecs # 
Instance details

Defined in Ganeti.Objects

Methods

showsPrec :: Int -> MinMaxISpecs -> ShowS

show :: MinMaxISpecs -> String

showList :: [MinMaxISpecs] -> ShowS

JSON MinMaxISpecs # 
Instance details

Defined in Ganeti.Objects

Methods

readJSON :: JSValue -> Result MinMaxISpecs

showJSON :: MinMaxISpecs -> JSValue

readJSONs :: JSValue -> Result [MinMaxISpecs]

showJSONs :: [MinMaxISpecs] -> JSValue

ArrayObject MinMaxISpecs # 
Instance details

Defined in Ganeti.Objects

Methods

toJSArray :: MinMaxISpecs -> [JSValue] Source #

fromJSArray :: [JSValue] -> Result MinMaxISpecs Source #

DictObject MinMaxISpecs # 
Instance details

Defined in Ganeti.Objects

Methods

toDict :: MinMaxISpecs -> [(String, JSValue)] Source #

fromDictWKeys :: [(String, JSValue)] -> WriterT UsedKeys Result MinMaxISpecs Source #

fromDict :: [(String, JSValue)] -> Result MinMaxISpecs Source #

Arbitrary MinMaxISpecs 
Instance details

Defined in Test.Ganeti.Objects

loadMinMaxISpecs :: JSValue -> Result MinMaxISpecs Source #

data PartialIPolicy Source #

Custom partial ipolicy. This is not built via buildParam since it has a special 2-level inheritance mode.

Constructors

PartialIPolicy 

Fields

Instances

Instances details
Eq PartialIPolicy # 
Instance details

Defined in Ganeti.Objects

Show PartialIPolicy # 
Instance details

Defined in Ganeti.Objects

Methods

showsPrec :: Int -> PartialIPolicy -> ShowS

show :: PartialIPolicy -> String

showList :: [PartialIPolicy] -> ShowS

JSON PartialIPolicy # 
Instance details

Defined in Ganeti.Objects

Methods

readJSON :: JSValue -> Result PartialIPolicy

showJSON :: PartialIPolicy -> JSValue

readJSONs :: JSValue -> Result [PartialIPolicy]

showJSONs :: [PartialIPolicy] -> JSValue

ArrayObject PartialIPolicy # 
Instance details

Defined in Ganeti.Objects

Methods

toJSArray :: PartialIPolicy -> [JSValue] Source #

fromJSArray :: [JSValue] -> Result PartialIPolicy Source #

DictObject PartialIPolicy # 
Instance details

Defined in Ganeti.Objects

Methods

toDict :: PartialIPolicy -> [(String, JSValue)] Source #

fromDictWKeys :: [(String, JSValue)] -> WriterT UsedKeys Result PartialIPolicy Source #

fromDict :: [(String, JSValue)] -> Result PartialIPolicy Source #

Arbitrary PartialIPolicy

FIXME: This generates completely random data, without normal validation rules.

Instance details

Defined in Test.Ganeti.Objects

PartialParams FilledIPolicy PartialIPolicy #

Custom filler for the ipolicy types.

Instance details

Defined in Ganeti.Objects

data FilledIPolicy Source #

Custom filled ipolicy. This is not built via buildParam since it has a special 2-level inheritance mode.

Instances

Instances details
Eq FilledIPolicy # 
Instance details

Defined in Ganeti.Objects

Show FilledIPolicy # 
Instance details

Defined in Ganeti.Objects

Methods

showsPrec :: Int -> FilledIPolicy -> ShowS

show :: FilledIPolicy -> String

showList :: [FilledIPolicy] -> ShowS

JSON FilledIPolicy # 
Instance details

Defined in Ganeti.Objects

Methods

readJSON :: JSValue -> Result FilledIPolicy

showJSON :: FilledIPolicy -> JSValue

readJSONs :: JSValue -> Result [FilledIPolicy]

showJSONs :: [FilledIPolicy] -> JSValue

ArrayObject FilledIPolicy # 
Instance details

Defined in Ganeti.Objects

Methods

toJSArray :: FilledIPolicy -> [JSValue] Source #

fromJSArray :: [JSValue] -> Result FilledIPolicy Source #

DictObject FilledIPolicy # 
Instance details

Defined in Ganeti.Objects

Methods

toDict :: FilledIPolicy -> [(String, JSValue)] Source #

fromDictWKeys :: [(String, JSValue)] -> WriterT UsedKeys Result FilledIPolicy Source #

fromDict :: [(String, JSValue)] -> Result FilledIPolicy Source #

Arbitrary FilledIPolicy 
Instance details

Defined in Test.Ganeti.Objects

PartialParams FilledIPolicy PartialIPolicy #

Custom filler for the ipolicy types.

Instance details

Defined in Ganeti.Objects

Node definitions

data FilledNDParams Source #

Constructors

FilledNDParams 

Fields

Instances

Instances details
Eq FilledNDParams # 
Instance details

Defined in Ganeti.Objects

Show FilledNDParams # 
Instance details

Defined in Ganeti.Objects

Methods

showsPrec :: Int -> FilledNDParams -> ShowS

show :: FilledNDParams -> String

showList :: [FilledNDParams] -> ShowS

JSON FilledNDParams # 
Instance details

Defined in Ganeti.Objects

Methods

readJSON :: JSValue -> Result FilledNDParams

showJSON :: FilledNDParams -> JSValue

readJSONs :: JSValue -> Result [FilledNDParams]

showJSONs :: [FilledNDParams] -> JSValue

ArrayObject FilledNDParams # 
Instance details

Defined in Ganeti.Objects

Methods

toJSArray :: FilledNDParams -> [JSValue] Source #

fromJSArray :: [JSValue] -> Result FilledNDParams Source #

DictObject FilledNDParams # 
Instance details

Defined in Ganeti.Objects

Methods

toDict :: FilledNDParams -> [(String, JSValue)] Source #

fromDictWKeys :: [(String, JSValue)] -> WriterT UsedKeys Result FilledNDParams Source #

fromDict :: [(String, JSValue)] -> Result FilledNDParams Source #

Arbitrary FilledNDParams 
Instance details

Defined in Test.Ganeti.Objects

PartialParams FilledNDParams PartialNDParams # 
Instance details

Defined in Ganeti.Objects

data PartialNDParams Source #

Constructors

PartialNDParams 

Fields

Instances

Instances details
Eq PartialNDParams # 
Instance details

Defined in Ganeti.Objects

Show PartialNDParams # 
Instance details

Defined in Ganeti.Objects

Methods

showsPrec :: Int -> PartialNDParams -> ShowS

show :: PartialNDParams -> String

showList :: [PartialNDParams] -> ShowS

Semigroup PartialNDParams # 
Instance details

Defined in Ganeti.Objects

Monoid PartialNDParams # 
Instance details

Defined in Ganeti.Objects

JSON PartialNDParams # 
Instance details

Defined in Ganeti.Objects

Methods

readJSON :: JSValue -> Result PartialNDParams

showJSON :: PartialNDParams -> JSValue

readJSONs :: JSValue -> Result [PartialNDParams]

showJSONs :: [PartialNDParams] -> JSValue

ArrayObject PartialNDParams # 
Instance details

Defined in Ganeti.Objects

Methods

toJSArray :: PartialNDParams -> [JSValue] Source #

fromJSArray :: [JSValue] -> Result PartialNDParams Source #

DictObject PartialNDParams # 
Instance details

Defined in Ganeti.Objects

Methods

toDict :: PartialNDParams -> [(String, JSValue)] Source #

fromDictWKeys :: [(String, JSValue)] -> WriterT UsedKeys Result PartialNDParams Source #

fromDict :: [(String, JSValue)] -> Result PartialNDParams Source #

Arbitrary PartialNDParams 
Instance details

Defined in Test.Ganeti.Objects

PartialParams FilledNDParams PartialNDParams # 
Instance details

Defined in Ganeti.Objects

type DiskState = Container JSValue Source #

Disk state parameters.

As according to the documentation this option is unused by Ganeti, the content is just a JSValue.

type HypervisorState = Container JSValue Source #

Hypervisor state parameters.

As according to the documentation this option is unused by Ganeti, the content is just a JSValue.

data Node Source #

Constructors

Node 

Fields

Instances

Instances details
Eq Node # 
Instance details

Defined in Ganeti.Objects

Methods

(==) :: Node -> Node -> Bool

(/=) :: Node -> Node -> Bool

Show Node # 
Instance details

Defined in Ganeti.Objects

Methods

showsPrec :: Int -> Node -> ShowS

show :: Node -> String

showList :: [Node] -> ShowS

JSON Node # 
Instance details

Defined in Ganeti.Objects

Methods

readJSON :: JSValue -> Result Node

showJSON :: Node -> JSValue

readJSONs :: JSValue -> Result [Node]

showJSONs :: [Node] -> JSValue

ArrayObject Node # 
Instance details

Defined in Ganeti.Objects

Methods

toJSArray :: Node -> [JSValue] Source #

fromJSArray :: [JSValue] -> Result Node Source #

DictObject Node # 
Instance details

Defined in Ganeti.Objects

Methods

toDict :: Node -> [(String, JSValue)] Source #

fromDictWKeys :: [(String, JSValue)] -> WriterT UsedKeys Result Node Source #

fromDict :: [(String, JSValue)] -> Result Node Source #

TagsObject Node # 
Instance details

Defined in Ganeti.Objects

Methods

tagsOf :: Node -> TagSet Source #

SerialNoObject Node # 
Instance details

Defined in Ganeti.Objects

Methods

serialOf :: Node -> Int Source #

UuidObject Node # 
Instance details

Defined in Ganeti.Objects

Methods

uuidOf :: Node -> String Source #

TimeStampObject Node # 
Instance details

Defined in Ganeti.Objects

Methods

cTimeOf :: Node -> ClockTime Source #

mTimeOf :: Node -> ClockTime Source #

TagsObjectL Node # 
Instance details

Defined in Ganeti.Objects.Lens

Methods

tagsL :: Lens' Node TagSet Source #

SerialNoObjectL Node # 
Instance details

Defined in Ganeti.Objects.Lens

Methods

serialL :: Lens' Node Int Source #

UuidObjectL Node # 
Instance details

Defined in Ganeti.Objects.Lens

Methods

uuidL :: Lens' Node String Source #

TimeStampObjectL Node # 
Instance details

Defined in Ganeti.Objects.Lens

Methods

mTimeL :: Lens' Node ClockTime Source #

NdParamObject Node # 
Instance details

Defined in Ganeti.Config

Arbitrary Node 
Instance details

Defined in Test.Ganeti.Objects

Methods

arbitrary :: Gen Node

shrink :: Node -> [Node]

loadNode :: JSValue -> Result Node Source #

saveNode :: Node -> JSValue Source #

NodeGroup definitions

type GroupDiskParams = Container DiskParams Source #

The cluster/group disk parameters type.

type Networks = Container PartialNicParams Source #

A mapping from network UUIDs to nic params of the networks.

data NodeGroup Source #

Instances

Instances details
Eq NodeGroup # 
Instance details

Defined in Ganeti.Objects

Methods

(==) :: NodeGroup -> NodeGroup -> Bool

(/=) :: NodeGroup -> NodeGroup -> Bool

Show NodeGroup # 
Instance details

Defined in Ganeti.Objects

Methods

showsPrec :: Int -> NodeGroup -> ShowS

show :: NodeGroup -> String

showList :: [NodeGroup] -> ShowS

JSON NodeGroup # 
Instance details

Defined in Ganeti.Objects

Methods

readJSON :: JSValue -> Result NodeGroup

showJSON :: NodeGroup -> JSValue

readJSONs :: JSValue -> Result [NodeGroup]

showJSONs :: [NodeGroup] -> JSValue

ArrayObject NodeGroup # 
Instance details

Defined in Ganeti.Objects

Methods

toJSArray :: NodeGroup -> [JSValue] Source #

fromJSArray :: [JSValue] -> Result NodeGroup Source #

DictObject NodeGroup # 
Instance details

Defined in Ganeti.Objects

Methods

toDict :: NodeGroup -> [(String, JSValue)] Source #

fromDictWKeys :: [(String, JSValue)] -> WriterT UsedKeys Result NodeGroup Source #

fromDict :: [(String, JSValue)] -> Result NodeGroup Source #

TagsObject NodeGroup # 
Instance details

Defined in Ganeti.Objects

SerialNoObject NodeGroup # 
Instance details

Defined in Ganeti.Objects

Methods

serialOf :: NodeGroup -> Int Source #

UuidObject NodeGroup # 
Instance details

Defined in Ganeti.Objects

Methods

uuidOf :: NodeGroup -> String Source #

TimeStampObject NodeGroup # 
Instance details

Defined in Ganeti.Objects

Methods

cTimeOf :: NodeGroup -> ClockTime Source #

mTimeOf :: NodeGroup -> ClockTime Source #

TagsObjectL NodeGroup # 
Instance details

Defined in Ganeti.Objects.Lens

Methods

tagsL :: Lens' NodeGroup TagSet Source #

SerialNoObjectL NodeGroup # 
Instance details

Defined in Ganeti.Objects.Lens

Methods

serialL :: Lens' NodeGroup Int Source #

UuidObjectL NodeGroup # 
Instance details

Defined in Ganeti.Objects.Lens

Methods

uuidL :: Lens' NodeGroup String Source #

TimeStampObjectL NodeGroup # 
Instance details

Defined in Ganeti.Objects.Lens

Methods

mTimeL :: Lens' NodeGroup ClockTime Source #

NdParamObject NodeGroup # 
Instance details

Defined in Ganeti.Config

Arbitrary NodeGroup 
Instance details

Defined in Test.Ganeti.Objects

loadNodeGroup :: JSValue -> Result NodeGroup Source #

Job scheduler filtering definitions

data FilterAction Source #

Actions that can be performed when a filter matches.

Constructors

Accept 
Pause 
Reject 
Continue 
RateLimit Int 

Instances

Instances details
Eq FilterAction # 
Instance details

Defined in Ganeti.Objects

Methods

(==) :: FilterAction -> FilterAction -> Bool

(/=) :: FilterAction -> FilterAction -> Bool

Ord FilterAction # 
Instance details

Defined in Ganeti.Objects

Show FilterAction # 
Instance details

Defined in Ganeti.Objects

Methods

showsPrec :: Int -> FilterAction -> ShowS

show :: FilterAction -> String

showList :: [FilterAction] -> ShowS

JSON FilterAction # 
Instance details

Defined in Ganeti.Objects

Methods

readJSON :: JSValue -> Result FilterAction

showJSON :: FilterAction -> JSValue

readJSONs :: JSValue -> Result [FilterAction]

showJSONs :: [FilterAction] -> JSValue

Arbitrary FilterAction 
Instance details

Defined in Test.Ganeti.Objects

data FilterPredicate Source #

Instances

Instances details
Eq FilterPredicate # 
Instance details

Defined in Ganeti.Objects

Ord FilterPredicate # 
Instance details

Defined in Ganeti.Objects

Show FilterPredicate # 
Instance details

Defined in Ganeti.Objects

Methods

showsPrec :: Int -> FilterPredicate -> ShowS

show :: FilterPredicate -> String

showList :: [FilterPredicate] -> ShowS

JSON FilterPredicate # 
Instance details

Defined in Ganeti.Objects

Methods

readJSON :: JSValue -> Result FilterPredicate

showJSON :: FilterPredicate -> JSValue

readJSONs :: JSValue -> Result [FilterPredicate]

showJSONs :: [FilterPredicate] -> JSValue

Arbitrary FilterPredicate 
Instance details

Defined in Test.Ganeti.Objects

data FilterRule Source #

Instances

Instances details
Eq FilterRule # 
Instance details

Defined in Ganeti.Objects

Methods

(==) :: FilterRule -> FilterRule -> Bool

(/=) :: FilterRule -> FilterRule -> Bool

Ord FilterRule # 
Instance details

Defined in Ganeti.Objects

Show FilterRule # 
Instance details

Defined in Ganeti.Objects

Methods

showsPrec :: Int -> FilterRule -> ShowS

show :: FilterRule -> String

showList :: [FilterRule] -> ShowS

JSON FilterRule # 
Instance details

Defined in Ganeti.Objects

Methods

readJSON :: JSValue -> Result FilterRule

showJSON :: FilterRule -> JSValue

readJSONs :: JSValue -> Result [FilterRule]

showJSONs :: [FilterRule] -> JSValue

ArrayObject FilterRule # 
Instance details

Defined in Ganeti.Objects

Methods

toJSArray :: FilterRule -> [JSValue] Source #

fromJSArray :: [JSValue] -> Result FilterRule Source #

DictObject FilterRule # 
Instance details

Defined in Ganeti.Objects

Methods

toDict :: FilterRule -> [(String, JSValue)] Source #

fromDictWKeys :: [(String, JSValue)] -> WriterT UsedKeys Result FilterRule Source #

fromDict :: [(String, JSValue)] -> Result FilterRule Source #

UuidObject FilterRule # 
Instance details

Defined in Ganeti.Objects

Methods

uuidOf :: FilterRule -> String Source #

Arbitrary FilterRule 
Instance details

Defined in Test.Ganeti.Objects

loadFilterRule :: JSValue -> Result FilterRule Source #

filterRuleOrder :: FilterRule -> FilterRule -> Ordering Source #

Order in which filter rules are evaluated, according to `doc/design-optables.rst`. For FilterRule fields not specified as important for the order, we choose an arbitrary ordering effect (after the ones from the spec).

The Ord instance for FilterRule agrees with this function. Yet it is recommended to use this function instead of compare to be explicit that the spec order is used.

data IpFamily Source #

IP family type

Constructors

IpFamilyV4 
IpFamilyV6 

Instances

Instances details
Bounded IpFamily # 
Instance details

Defined in Ganeti.Objects

Enum IpFamily # 
Instance details

Defined in Ganeti.Objects

Eq IpFamily # 
Instance details

Defined in Ganeti.Objects

Methods

(==) :: IpFamily -> IpFamily -> Bool

(/=) :: IpFamily -> IpFamily -> Bool

Ord IpFamily # 
Instance details

Defined in Ganeti.Objects

Methods

compare :: IpFamily -> IpFamily -> Ordering

(<) :: IpFamily -> IpFamily -> Bool

(<=) :: IpFamily -> IpFamily -> Bool

(>) :: IpFamily -> IpFamily -> Bool

(>=) :: IpFamily -> IpFamily -> Bool

max :: IpFamily -> IpFamily -> IpFamily

min :: IpFamily -> IpFamily -> IpFamily

Show IpFamily # 
Instance details

Defined in Ganeti.Objects

Methods

showsPrec :: Int -> IpFamily -> ShowS

show :: IpFamily -> String

showList :: [IpFamily] -> ShowS

JSON IpFamily # 
Instance details

Defined in Ganeti.Objects

Methods

readJSON :: JSValue -> Result IpFamily

showJSON :: IpFamily -> JSValue

readJSONs :: JSValue -> Result [IpFamily]

showJSONs :: [IpFamily] -> JSValue

Arbitrary IpFamily 
Instance details

Defined in Test.Ganeti.Objects

ipFamilyFromRaw :: forall m. (Monad m, MonadFail m) => Int -> m IpFamily Source #

ipFamilyToVersion :: IpFamily -> Int Source #

Conversion from IP family to IP version. This is needed because Python uses both, depending on context.

type ClusterHvParams = GenericContainer Hypervisor HvParams Source #

Cluster HvParams (hvtype to hvparams mapping).

type OsHvParams = Container ClusterHvParams Source #

Cluster Os-HvParams (os to hvparams mapping).

type ClusterOsParams = Container OsParams Source #

Cluster OsParams.

type UidRange = (Int, Int) Source #

A low-high UID ranges.

type UidPool = [UidRange] Source #

Cluster UID Pool, list (low, high) UID ranges.

type IAllocatorParams = Container JSValue Source #

The iallocator parameters type.

type CandidateCertificates = Container String Source #

The master candidate client certificate digests

Cluster definitions

data Cluster Source #

Constructors

Cluster 

Fields

Instances

Instances details
Eq Cluster # 
Instance details

Defined in Ganeti.Objects

Methods

(==) :: Cluster -> Cluster -> Bool

(/=) :: Cluster -> Cluster -> Bool

Show Cluster # 
Instance details

Defined in Ganeti.Objects

Methods

showsPrec :: Int -> Cluster -> ShowS

show :: Cluster -> String

showList :: [Cluster] -> ShowS

JSON Cluster # 
Instance details

Defined in Ganeti.Objects

Methods

readJSON :: JSValue -> Result Cluster

showJSON :: Cluster -> JSValue

readJSONs :: JSValue -> Result [Cluster]

showJSONs :: [Cluster] -> JSValue

ArrayObject Cluster # 
Instance details

Defined in Ganeti.Objects

Methods

toJSArray :: Cluster -> [JSValue] Source #

fromJSArray :: [JSValue] -> Result Cluster Source #

DictObject Cluster # 
Instance details

Defined in Ganeti.Objects

Methods

toDict :: Cluster -> [(String, JSValue)] Source #

fromDictWKeys :: [(String, JSValue)] -> WriterT UsedKeys Result Cluster Source #

fromDict :: [(String, JSValue)] -> Result Cluster Source #

TagsObject Cluster # 
Instance details

Defined in Ganeti.Objects

SerialNoObject Cluster # 
Instance details

Defined in Ganeti.Objects

Methods

serialOf :: Cluster -> Int Source #

UuidObject Cluster # 
Instance details

Defined in Ganeti.Objects

Methods

uuidOf :: Cluster -> String Source #

TimeStampObject Cluster # 
Instance details

Defined in Ganeti.Objects

Methods

cTimeOf :: Cluster -> ClockTime Source #

mTimeOf :: Cluster -> ClockTime Source #

TagsObjectL Cluster # 
Instance details

Defined in Ganeti.Objects.Lens

Methods

tagsL :: Lens' Cluster TagSet Source #

SerialNoObjectL Cluster # 
Instance details

Defined in Ganeti.Objects.Lens

Methods

serialL :: Lens' Cluster Int Source #

UuidObjectL Cluster # 
Instance details

Defined in Ganeti.Objects.Lens

Methods

uuidL :: Lens' Cluster String Source #

TimeStampObjectL Cluster # 
Instance details

Defined in Ganeti.Objects.Lens

Methods

mTimeL :: Lens' Cluster ClockTime Source #

NdParamObject Cluster # 
Instance details

Defined in Ganeti.Config

Arbitrary Cluster 
Instance details

Defined in Test.Ganeti.Objects

Methods

arbitrary :: Gen Cluster

shrink :: Cluster -> [Cluster]

loadCluster :: JSValue -> Result Cluster Source #

saveCluster :: Cluster -> JSValue Source #

ConfigData definitions

data ConfigData Source #

Instances

Instances details
Eq ConfigData # 
Instance details

Defined in Ganeti.Objects

Methods

(==) :: ConfigData -> ConfigData -> Bool

(/=) :: ConfigData -> ConfigData -> Bool

Show ConfigData # 
Instance details

Defined in Ganeti.Objects

Methods

showsPrec :: Int -> ConfigData -> ShowS

show :: ConfigData -> String

showList :: [ConfigData] -> ShowS

JSON ConfigData # 
Instance details

Defined in Ganeti.Objects

Methods

readJSON :: JSValue -> Result ConfigData

showJSON :: ConfigData -> JSValue

readJSONs :: JSValue -> Result [ConfigData]

showJSONs :: [ConfigData] -> JSValue

ArrayObject ConfigData # 
Instance details

Defined in Ganeti.Objects

Methods

toJSArray :: ConfigData -> [JSValue] Source #

fromJSArray :: [JSValue] -> Result ConfigData Source #

DictObject ConfigData # 
Instance details

Defined in Ganeti.Objects

Methods

toDict :: ConfigData -> [(String, JSValue)] Source #

fromDictWKeys :: [(String, JSValue)] -> WriterT UsedKeys Result ConfigData Source #

fromDict :: [(String, JSValue)] -> Result ConfigData Source #

SerialNoObject ConfigData # 
Instance details

Defined in Ganeti.Objects

Methods

serialOf :: ConfigData -> Int Source #

TimeStampObject ConfigData # 
Instance details

Defined in Ganeti.Objects

Methods

cTimeOf :: ConfigData -> ClockTime Source #

mTimeOf :: ConfigData -> ClockTime Source #

SerialNoObjectL ConfigData # 
Instance details

Defined in Ganeti.Objects.Lens

Methods

serialL :: Lens' ConfigData Int Source #

TimeStampObjectL ConfigData # 
Instance details

Defined in Ganeti.Objects.Lens

Methods

mTimeL :: Lens' ConfigData ClockTime Source #

Arbitrary ConfigData 
Instance details

Defined in Test.Ganeti.Objects

loadConfigData :: JSValue -> Result ConfigData Source #

Master network parameters

data MasterNetworkParameters Source #

Instances

Instances details
Eq MasterNetworkParameters # 
Instance details

Defined in Ganeti.Objects

Show MasterNetworkParameters # 
Instance details

Defined in Ganeti.Objects

JSON MasterNetworkParameters # 
Instance details

Defined in Ganeti.Objects

Methods

readJSON :: JSValue -> Result MasterNetworkParameters

showJSON :: MasterNetworkParameters -> JSValue

readJSONs :: JSValue -> Result [MasterNetworkParameters]

showJSONs :: [MasterNetworkParameters] -> JSValue

ArrayObject MasterNetworkParameters # 
Instance details

Defined in Ganeti.Objects

DictObject MasterNetworkParameters # 
Instance details

Defined in Ganeti.Objects

Methods

toDict :: MasterNetworkParameters -> [(String, JSValue)] Source #

fromDictWKeys :: [(String, JSValue)] -> WriterT UsedKeys Result MasterNetworkParameters Source #

fromDict :: [(String, JSValue)] -> Result MasterNetworkParameters Source #