d5af096f41
* Rename asn/deployment_id_asn_map.yaml to constants/constants.yaml * Fix bgp templates * Add community for loopback when bgpd is isolated * Use correct community value
26 lines
528 B
Bash
Executable File
26 lines
528 B
Bash
Executable File
#!/bin/bash
|
|
|
|
echo "Traffic Shift Check:"
|
|
c=0
|
|
config=$(vtysh -c "show run")
|
|
echo "$config" | grep -q "route-map TO_BGP_PEER_V4 permit 2"
|
|
c=$((c+$?))
|
|
echo "$config" | grep -q "route-map TO_BGP_PEER_V4 deny 3"
|
|
c=$((c+$?))
|
|
echo "$config" | grep -q "route-map TO_BGP_PEER_V6 permit 2"
|
|
c=$((c+$?))
|
|
echo "$config" | grep -q "route-map TO_BGP_PEER_V6 deny 3"
|
|
c=$((c+$?))
|
|
|
|
if [[ $c -eq 4 ]];
|
|
then
|
|
echo "System Mode: Normal"
|
|
elif [[ $c -eq 0 ]];
|
|
then
|
|
echo "System Mode: Maintenance"
|
|
else
|
|
echo "System Mode: Not consistent"
|
|
fi
|
|
|
|
echo
|