OSDN Git Service

Change l7vsadm -V format
[ultramonkey-l7/ultramonkey-l7-v3.git] / test / script / l7vsadm / l7vsadm-4-3-22.sh
1 #!/bin/bash
2
3 . ${SET_DEFAULT_CONF}
4
5 #Add Service
6 $L7VSD
7 if [ $? -ne 0 ]
8 then
9         echo "Test failed: $L7VSD"
10         exit 1
11 fi
12 usleep 100000
13
14 $L7VSADM -A -t 127.0.0.1:40001 -m ip -f 1
15 if [ $? -ne 0 ]
16 then
17         echo "Test failed: $L7VSADM -A -t 127.0.0.1:40001 -m ip -f 1"
18         exit 1
19 fi
20
21 RET=`$L7VSADM -V -n`
22 EXPECT="Layer-7 Virtual Server version 3.0.0
23 L7vsd Log Level:
24 Category                       Level
25 l7vsd_network                  warn
26 l7vsd_network_qos              warn
27 l7vsd_network_bandwidth        warn
28 l7vsd_network_num_connection   warn
29 l7vsd_network_access           warn
30 l7vsd_mainthread               warn
31 l7vsd_virtualservice           warn
32 l7vsd_virtualservice_thread    warn
33 l7vsd_session                  warn
34 l7vsd_session_thread           warn
35 l7vsd_realserver               warn
36 l7vsd_sorryserver              warn
37 l7vsd_module                   warn
38 l7vsd_replication              warn
39 l7vsd_replication_sendthread   warn
40 l7vsd_parameter                warn
41 l7vsd_logger                   warn
42 l7vsd_command                  warn
43 l7vsd_start_stop               warn
44 l7vsd_system                   warn
45 l7vsd_system_memory            warn
46 l7vsd_system_endpoint          warn
47 l7vsd_system_signal            warn
48 l7vsd_system_environment       warn
49 l7vsd_snmpagent                info
50 l7vsd_protocol                 warn
51 l7vsd_schedule                 warn
52
53 Replication Mode:
54 SINGLE
55
56 SNMPAgent:
57 Agent Status                   inactive
58 log trap status                none
59 log trap level                 none
60 cache update interval          none
61 start date                     none
62 last request date              none
63 last trap date                 none
64 total GET requests             none
65 total SET requests             none
66 total trap counts              none
67
68 Prot LocalAddress:Port ProtoMod Scheduler Protomod_opt_string
69   -> RemoteAddress:Port           Forward Weight ActiveConn InactConn
70 TCP 127.0.0.1:40001 ip rr --timeout 3600 --no-reschedule --sorry-uri '/' --statistic 0
71   Bypass Settings:
72     Sorry Server                  none
73     Max Connection                0
74     Sorry Flag                    on
75   SSL Settings:
76     SSL Config File               none
77   Logging Settings:
78     Access Log                    off
79     Access Log File               none
80     Access Log Rotate             --ac-rotate-type size --ac-rotate-max-backup-index 10 --ac-rotate-max-filesize 10M
81   Socket Settings:
82     TCP_DEFER_ACCEPT              disable
83     TCP_NODELAY                   disable
84     TCP_CORK                      disable
85     TCP_QUICKACK                  disable
86   Throughput:
87     Current Upload / Limit        0.000000 Mbps / 0.000000 Mbps
88     Current Download / Limit      0.000000 Mbps / 0.000000 Mbps
89   Statistics:
90     HTTP Total Requests           0
91     HTTP GET Requests             0
92     HTTP POST Requests            0"
93 if [ "${RET}" != "${EXPECT}" ]
94 then
95         echo "Test failed: $L7VSADM -V -n"
96         exit 1
97 fi
98
99 $L7VSADM -E -t 127.0.0.1:40001 -m ip -f 0
100 if [ $? -ne 0 ]
101 then
102         echo "Test failed: $L7VSADM -E -t 127.0.0.1:40001 -m ip -f 0"
103         exit 1
104 fi
105
106 RET=`$L7VSADM -V -n`
107 EXPECT="Layer-7 Virtual Server version 3.0.0
108 L7vsd Log Level:
109 Category                       Level
110 l7vsd_network                  warn
111 l7vsd_network_qos              warn
112 l7vsd_network_bandwidth        warn
113 l7vsd_network_num_connection   warn
114 l7vsd_network_access           warn
115 l7vsd_mainthread               warn
116 l7vsd_virtualservice           warn
117 l7vsd_virtualservice_thread    warn
118 l7vsd_session                  warn
119 l7vsd_session_thread           warn
120 l7vsd_realserver               warn
121 l7vsd_sorryserver              warn
122 l7vsd_module                   warn
123 l7vsd_replication              warn
124 l7vsd_replication_sendthread   warn
125 l7vsd_parameter                warn
126 l7vsd_logger                   warn
127 l7vsd_command                  warn
128 l7vsd_start_stop               warn
129 l7vsd_system                   warn
130 l7vsd_system_memory            warn
131 l7vsd_system_endpoint          warn
132 l7vsd_system_signal            warn
133 l7vsd_system_environment       warn
134 l7vsd_snmpagent                info
135 l7vsd_protocol                 warn
136 l7vsd_schedule                 warn
137
138 Replication Mode:
139 SINGLE
140
141 SNMPAgent:
142 Agent Status                   inactive
143 log trap status                none
144 log trap level                 none
145 cache update interval          none
146 start date                     none
147 last request date              none
148 last trap date                 none
149 total GET requests             none
150 total SET requests             none
151 total trap counts              none
152
153 Prot LocalAddress:Port ProtoMod Scheduler Protomod_opt_string
154   -> RemoteAddress:Port           Forward Weight ActiveConn InactConn
155 TCP 127.0.0.1:40001 ip rr --timeout 3600 --no-reschedule --sorry-uri '/' --statistic 0
156   Bypass Settings:
157     Sorry Server                  none
158     Max Connection                0
159     Sorry Flag                    off
160   SSL Settings:
161     SSL Config File               none
162   Logging Settings:
163     Access Log                    off
164     Access Log File               none
165     Access Log Rotate             --ac-rotate-type size --ac-rotate-max-backup-index 10 --ac-rotate-max-filesize 10M
166   Socket Settings:
167     TCP_DEFER_ACCEPT              disable
168     TCP_NODELAY                   disable
169     TCP_CORK                      disable
170     TCP_QUICKACK                  disable
171   Throughput:
172     Current Upload / Limit        0.000000 Mbps / 0.000000 Mbps
173     Current Download / Limit      0.000000 Mbps / 0.000000 Mbps
174   Statistics:
175     HTTP Total Requests           0
176     HTTP GET Requests             0
177     HTTP POST Requests            0"
178
179 if [ "${RET}" != "${EXPECT}" ]
180 then
181         echo "Test failed: $L7VSADM -V -n"
182         exit 1
183 fi
184
185 exit 0
186