summaryrefslogtreecommitdiffstats
path: root/vstf/vstf/common/constants.py
diff options
context:
space:
mode:
authorYiting.Li <liyiting@huawei.com>2015-12-22 17:11:12 -0800
committerYiting.Li <liyiting@huawei.com>2015-12-22 17:11:12 -0800
commit8f1101df131a4d3e03b377738507d88b745831c0 (patch)
tree73f140474fcec2a77c85a453f6946957ca0742d1 /vstf/vstf/common/constants.py
parent1a24ebbda3f95600c0e7d5ed8661317a8ff7e265 (diff)
Upload the contribution of vstf as bottleneck network framework.
End to End Performance test JIRA:BOTTLENECK-29 Change-Id: Ib2c553c8b60d6cda9e7a7b52b737c9139f706ebd Signed-off-by: Yiting.Li <liyiting@huawei.com>
Diffstat (limited to 'vstf/vstf/common/constants.py')
-rwxr-xr-xvstf/vstf/common/constants.py66
1 files changed, 66 insertions, 0 deletions
diff --git a/vstf/vstf/common/constants.py b/vstf/vstf/common/constants.py
new file mode 100755
index 00000000..1cace390
--- /dev/null
+++ b/vstf/vstf/common/constants.py
@@ -0,0 +1,66 @@
+slave_project_path = "/opt/esp-atf"
+VSTFCPATH = "/opt/vstf"
+sockaddr = VSTFCPATH + "/vstf.socket"
+vstf_pid = VSTFCPATH + "/vstf-server.pid"
+buff_size = 1024
+
+# the message's len must be < 9999999999
+MSG_FLAG_LEN = 10
+MSG_FLAG = "%010d"
+
+# all command run timeout
+TIMEOUT = 20
+# timmer SECOND
+TICK = 3
+
+HW_INFO = "HW_INFO"
+CPU_INFO = "CPU INFO"
+MEMORY_INFO = "MEMORY INFO"
+OS_INFO = "OS INFO"
+
+TOOLS = ["pktgen", "netperf", "qperf", "netmap"]
+OPERATIONS = ["start", "stop", "restart"]
+ACTIONS = ["send", "receive"]
+PROTOCOLS = ["tcp_lat", "udp_lat", "tcp_bw", "udp_bw"]
+TPROTOCOLS = ["tcp", "udp"]
+PROFILES = ["rdp", "fastlink", "l2switch"]
+TTYPES = ["throughput", "latency", "frameloss"]
+SCENARIOS = ["Ti", "Tn", "Tnv", "Tu"]
+SOCKET_BUF = 102400
+WAIT_BALANCE = 2
+CPU_USAGE_ROUND = 2
+PKTLOSS_ROUND = 2
+RATEP_ROUND = 3
+TIME_ROUND = 3
+TIME_FORMAT = "%Y-%m-%d %H:%M:%S"
+TIME_STR = "%Y%m%d_%H%M%S"
+REPORT_DEFAULTS = "/tmp"
+
+CASE_ACTOR_MAP = {
+ # unidirection
+ "Tn-1": {"senders": [0], "receivers": [-1], "flows": 1},
+ "Tn-2": {"senders": [0, -1], "receivers": [-1, 0], "flows": 2},
+ # unidirection with vxlan
+ "Tn-3": {"senders": [0], "receivers": [-1], "flows": 1},
+ "Tn-4": {"senders": [0, -1], "receivers": [-1, 0], "flows": 2},
+ # unidirection
+ "Tnv-1": {"senders": [0], "receivers": [-1], "flows": 1},
+ "Tnv-2": {"senders": [0, -1], "receivers": [-1, 0], "flows": 2},
+ # unidirection with vxlan
+ "Tnv-3": {"senders": [0], "receivers": [-1], "flows": 1},
+ "Tnv-4": {"senders": [0, -1], "receivers": [-1, 0], "flows": 2},
+
+ "Ti-1": {"senders": [0], "receivers": [-1], "flows": 1},
+ "Ti-2": {"senders": [-1], "receivers": [0], "flows": 1},
+ "Ti-3": {"senders": [0, -1], "receivers": [-1, 0], "flows": 2},
+ "Ti-4": {"senders": [0], "receivers": [-1], "flows": 1},
+ "Ti-5": {"senders": [-1], "receivers": [0], "flows": 1},
+ "Ti-6": {"senders": [0, -1], "receivers": [-1, 0], "flows": 2},
+
+ "Tu-1": {"senders": [0], "receivers": [-1], "flows": 1},
+ "Tu-2": {"senders": [-1], "receivers": [0], "flows": 1},
+ "Tu-3": {"senders": [0, -1], "receivers": [-1, 0], "flows": 2},
+ "Tu-4": {"senders": [0], "receivers": [-1], "flows": 1},
+ "Tu-5": {"senders": [-1], "receivers": [0], "flows": 1},
+ "Tu-6": {"senders": [0, -1], "receivers": [-1, 0], "flows": 2}
+}