Upload the contribution of vstf as bottleneck network framework.
[bottlenecks.git] / vstf / vstf / common / check.py
1 #!/usr/bin/python
2 # -*- coding: utf8 -*-
3 # author: wly
4 # date: 2015-11-5
5 # see license for license details
6
7 import logging
8 import vstf.common.constants as cst
9
10 LOG = logging.getLogger(__name__)
11
12
13 def check_case_params(protocol, typ, tool):
14     if "throughput" == typ:
15         return False, "Not support 'throughput' at this version"
16     if "tcp" == protocol:
17         if tool in ["pktgen", "netmap"]:
18             return False, "%s cant support tcp test" % tool
19     if "qperf" == tool and "latency" != typ:
20         return False, "qperf support latency test only, cant support %s" % typ
21     if "latency" == typ and tool not in ["netperf", "qperf"]:
22         return False, "%s cant support latency test" % tool
23     return True, "support successfully"