From b5be0da2933a8ec1c4823e2e4c6c4d9d29534f85 Mon Sep 17 00:00:00 2001 From: checktheroads Date: Sun, 12 Apr 2020 02:24:10 -0700 Subject: [PATCH] fix examples --- hyperglass/examples/commands.yaml | 125 ++++++++++++++++++++++ hyperglass/examples/hyperglass.yaml | 155 ++++++++++++++++++++++++++++ 2 files changed, 280 insertions(+) diff --git a/hyperglass/examples/commands.yaml b/hyperglass/examples/commands.yaml index e69de29..3145145 100644 --- a/hyperglass/examples/commands.yaml +++ b/hyperglass/examples/commands.yaml @@ -0,0 +1,125 @@ +# arista: +# ipv4_default: +# bgp_aspath: show ip bgp regexp {target} +# bgp_community: show ip bgp community {target} +# bgp_route: show ip bgp {target} +# ping: ping ip {target} source {source} +# traceroute: traceroute ip {target} source {source} +# ipv4_vpn: +# bgp_aspath: show ip bgp regexp {target} vrf {vrf} +# bgp_community: show ip bgp community {target} vrf {vrf} +# bgp_route: show ip bgp {target} vrf {vrf} +# ping: ping vrf {vrf} ip {target} source {source} +# traceroute: traceroute vrf {vrf} ip {target} source {source} +# ipv6_default: +# bgp_aspath: show ipv6 bgp regexp {target} +# bgp_community: show ipv6 bgp community {target} +# bgp_route: show ipv6 bgp {target} +# ping: ping ipv6 {target} source {source} +# traceroute: traceroute ipv6 {target} source {source} +# ipv6_vpn: +# bgp_aspath: show ipv6 bgp regexp {target} vrf {vrf} +# bgp_community: show ipv6 bgp community {target} vrf {vrf} +# bgp_route: show ipv6 bgp {target} vrf {vrf} +# ping: ping vrf {vrf} ipv6 {target} source {source} +# traceroute: traceroute vrf {vrf} ipv6 {target} source {source} +# cisco_ios: +# ipv4_default: +# bgp_aspath: show bgp ipv4 unicast quote-regexp "{target}" +# bgp_community: show bgp ipv4 unicast community {target} +# 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} +# ipv4_vpn: +# bgp_aspath: show bgp vpnv4 unicast vrf {vrf} quote-regexp "{target}" +# bgp_community: show bgp vpnv4 unicast vrf {vrf} community {target} +# bgp_route: show bgp vpnv4 unicast vrf {vrf} {target} +# ping: ping vrf {vrf} {target} repeat 5 source {source} +# traceroute: traceroute vrf {vrf} {target} timeout 1 probe 2 source {source} +# ipv6_default: +# bgp_aspath: show bgp ipv6 unicast quote-regexp "{target}" +# bgp_community: show bgp ipv6 unicast community {target} +# 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} +# ipv6_vpn: +# bgp_aspath: show bgp vpnv6 unicast vrf {vrf} quote-regexp "{target}" +# bgp_community: show bgp vpnv6 unicast vrf {vrf} community {target} +# bgp_route: show bgp vpnv6 unicast vrf {vrf} {target} +# ping: ping vrf {vrf} {target} repeat 5 source {source} +# traceroute: traceroute vrf {vrf} {target} timeout 1 probe 2 source {source} +# cisco_xr: +# ipv4_default: +# bgp_aspath: show bgp ipv4 unicast regexp {target} +# bgp_community: show bgp ipv4 unicast community {target} +# bgp_route: show bgp ipv4 unicast {target} +# ping: ping ipv4 {target} count 5 source {source} +# traceroute: traceroute ipv4 {target} timeout 1 probe 2 source {source} +# ipv4_vpn: +# bgp_aspath: show bgp vpnv4 unicast vrf {vrf} regexp {target} +# bgp_community: show bgp vpnv4 unicast vrf {vrf} community {target} +# bgp_route: show bgp vpnv4 unicast vrf {vrf} {target} +# ping: ping vrf {vrf} {target} count 5 source {source} +# traceroute: traceroute vrf {vrf} {target} timeout 1 probe 2 source {source} +# ipv6_default: +# bgp_aspath: show bgp ipv6 unicast regexp {target} +# bgp_community: show bgp ipv6 unicast community {target} +# bgp_route: show bgp ipv6 unicast {target} +# ping: ping ipv6 {target} count 5 source {source} +# traceroute: traceroute ipv6 {target} timeout 1 probe 2 source {source} +# ipv6_vpn: +# bgp_aspath: show bgp vpnv6 unicast vrf {vrf} regexp {target} +# bgp_community: show bgp vpnv6 unicast vrf {vrf} community {target} +# bgp_route: show bgp vpnv6 unicast vrf {vrf} {target} +# ping: ping vrf {vrf} {target} count 5 source {source} +# traceroute: traceroute vrf {vrf} {target} timeout 1 probe 2 source {source} +# huawei: +# ipv4_default: +# bgp_aspath: display bgp routing-table regular-expression {target} +# bgp_community: display bgp routing-table regular-expression {target} +# bgp_route: display bgp routing-table {target} +# ping: ping -c 5 -a {source} {target} +# traceroute: tracert -q 2 -f 1 -a {source} {target} +# ipv4_vpn: +# bgp_aspath: display bgp vpnv4 vpn-instance {vrf} routing-table regular-expression {target} +# bgp_community: display bgp vpnv4 vpn-instance {vrf} routing-table regular-expression {target} +# bgp_route: display bgp vpnv4 vpn-instance {vrf} routing-table {target} +# ping: ping -vpn-instance {vrf} -c 5 -a {source} {target} +# traceroute: tracert -q 2 -f 1 -vpn-instance {vrf} -a {source} {target} +# ipv6_default: +# bgp_aspath: display bgp ipv6 routing-table regular-expression {target} +# bgp_community: display bgp ipv6 routing-table community {target} +# bgp_route: display bgp ipv6 routing-table {target} +# ping: ping ipv6 -c 5 -a {source} {target} +# traceroute: tracert ipv6 -q 2 -f 1 -a {source} {target} +# ipv6_vpn: +# bgp_aspath: display bgp vpnv6 vpn-instance {vrf} routing-table regular-expression {target} +# bgp_community: display bgp vpnv6 vpn-instance {vrf} routing-table regular-expression {target} +# bgp_route: display bgp vpnv6 vpn-instance {vrf} routing-table {target} +# ping: ping vpnv6 vpn-instance {vrf} -c 5 -a {source} {target} +# traceroute: tracert -q 2 -f 1 vpn-instance {vrf} -a {source} {target} +# juniper: +# ipv4_default: +# bgp_aspath: show route protocol bgp table inet.0 aspath-regex "{target}" +# bgp_community: show route protocol bgp table inet.0 community {target} +# bgp_route: show route protocol bgp table inet.0 {target} detail | except Label | except Label | except "Next hop type" | except Task | except Address | except "Session Id" | except State | except "Next-hop reference" | except destinations | except "Announcement bits" +# ping: ping inet {target} count 5 source {source} +# traceroute: traceroute inet {target} wait 1 source {source} +# ipv4_vpn: +# bgp_aspath: show route protocol bgp table {vrf}.inet.0 aspath-regex "{target}" +# bgp_community: show route protocol bgp table {vrf}.inet.0 community {target} +# bgp_route: show route protocol bgp table {vrf}.inet.0 {target} detail | except Label | except Label | except "Next hop type" | except Task | except Address | except "Session Id" | except State | except "Next-hop reference" | except destinations | except "Announcement bits" +# ping: ping inet routing-instance {vrf} {target} count 5 source {source} +# traceroute: traceroute inet routing-instance {vrf} {target} wait 1 source {source} +# ipv6_default: +# bgp_aspath: show route protocol bgp table inet6.0 aspath-regex "{target}" +# bgp_community: show route protocol bgp table inet6.0 community {target} +# bgp_route: show route protocol bgp table inet6.0 {target} detail | except Label | except Label | except "Next hop type" | except Task | except Address | except "Session Id" | except State | except "Next-hop reference" | except destinations | except "Announcement bits" +# ping: ping inet6 {target} count 5 source {source} +# traceroute: traceroute inet6 {target} wait 2 source {source} +# ipv6_vpn: +# bgp_aspath: show route protocol bgp table {vrf}.inet6.0 aspath-regex "{target}" +# bgp_community: show route protocol bgp table {vrf}.inet6.0 community {target} +# bgp_route: show route protocol bgp table {vrf}.inet6.0 {target} detail | except Label | except Label | except "Next hop type" | except Task | except Address | except "Session Id" | except State | except "Next-hop reference" | except destinations | except "Announcement bits" +# ping: ping inet6 routing-instance {vrf} {target} count 5 source {source} +# traceroute: traceroute inet6 routing-instance {vrf} {target} wait 2 source {source} diff --git a/hyperglass/examples/hyperglass.yaml b/hyperglass/examples/hyperglass.yaml index e69de29..d822453 100644 --- a/hyperglass/examples/hyperglass.yaml +++ b/hyperglass/examples/hyperglass.yaml @@ -0,0 +1,155 @@ +# cache: +# database: 0 +# host: localhost +# port: 6379 +# show_text: true +# timeout: 120 +# cors_origins: [] +# debug: false +# developer_mode: false +# docs: +# base_url: https://lg.example.net +# description: "" +# devices: +# description: List of all devices/locations with associated identifiers, display names, networks, & VRFs. +# summary: Devices List +# title: Devices +# enable: true +# mode: redoc +# openapi_uri: /openapi.json +# queries: +# description: List of supported query types. +# summary: Query Types +# title: Supported Queries +# query: +# description: Request a query response per-location. +# summary: Query the Looking Glass +# title: Submit Query +# title: "{site_title} API Documentation" +# uri: /api/docs +# listen_address: localhost +# listen_port: 8001 +# messages: +# acl_denied: "{target} is a member of {denied_network}, which is not allowed." +# acl_not_allowed: "{target} is not allowed." +# authentication_error: Authentication error occurred. +# connection_error: "Error connecting to {device_name}: {error}" +# feature_not_enabled: "{feature} is not enabled." +# general: Something went wrong. +# invalid_field: "{input} is an invalid {field}." +# invalid_input: "{target} is not a valid {query_type} target." +# no_input: "{field} must be specified." +# no_output: No output. +# no_response: No response. +# request_timeout: Request timed out. +# vrf_not_associated: VRF {vrf_name} is not associated with {device_name}. +# vrf_not_found: VRF {vrf_name} is not defined. +# netmiko_delay_factor: 0.1 +# org_name: Beloved Hyperglass User +# primary_asn: "65001" +# queries: +# bgp_aspath: +# display_name: BGP AS Path +# enable: true +# pattern: +# asdot: ^(\^|^\_)((\d+\.\d+)\_|(\d+\.\d+)\$|(\d+\.\d+)\(\_\.\+\_\))+$ +# asplain: ^(\^|^\_)(\d+\_|\d+\$|\d+\(\_\.\+\_\))+$ +# mode: asplain +# bgp_community: +# display_name: BGP Community +# enable: true +# pattern: +# decimal: ^[0-9]{1,10}$ +# extended_as: ^([0-9]{0,5})\:([0-9]{1,5})$ +# large: ^([0-9]{1,10})\:([0-9]{1,10})\:[0-9]{1,10}$ +# bgp_route: +# display_name: BGP Route +# enable: true +# ping: +# display_name: Ping +# enable: true +# traceroute: +# display_name: Traceroute +# enable: true +# request_timeout: 90 +# site_description: Beloved Hyperglass User Network Looking Glass +# site_keywords: +# - hyperglass +# - looking glass +# - lg +# - peer +# - peering +# - ip +# - ipv4 +# - ipv6 +# - transit +# - community +# - communities +# - bgp +# - routing +# - network +# - isp +# - internet service provider +# site_title: hyperglass +# web: +# credit: +# enable: true +# dns_provider: +# name: cloudflare +# url: https://cloudflare-dns.com/dns-query +# external_link: +# enable: true +# title: PeeringDB +# url: https://www.peeringdb.com/asn/{primary_asn} +# help_menu: +# enable: true +# file: null +# title: Help +# logo: +# dark: images/hyperglass-dark.png +# favicons: ui/images/favicons/ +# height: null +# light: images/hyperglass-light.png +# width: 80% +# opengraph: +# height: 1132 +# image: images/hyperglass-opengraph.png +# width: 7355 +# terms: +# enable: true +# file: null +# title: Terms +# text: +# cache: Results will be cached for {timeout} {period}. +# fqdn_tooltip: Use {protocol} +# query_location: Location +# query_target: Target +# query_type: Query Type +# query_vrf: Routing Table +# subtitle: AS{primary_asn} +# title: hyperglass +# title_mode: logo_only +# theme: +# colors: +# black: "#262626" +# blue: "#314cb6" +# cyan: "#118ab2" +# danger: "#d84b4b" +# error: "#ff6b35" +# gray: "#c1c7cc" +# green: "#35b246" +# orange: "#ff6b35" +# pink: "#f2607d" +# primary: "#118ab2" +# purple: "#8d30b5" +# red: "#d84b4b" +# secondary: "#314cb6" +# success: "#35b246" +# teal: "#35b299" +# warning: "#edae49" +# white: "#f7f7f7" +# yellow: "#edae49" +# default_color_mode: null +# fonts: +# body: Nunito +# mono: Fira Code