Safe Haskell | None |
---|
Implementation of the Ganeti Query2 node group queries.
Synopsis
- networkFields :: FieldList Network NoDataRuntime
- fieldsMap :: FieldMap Network NoDataRuntime
- getGroupConnections :: ConfigData -> String -> [(String, String, String, String)]
- getGroupConnection :: String -> NodeGroup -> Maybe (String, String, String, String)
- getNicMode :: PartialNicParams -> String
- getNicLink :: PartialNicParams -> String
- getNicVlan :: PartialNicParams -> String
- getInstances :: ConfigData -> String -> [String]
- instIsConnected :: String -> Instance -> Bool
- getNetworkUuid :: ConfigData -> String -> Maybe String
- getReservations :: Ip4Network -> Maybe AddressPool -> [Ip4Address]
- getExtReservationsString :: Network -> ResultEntry
Documentation
getGroupConnections :: ConfigData -> String -> [(String, String, String, String)] Source #
Given a network's UUID, this function lists all connections from the network to nodegroups including the respective mode and links.
getGroupConnection :: String -> NodeGroup -> Maybe (String, String, String, String) Source #
Given a network's UUID and a node group, this function assembles
a tuple of the group's name, the mode and the link by which the
network is connected to the group. Returns Nothing
if the network
is not connected to the group.
getNicMode :: PartialNicParams -> String Source #
Retrieves the network's mode and formats it human-readable, also in case it is not available.
getNicLink :: PartialNicParams -> String Source #
Retrieves the network's vlan and formats it human-readable, also in case it it not available.
getNicVlan :: PartialNicParams -> String Source #
Retrieves the network's link and formats it human-readable, also in case it it not available.
getInstances :: ConfigData -> String -> [String] Source #
Retrieves the network's instances' names.
instIsConnected :: String -> Instance -> Bool Source #
Helper function that checks if an instance is linked to the given network.
getNetworkUuid :: ConfigData -> String -> Maybe String Source #
Helper function to look up a network's UUID by its name
getReservations :: Ip4Network -> Maybe AddressPool -> [Ip4Address] Source #
Computes the reservations list for a network.
This doesn't use the netmask for validation of the length, instead simply iterating over the reservations.
getExtReservationsString :: Network -> ResultEntry Source #
Computes the external reservations as string for a network.