aboutsummaryrefslogtreecommitdiffstats
path: root/app/test/fetch/cli_fetch/test_data/cli_fetch_host_pnics.py
blob: bb369d14677fdef9bfd106d4b2867a6ce2374bd8 (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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
###############################################################################
# Copyright (c) 2017 Koren Lev (Cisco Systems), Yaron Yogev (Cisco Systems)   #
# 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                                  #
###############################################################################
PNICS_FOLDER_ID = "node-6.cisco.com-pnics"
HOST_ID = "node-6.cisco.com"

NETWORK_NODE = {
    "host_type": [
        "Controller",
        "Network"
    ],
    "id": "node-6.cisco.com"
}

WRONG_NODE = {
    "host_type": [
            "Controller"
        ]
}

INTERFACE_LINES = [
    "lrwxrwxrwx 1 root 0 Jul  5 17:17 eno16777728 -> ../../devices/0000:02:00.0/net/eno16777728",
    "lrwxrwxrwx 1 root 0 Jul  5 17:17 eno33554952 -> ../../devices/0000:02:01.0/net/eno33554952"
]

INTERFACE_NAMES = ["eno16777728", "eno33554952"]

INTERFACE_NAME = INTERFACE_NAMES[0]
IFCONFIG_CM_RESULT = [
    "eno16777728 Link encap:Ethernet  HWaddr 00:50:56:ac:e8:97  ",
    "          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1",
    "          RX packets:409056348 errors:0 dropped:0 overruns:0 frame:0",
    "          TX packets:293898173 errors:0 dropped:0 overruns:0 carrier:0",
    "          collisions:0 txqueuelen:1000 ",
    "          RX bytes:103719003730 (103.7 GB)  TX bytes:165090993470 (165.0 GB)",
    ""
]

INTERFACE_DETAILS = {
    "host": "node-6.cisco.com",
    "id": "eno16777728-unknown_mac",
    "lines": [],
    "local_name": "eno16777728",
    "name": "eno16777728",
    "state": "UP"
}

MAC_ADDRESS_LINE = "    link/ether 00:50:56:ac:e8:97 brd ff:ff:ff:ff:ff:ff"
MAC_ADDRESS = "00:50:56:ac:e8:97"
RAW_INTERFACE = {
    "host": "node-6.cisco.com",
    "lines": [],
    "local_name": "eno16777728",
    "name": "eno16777728"
}

INTERFACE_AFTER_LINE_HANDLE = {
    "host": "node-6.cisco.com",
    "lines": [MAC_ADDRESS_LINE.strip()],
    "local_name": "eno16777728",
    "name": "eno16777728",
    "id": "eno16777728-" + MAC_ADDRESS,
    "mac_address": MAC_ADDRESS
}

INTERFACE_FOR_SET = {
    "host": "node-6.cisco.com",
    "lines": [
        "Link encap:Ethernet  HWaddr 00:50:56:ac:e8:97",
        "UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1"
    ],
    "local_name": "eno16777728",
    "mac_address": "00:50:56:ac:e8:97"
}

INTERFACE_AFTER_SET = {
    "host": "node-6.cisco.com",
    "data": "Link encap:Ethernet  HWaddr 00:50:56:ac:e8:97" +
            "\nUP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1",
    "local_name": "eno16777728",
    "mac_address": "00:50:56:ac:e8:97",
    "Supported ports": "[ TP ]",
    "Supported link modes": ["10baseT/Half 10baseT/Full",
                             "100baseT/Half 100baseT/Full",
                             "1000baseT/Full"],
    "Supported pause frame use": "No"
}

INTERFACE = {
        "Advertised auto-negotiation": "Yes",
        "Advertised link modes": [
            "10baseT/Half 10baseT/Full",
            "100baseT/Half 100baseT/Full",
            "1000baseT/Full"
        ],
        "Advertised pause frame use": "No",
        "Auto-negotiation": "on",
        "Current message level": [
            "0x00000007 (7)",
            "drv probe link"
        ],
        "Duplex": "Full",
        "Link detected": "yes",
        "MDI-X": "off (auto)",
        "PHYAD": "0",
        "Port": "Twisted Pair",
        "Speed": "1000Mb/s",
        "Supported link modes": [
            "10baseT/Half 10baseT/Full",
            "100baseT/Half 100baseT/Full",
            "1000baseT/Full"
        ],
        "Supported pause frame use": "No",
        "Supported ports": "[ TP ]",
        "Supports Wake-on": "d",
        "Supports auto-negotiation": "Yes",
        "Transceiver": "internal",
        "Wake-on": "d",
        "data": "Link encap:Ethernet  HWaddr 00:50:56:ac:e8:97\nUP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1\nRX packets:408989052 errors:0 dropped:0 overruns:0 frame:0\nTX packets:293849880 errors:0 dropped:0 overruns:0 carrier:0\ncollisions:0 txqueuelen:1000\nRX bytes:103702814216 (103.7 GB)  TX bytes:165063440009 (165.0 GB)\n",
        "host": "node-6.cisco.com",
        "id": "eno16777728-00:50:56:ac:e8:97",
        "local_name": "eno16777728",
        "mac_address": "00:50:56:ac:e8:97",
        "name": "eno16777728"
}

INTERFACES_GET_RESULTS = [INTERFACE]

IPV6_ADDRESS_LINE = "    inet6 fe80::f816:3eff:fea1:eb73/64 " \
                    "scope global mngtmpaddr dynamic"
IPV6_ADDRESS = "fe80::f816:3eff:fea1:eb73/64"
IPV4_ADDRESS_LINE = "    inet 172.16.13.2/24 brd 10.56.20.255 scope global eth0"
IPV4_ADDRESS = "172.16.13.2"

ETHTOOL_RESULT = [
    "Settings for eno16777728:",
    "\tSupported ports: [ TP ]",
    "\tSupported link modes:   10baseT/Half 10baseT/Full ",
    "\t                        100baseT/Half 100baseT/Full ",
    "\t                        1000baseT/Full ",
    "\tSupported pause frame use: No",
]