summaryrefslogtreecommitdiffstats
path: root/testsuites/vstf/vstf_scripts/vstf/common/constants.py
blob: e054043e0dc64e720c68b12b999e9042020df404 (plain)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
##############################################################################
# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

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"]
PROVIDERS = ["rdp", "fastlink", "l2switch", None]
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_FORMAT2 = "%Y/%m/%d %H:%M:%S"
TIME_FORMAT3 = "%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}
}