1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00

TOML → YAML

This commit is contained in:
checktheroads
2019-07-07 22:06:59 -07:00
parent b5f9fdfbb0
commit 1e01a98e67
5 changed files with 53 additions and 203 deletions

View File

@@ -1,38 +0,0 @@
[[cisco_ios]]
[cisco_ios.dual]
bgp_community = "show bgp all community {target}"
bgp_aspath = 'show bgp all quote-regexp "{target}"'
[cisco_ios.ipv4]
bgp_route = "show bgp ipv4 unicast {target} | exclude pathid:|Epoch"
ping = "ping {target} repeat 5 source {source}"
traceroute = "traceroute {target} timeout 1 probe 2 source {source}"
[cisco_ios.ipv6]
bgp_route = "show bgp ipv6 unicast {target} | exclude pathid:|Epoch"
ping = "ping ipv6 {target} repeat 5 source {source}"
traceroute = "traceroute ipv6 {target} timeout 1 probe 2 source {source}"
[[cisco_xr]]
[cisco_xr.dual]
bgp_community = 'show bgp all unicast community {target} | utility egrep -v "\(BGP |Table |Non-stop\)"'
bgp_aspath = 'show bgp all unicast regexp {target} | utility egrep -v "\(BGP |Table |Non-stop\)"'
[cisco_xr.ipv4]
bgp_route = 'show bgp ipv4 unicast {target} | util egrep "\(BGP routing table entry|Path \#|aggregated by|Origin |Community:|validity| from \)"'
ping = "ping ipv4 {target} count 5 source {src_addr_ipv4}"
traceroute = "traceroute ipv4 {target} timeout 1 probe 2 source {source}"
[cisco_xr.ipv6]
bgp_route = 'show bgp ipv6 unicast {target} | util egrep "\(BGP routing table entry|Path \#|aggregated by|Origin |Community:|validity| from \)"'
ping = "ping ipv6 {target} count 5 source {src_addr_ipv6}"
traceroute = "traceroute ipv6 {target} timeout 1 probe 2 source {source}"
[[juniper]]
[juniper.dual]
bgp_community = "show route protocol bgp community {target}"
bgp_aspath = "show route protocol bgp aspath-regex {target}"
[juniper.ipv4]
bgp_route = "show route protocol bgp table inet.0 {target} detail"
ping = "ping inet {target} count 5 source {src_addr_ipv4}"
traceroute = "traceroute inet {target} wait 1 source {source}"
[juniper.ipv6]
bgp_route = "show route protocol bgp table inet6.0 {target} detail"
ping = "ping inet6 {target} count 5 source {src_addr_ipv6}"
traceroute = "traceroute inet6 {target} wait 1 source {source}"

View File

@@ -1,124 +0,0 @@
# Non-dictionary parameters
debug = false
requires_ipv6_cidr = [
"cisco_ios",
"cisco_nxos"
]
# IP Blacklist
blacklist = [
"198.18.0.0/15",
"100.64.0.0/10",
"2001:db8::/32",
"10.0.0.0/8",
"192.168.0.0/16",
"172.16.0.0/12"
]
# General site-wide parameters
[general]
primary_asn = "65001"
org_name = "Travis CI Test"
# google_analytics = ""
# Feature customization
[features]
[features.rate_limit.query]
rate = 1000
# title = ""
# message = ""
# button = ""
[features.rate_limit.site]
rate = 1000
# title = ""
# subtitle = ""
[features.cache]
timeout = 1
# directory = ""
# show_text = true
# text = ""
[features.bgp_route]
# enable = true
[features.bgp_community]
# enable = true
[features.bgp_community.regex]
# decimal = ""
# extended_as = ""
# large = ""
[features.bgp_aspath]
# enable = true
[features.bgp_aspath.regex]
# mode = ""
# asplain = ""
# asdot = ""
[features.ping]
# enable = true
[features.traceroute]
# enable = true
[features.max_prefix]
# enable = false
# ipv4 = 24
# ipv6 = 64
# message = ""
# User messages
[messages]
# no_query_type = ""
# no_location = ""
# no_input = ""
# not_allowed = ""
# requires_ipv6_cidr = ""
# invalid_ip = ""
# invalid_dual = ""
# general = ""
# directed_cidr = ""
# Branding/Visual Customization Parameters
[branding]
# site_name = ""
[branding.footer]
# enable = true
[branding.credit]
# enable = true
[branding.peering_db]
# enable = true
[branding.text]
# title_mode = "text_only"
# title = ""
# subtitle = ""
# query_type = ""
# results = ""
# location = ""
# query_placeholder = ""
# bgp_route = ""
# bgp_community = ""
# bgp_aspath = ""
# ping = ""
# traceroute = ""
[branding.text.404]
# title = ""
# subtitle = ""
[branding.text.500]
# title = ""
# subtitle = ""
# button = ""
[branding.text.504]
# message = ""
[branding.logo]
# path = ""
# width = ""
# favicons = ""
[branding.color]
# background = ""
# button_submit = ""
# danger = ""
# progress_bar = ""
[branding.color.tag]
# type = ""
# location = ""
# location_title = ""
# type_title = ""
[branding.font.primary]
# name = ""
# url = ""
[branding.font.mono]
# name = ""
# url = ""

11
tests/configuration.yaml Normal file
View File

@@ -0,0 +1,11 @@
general:
primary_asn: 65001
org_name: Travis CI Test
features:
rate_limit:
query:
rate: 1000
site:
rate: 1000
cache:
timeout: 1

View File

@@ -1,41 +0,0 @@
# Routers
[router.'test-r1']
address = "127.0.1.1"
asn = "65001"
src_addr_ipv4 = "127.0.0.1"
src_addr_ipv6 = "::1"
credential = "default"
location = "pop1"
display_name = "Test Router 1"
port = "22"
type = "cisco_ios"
proxy = "proxy1"
[router.'test-r2']
address = "127.0.1.2"
asn = "65001"
src_addr_ipv4 = "127.0.0.2"
src_addr_ipv6 = "::1"
credential = "default"
location = "pop2"
display_name = "Test Router 2"
port = "22"
type = "cisco_xr"
proxy = ""
# Router Credentials
[credential.'default']
username = "username"
password = "password"
[credential.'other']
username = "otheradmin"
password = "otherpass"
# SSH Proxy Servers
[proxy.'proxy1']
address = "10.0.1.1"
username = "username"
password = "password"
type = "linux_ssh"
ssh_command = "ssh -l {username} {host}"

42
tests/devices.yaml Normal file
View File

@@ -0,0 +1,42 @@
# Routers
router:
test-r1:
address: 127.0.1.1
asn: 65001
src_addr_ipv4: 127.0.0.1
src_addr_ipv6: ::1
credential: default
location: pop1
display_name: Test Router 1
port: 22
nos: cisco_ios
proxy: proxy1
test-r2:
address: 127.0.1.2
asn: 65001
src_addr_ipv4: 127.0.0.2
src_addr_ipv6: ::1
credential: default
location: pop2
display_name: Test Router 2
port: 22
nos: cisco_xr
proxy: null
# Router Credentials
credential:
default:
username: username
password: password
other:
username: otheradmin
password: otherpass
# SSH Proxy Servers
proxy:
proxy1:
address: 10.0.1.1
username: username
password: password
nos: linux_ssh
ssh_command: ssh -l {username} {host}