MACs are retrived using ConfigState

Signed-off-by: BSRK Aditya <[email protected]>
---
 src/Ganeti/WConfd/ConfigModifications.hs |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/Ganeti/WConfd/ConfigModifications.hs 
b/src/Ganeti/WConfd/ConfigModifications.hs
index 44654cd..9940050 100644
--- a/src/Ganeti/WConfd/ConfigModifications.hs
+++ b/src/Ganeti/WConfd/ConfigModifications.hs
@@ -138,6 +138,10 @@ getAllIDs cs = do
       cluster = uuidOf . configCluster . csConfigData $ cs
   return . nub $ lvs ++ instKeys ++ nodeKeys ++ instValues ++ nodeValues
          ++ nodeGroupValues ++ networkValues ++ disksValues ++ nics ++ 
[cluster]
+
+getAllMACs :: ConfigState -> [String]
+getAllMACs = map nicMac . concatMap instNics . M.elems
+           . fromContainer . configInstances . csConfigData
 -- | Add a new instance to the configuration, release DRBD minors,
 -- and commit temporary IPs, all while temporarily holding the config
 -- lock. Return True upon success and False if the config lock was not
-- 
1.7.10.4

Reply via email to