-
-
Save dminuoso/53fbd686b59a5f79adb58af773f54294 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getVrf :: [IfIP] -> Comp1 (Maybe Vrf) | |
getVrf ips = do | |
vrfs <- traverse findVrf (toListOf opt ips) | |
case nub vrfs of | |
[] -> pure Nothing | |
[x] -> pure (Just x) | |
_xs -> Nothing <$ configErr (vsep [ "Multiple VRFs present:" | |
, indent 4 (hyphenList (pretty . vrfName <$> vrfs)) | |
]) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment