Merge "Change PTL informatin in INFO"
[bottlenecks.git] / testsuites / vstf / vstf_scripts / vstf / common / check.py
1 ##############################################################################
2 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9
10 import logging
11 import vstf.common.constants as cst
12
13 LOG = logging.getLogger(__name__)
14
15
16 def check_case_params(protocol, typ, tool):
17     if "throughput" == typ:
18         return False, "Not support 'throughput' at this version"
19     if "tcp" == protocol:
20         if tool in ["pktgen", "netmap"]:
21             return False, "%s cant support tcp test" % tool
22     if "qperf" == tool and "latency" != typ:
23         return False, "qperf support latency test only, cant support %s" % typ
24     if "latency" == typ and tool not in ["netperf", "qperf"]:
25         return False, "%s cant support latency test" % tool
26     return True, "support successfully"