-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_compare_interfaces.yml
executable file
·32 lines (31 loc) · 1.54 KB
/
test_compare_interfaces.yml
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
#################################################################
# Compare inteface state
#
#################################################################
tests_include:
- compare_interface_state
- compare_logical_interface_state
compare_interface_state:
- command: show interface terse
- iterate:
xpath: //physical-interface
id: name
tests:
- no-diff: ./admin-status
info: "PASSED! {{id_0[0]}} admin status pre: {{pre['admin-status']}} post: {{post['admin-status']}}"
err: "FAILED! {{id_0[0]}} admin status neighbor pre: {{pre['admin-status']}} post: {{post['admin-status']}}"
- no-diff: ./oper-status
info: "PASSED! {{id_0[0]}} oper status pre: {{pre['oper-status']}} post: {{post['oper-status']}}"
err: "FAILED! {{id_0[0]}} oper status neighbor pre: {{pre['oper-status']}} post: {{post['oper-status']}}"
compare_logical_interface_state:
- command: show interface terse
- iterate:
xpath: //logical-interface
id: name
tests:
- no-diff: ./admin-status
info: "PASSED! {{id_0[0]}} admin status pre: {{pre['admin-status']}} post: {{post['admin-status']}}"
err: "FAILED! {{id_0[0]}} admin status neighbor pre: {{pre['admin-status']}} post: {{post['admin-status']}}"
- no-diff: ./oper-status
info: "PASSED! {{id_0[0]}} oper status pre: {{pre['oper-status']}} post: {{post['oper-status']}}"
err: "FAILED! {{id_0[0]}} oper status neighbor pre: {{pre['oper-status']}} post: {{post['oper-status']}}"