ganeti

Safe HaskellSafe-Infered

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

Constructors

AddressPool 

Fields

network :: Network
 
reservations :: Vector Bool
 
extReservations :: Vector Bool
 

Instances

Show AddressPool 
Arbitrary AddressPool 

createAddressPool :: Network -> Maybe AddressPoolSource

Create an address pool from a network.

networkIsValid :: Network -> BoolSource

Checks the consistency of the network object. So far, only checks the length of the reservation strings.

sameLength :: Maybe String -> Maybe String -> BoolSource

maybeStr2BitVec :: Maybe String -> Vector BoolSource

bitStringToBitVector :: String -> Vector BoolSource

Converts a string to a bit vector. The character '0' is interpreted as False, all others as True.

allReservations :: AddressPool -> Vector BoolSource

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

getReservedCount :: AddressPool -> IntSource

Get the count of reserved addresses.

getFreeCount :: AddressPool -> IntSource

Get the count of free addresses.

isFull :: AddressPool -> BoolSource

Check whether the network is full.

getMap :: AddressPool -> StringSource

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