-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.sh
executable file
·50 lines (36 loc) · 1.58 KB
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Examples
# Poor man's test
HOST=aldea
function header {
echo -e '>==============================================================================='
echo -e "> $1"
echo -e "<enter to continue>"
echo -e '>==============================================================================='
read
}
header 'remove all blacklist and whitelist usages (whitelist call forced)'
./ip_list.py -n $HOST -r -m "." -i "." -b
./ip_list.py -n $HOST -r -m "." -i "." -w -f
header 'remove all log-only flags (whitelist call forced)'
./ip_list.py -n $HOST -a -o disable -m "." -b -f
./ip_list.py -n $HOST -a -o disable -m "." -w
header 'add IP List "aaa" to blacklist of host "aldea" on all mapping containing the string "basic"'
./ip_list.py -n $HOST -a -m "basic" -i "^aaa" -b
header 'show all blacklist and whitelist usages'
./ip_list.py -n $HOST -s -m "." -b
./ip_list.py -n $HOST -s -m "." -w
header 'add IP list starting with letter 'a' to all mappings containing string "s"'
./ip_list.py -n $HOST -a -m "s" -i "^a" -b
header 'enable log-only on whitelist for all mappings with a label test99'
./ip_list.py -n $HOST -a -o enable -l "test99" -w
header 'show all blacklist and whitelist usages'
./ip_list.py -n $HOST -s -m "." -b
./ip_list.py -n $HOST -s -m "." -w
header 'remove all allow rule ip pattern'
./ip_list.py -n $HOST -d -m "." -f
header 'error mapping not found - with label '
./ip_list.py -n $HOST -a -o enable -l "foo" -w
header 'error mapping not found - with mapping pattern'
./ip_list.py -n $HOST -r -m "foo" -w -i "."
header 'error ip list not found '
./ip_list.py -n $HOST -a -m "." -i "foo" -w