-
Notifications
You must be signed in to change notification settings - Fork 15
/
test_data.py
71 lines (65 loc) · 1.5 KB
/
test_data.py
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
#
# Define the file input and expected output for each test case
#
test_interface_name_identification = {
"input": "interface GigabitEthernet1/0/1",
"output": """---
interfaces:
- name: GigabitEthernet1/0/1\n"""
}
test_interface_cdp_status = {
"input":
"""interface GigabitEthernet1/0/1
no cdp enable""",
"output":
"""---
interfaces:
- cdp_disable: true
name: GigabitEthernet1/0/1\n"""
}
test_interface_switchport_access_vlan = {
"input": """interface GigabitEthernet1/0/1
switchport access vlan 4""",
"output": """---
interfaces:
- name: GigabitEthernet1/0/1
switchport:
access_vlan: '4'\n"""
}
test_interface_switchport_mode = {
"input": """interface GigabitEthernet1/0/1
switchport mode access""",
"output": """---
interfaces:
- name: GigabitEthernet1/0/1
switchport:
mode: access\n"""
}
test_interface_switchport_port_security = {
"input": """interface GigabitEthernet1/0/1
switchport port-security""",
"output": """---
interfaces:
- name: GigabitEthernet1/0/1
switchport:
port_security: true\n"""
}
test_interface_power_inline_police = {
"input": """interface GigabitEthernet1/0/1
power inline police""",
"output": """---
interfaces:
- name: GigabitEthernet1/0/1
power_inline_police: true\n"""
}
test_interface_spanning_tree = {
"input": """interface GigabitEthernet1/0/1
spanning-tree portfast
spanning-tree guard root""",
"output": """---
interfaces:
- name: GigabitEthernet1/0/1
spanning_tree:
guard_root: true
portfast: true\n"""
}