.. collected from all network interfaces of all instances.
Signed-off-by: Petr Pudlak <[email protected]>
---
src/Ganeti/Config.hs | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/Ganeti/Config.hs b/src/Ganeti/Config.hs
index 7311b89..e88a354 100644
--- a/src/Ganeti/Config.hs
+++ b/src/Ganeti/Config.hs
@@ -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.
--
1.9.1.423.g4596e3a