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

Ganeti.Network

Description

Implementation of the Ganeti network objects.

This is does not (yet) cover all methods that are provided in the corresponding python implementation (network.py).

Synopsis

Documentation

data PoolPart #

Constructors

PoolInstances 
PoolExt 

netIpv4NumHosts :: Network -> Integer #

getReservedCount :: Network -> Int #

Get the count of reserved addresses.

getFreeCount :: Network -> Int #

Get the count of free addresses.

isFull :: Network -> Bool #

Check whether the network is full.

getMap :: Network -> String #

Return a textual representation of the network's occupation status.

isReserved :: (MonadError e m, Error e) => PoolPart -> Ip4Address -> Network -> m Bool #

Checks if a given address is reserved. Fails if the address isn't in the network range.

reserve :: (MonadError e m, Error e) => PoolPart -> Ip4Address -> Network -> m Network #

Marks an address as used.

release :: (MonadError e m, Error e) => PoolPart -> Ip4Address -> Network -> m Network #

Marks an address as unused.

findFree :: (MonadError e m, Error e) => (Ip4Address -> Bool) -> Network -> m (Maybe Ip4Address) #

Get the first free address in the network that satisfies a given predicate.

allReservations :: Network -> Maybe BitArray #

Get a bit vector of all reservations (internal and external) combined.