Commit 9edb0190 authored by Petr Pudlak's avatar Petr Pudlak

Add a function for listing all MAC addresses in a cluster

.. collected from all network interfaces of all instances.
Signed-off-by: default avatarPetr Pudlak <pudlak@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent 7b5f1645
......@@ -59,6 +59,8 @@ module Ganeti.Config
, getFilledInstBeParams
, getFilledInstOsParams
, getNetwork
, MAC
, getAllMACs
, buildLinkIpInstnameMap
, instNodes
) where
......@@ -475,6 +477,14 @@ getNetwork cfg name =
networks
in getItem "Network" name by_name
-- ** MACs
type MAC = String
-- | Returns all MAC addresses used in the cluster.
getAllMACs :: ConfigData -> [MAC]
getAllMACs = F.foldMap (map nicMac . instNics) . configInstances
-- * ND params
-- | Type class denoting objects which have node parameters.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment