# Description: This is a template for network devices. 
# It is based industry standard networking devices.
# color-ssh templates can be found at https://github.com/karsyboy/color-ssh

palette:
  Sunrise-Orange: '#e67549'
  Aqua-Blue: '#00e0d1'
  Hot-Pink: '#FF69B4'
  Celestial-Blue: '#5698c8'
  Rich-Gold: '#a35a00'
  Bright-Ube: '#df99f0'
  Caribbean-Green: '#03d28d'
  Milano-Red: '#c71800'
  Sedona: '#c96901'
  Ochre: '#ca9102'
  Mustard: '#cab902'
  Bright-Olive: '#a2bc02'
  Dark-Lime-Green: '#79bf02'
  Kelly-Green: '#28c501'

rules:
# Switch Prompt
- description: Prompt in enabled mode for network switches
  regex: (\S+)#
  color: Rich-Gold

- description: Match prompt in disable for mode network switches
  regex: (\S+)>
  color: Rich-Gold

# Interfaces
- description: Always color the word "interface"
  regex: |
    (?ix)
      \b(
      interfaces?|
      \w+-interface
      )\b
  color: Kelly-Green

- description: Match on interface type "Ethernet"
  regex: |
    (?ix)
      \b(
      (ethernet|eth|et)
      (\d{1,2})?
      (/\d{1,2})?
      (/\d{1,2})?
      (\.\d{1,4})?
      )\b
  color: Sedona

- description: Match on Cisco interface types
  regex: |
    (?ix)
      \b
      (gigabitethernet|gi|gig|
      twogigabitethernet|tw|
      tengigabitethernet|te|
      twentyfivegige|twe|
      fortygigabitethernet|fo|
      appgigabitethernet|ap)
      (\d{1,2})?
      (/\d{1,2})?
      (/\d{1,2})?
      (\.\d{1,4})?
      \b
  color: Sedona

- description: Match on type "Vlan"
  regex: |
    (?ix)
      \b
      (vlan|vl)
      (\d{1,4}|\s\d{1,4})?
      ((?:,\d{1,4})*)?
      \b
  color: Dark-Lime-Green

- description: Match on type "Port-Channel"
  regex: |
    (?ix)
      \b(
      (port-channel|po)
      (\d{1,4})?
      (\.\d{1,4})?
      )\b
  color: Bright-Olive

- description: Match on Extra interface types
  regex: |
    (?ix)
      \b
      (management|mgmt|
      loopback|lo|
      tunnel|tu)
      (\d{1,4})?
      \b
  color: Mustard

# Keywords
- description: Match on good keywords
  regex: |
    (?ix)
      \b
      (connected|up)
      \b
  color: Kelly-Green

- description: Match on nutral keywords
  regex: |
    (?ix)
      \b
      (xcvrAbsen|noOperMem|notconnect)
      \b
  color: Sunrise-Orange

- description: Match on bad keywords
  regex: |
    (?ix)
      \b
      (down|shutdown)
      \b
  color: Milano-Red

# URLs and IPs 
- description: URL
  regex: (?i)\b(((htt|ft|lda)ps?|telnet|ssh|tftp)://[^\s/$.?#].[^\s]*)\b
  color: Aqua-Blue

- description: IPv4
  regex: ([0-9]{1,3}\.){3}[0-9]{1,3}($|/\d{1,2})?
  color: Celestial-Blue

- description: Subnet Mask
  regex: (?:)(?:0|255)\.(?:[0-9]{1,3}\.){2}[0-9]{1,3}
  color: Celestial-Blue

- description: IPv6
  regex: |
    (([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|
    ([0-9a-fA-F]{1,4}:){1,7}:|
    ([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|
    ([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|
    ([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|
    ([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|
    ([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|
    [0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|
    :((:[0-9a-fA-F]{1,4}){1,7}|:)|
    fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|
    ::(ffff(:0{1,4}){0,1}:){0,1}
    ((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}
    (25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|
    ([0-9a-fA-F]{1,4}:){1,4}:
    ((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}
    (25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))
  color: Celestial-Blue