ganeti
Safe HaskellNone

Ganeti.HTools.Nic

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

Instances details
Eq Mode # 
Instance details

Defined in Ganeti.HTools.Nic

Methods

(==) :: Mode -> Mode -> Bool

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

Show Mode # 
Instance details

Defined in Ganeti.HTools.Nic

Methods

showsPrec :: Int -> Mode -> ShowS

show :: Mode -> String

showList :: [Mode] -> ShowS

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

Instances details
Eq Nic # 
Instance details

Defined in Ganeti.HTools.Nic

Methods

(==) :: Nic -> Nic -> Bool

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

Show Nic # 
Instance details

Defined in Ganeti.HTools.Nic

Methods

showsPrec :: Int -> Nic -> ShowS

show :: Nic -> String

showList :: [Nic] -> ShowS

type List = Container Nic Source #

A simple name for an instance map.

Initialization

create :: Maybe String -> Maybe String -> Maybe Mode -> Maybe String -> Maybe String -> Maybe NetworkID -> Nic Source #

Create a NIC.