ganeti

Safe HaskellSafe-Infered

Ganeti.HTools.Nic

Contents

Description

Module describing an NIC.

The NIC data type only holds data about a NIC, but does not provide any logic.

Synopsis

Type declarations

data Mode Source

Constructors

Bridged 
Routed 
OpenVSwitch 

Instances

Eq Mode 
Show Mode 

data Nic Source

The NIC type.

It holds the data for a NIC as it is provided via the IAllocator protocol for an instance creation request. All data in those request is optional, that's why all fields are Maybe's.

TODO: Another name might be more appropriate for this type, as for example RequestedNic. But this type is used as a field in the Instance type, which is not named RequestedInstance, so such a name would be weird. PartialNic already exists in Objects, but doesn't fit the bill here, as it contains a required field (mac). Objects and the types therein are subject to being reworked, so until then this type is left as is.

Constructors

Nic 

Fields

mac :: Maybe String

MAC address of the NIC

ip :: Maybe String

IP address of the NIC

mode :: Maybe Mode

the mode the NIC operates in

link :: Maybe String

the link of the NIC

bridge :: Maybe String

the bridge this NIC is connected to if the mode is Bridged

network :: Maybe NetworkID

network UUID if this NIC is connected to a network

Instances

Eq Nic 
Show Nic 

type List = Container NicSource

A simple name for an instance map.

Initialization

create :: Maybe String -> Maybe String -> Maybe Mode -> Maybe String -> Maybe String -> Maybe NetworkID -> NicSource

Create a NIC.