Skip to content

Instantly share code, notes, and snippets.

@dminuoso

dminuoso/f.hs Secret

Created October 6, 2021 18:03
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/38033cec207a51cf191fad8976e69a40 to your computer and use it in GitHub Desktop.
Save dminuoso/38033cec207a51cf191fad8976e69a40 to your computer and use it in GitHub Desktop.
l3Interfaces :: Fold Device L3Interface
l3Interfaces =
devPhysInterfaces % traversed % phyAny % _AnyService % _ServiceL3
`summing` devLAGs % traversed % lagInt % _ServiceL3
-- MLAGs can never be L3 Interfaces. See makeMLAG in NIF2.
`summing` devVlanInterfaces % traversed % vlanL3
`summing` devLoopbackInterfaces % traversed % loL3
dot1qInterfaces :: Fold Device Dot1QInterface
dot1qInterfaces =
devPhysInterfaces % traversed % phyAny % _AnyService % _Service1Q
`summing` devLAGs % traversed % lagInt % _Service1Q
`summing` devMLAGs % traversed % mlagInt % lagInt % _Service1Q
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment