Skip to content

Instantly share code, notes, and snippets.

@dminuoso

dminuoso/f.hs Secret

Created March 16, 2021 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dminuoso/d73bf2520faf4e36d3168c8db789727a to your computer and use it in GitHub Desktop.
Save dminuoso/d73bf2520faf4e36d3168c8db789727a to your computer and use it in GitHub Desktop.
commonInterfaces :: Fold Device CommonInterface
commonInterfaces =
devPhysInterfaces % each % commonInterface
`summing` devVlanInterfaces % each % commonInterface
`summing` devMLAGs % each % commonInterface
`summing` devLAGs % each % commonInterface
...
_clBgpUnderlay = toListOf ( cpDevice
% commonInterfaces
% unsafeFilteredBy (cIfBgpMode % _Just % _BmUnderlay)
% cIfName )
ca
_clBgpExit = itoListOf ( cpDevice
% commonInterface
% unsafeFilteredBy (cIfBgpMode % _Just % _BmExit)
% cIfName )
ca
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment