Skip to content

Commit

Permalink
[classifier] simplify regexes
Browse files Browse the repository at this point in the history
There is not much we can do with regexes in YAML file to make them
more readable, but simplify them a bit more.
  • Loading branch information
vincentbernat committed May 28, 2021
1 parent eff6d90 commit 4dcd7b0
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions classifier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,30 @@ matchers:
member: "\\1"
pod: "\\2"
# Groups
- "^to([12])-p(\\d+)\\.":
- "^to[12]-p\\d+\\.":
groups:
- tor
- tor-bgp
- tor-bgp-compute
- "^to([12])-ap(\\d+)\\.":
- "^to[12]-ap\\d+\\.":
groups:
- tor
- tor-bgp
- tor-bgp-admin
- "^to([12])-sp(\\d+)\\.":
- "^to[12]-sp\\d+\\.":
groups:
- tor
- tor-bgp
- tor-bgp-storage
- "^spine(\\d+)\\.":
- "^spine\\d+\\.":
groups:
- spine
- spine-bgp
- "^s-spine(\\d+)\\.":
- "^s-spine\\d+\\.":
groups:
- sspine
- sspine-bgp
- "^con(\\d+)-n(\\d+)\\.":
- "^con\\d+-n\\d+\\.":
groups:
- console
- "^edge\\d+\\.":
Expand All @@ -52,47 +52,47 @@ matchers:
- "^ob[1-4]-":
groups:
- oob
- "^gateway[12]\\.(sk1|ussfo03)\\.":
- "^gateway[12]\\.":
os: linux
groups:
- adm-gateway
# Vendor
- "^to([12])-(p|ap)(\\d+)\\.(sk1)\\.":
- "^to[12]-(p|ap)\\d+\\.sk1\\.":
os: cumulus
model: dell-s4048
- "^to([12])-sp(\\d+)\\.(sk1)\\.":
- "^to[12]-sp\\d+\\.sk1\\.":
os: cumulus
model: dell-s6010
- "^to([12])-(p|ap|sp)(\\d+)\\.(ussfo03)\\.":
- "^to[12]-(p|ap|sp)\\d+\\.ussfo03\\.":
os: cumulus
model: wedge100
- "^to([12])-p2\\.(ussfo03)\\.":
- "^to[12]-p2\\.ussfo03\\.":
os: junos
model: qfx5110-48s
- "^spine(\\d+)\\.(sk1)\\.":
- "^spine\\d+\\.sk1\\.":
os: cumulus
model: dell-s6010
- "^spine(\\d+)\\.(ussfo03)\\.":
- "^spine\\d+\\.ussfo03\\.":
os: cumulus
model: wedge100
- "^con(\\d+)-n(\\d+)\\.(sk1)\\.":
- "^con\\d+-n\\d+\\.sk1\\.":
os: opengear
model: cm7116-2-sac
- "^con(\\d+)-n(\\d+)\\.(ussfo03)\\.":
- "^con\\d+-n\\d+\\.ussfo03\\.":
os: opengear
model: cm7116-2-dac
- "^con(\\d+)-ag(\\d+)\\.(ussfo03)\\.":
- "^con\\d+-ag\\d+\\.ussfo03\\.":
os: opengear
model: cm7132-2-dac
- "^s-spine[12]\\.(ussfo03)\\.":
- "^s-spine[12]\\.ussfo03\\.":
os: cumulus
model: wedge100
- "^edge\\d+\\.(ussfo03)\\.":
- "^edge\\d+\\.ussfo03\\.":
os: junos
model: qfx10002-36q
- "^edge\\d+\\.(sk1)\\.":
- "^edge\\d+\\.sk1\\.":
os: iosxr
model: asr9k
- "^ob[1-4]-([s]?p|ag|n)\\d+\\.":
- "^ob[1-4]-(p|sp|ag|n)\\d+\\.":
os: ios
model: c2960s

0 comments on commit 4dcd7b0

Please sign in to comment.