-- | Returns a node's group, with optional failure if we can't find it
-- (configuration corrupt).
getGroupOfNode :: ConfigData -> Node -> Maybe NodeGroup
getGroupOfNode cfg node =
  M.lookup (UTF8.fromString $ nodeGroup node)
    (fromContainer . configNodegroups $ cfg)
getGroupOfNode :: ConfigData -> Node -> Maybe NodeGroup
getGroupOfNode cfg node =
  M.lookup (UTF8.fromString $ nodeGroup node)
    (fromContainer . configNodegroups $ cfg)
getGroupOfNode cfg node =
  M.lookup (UTF8.fromString $ nodeGroup node)
    (fromContainer . configNodegroups $ cfg)