-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from jefvantongerloo/ale_aos8_show_interfaces
Ale aos8 show interfaces
- Loading branch information
Showing
10 changed files
with
238 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"python.testing.pytestArgs": [ | ||
"--ignore=dev" | ||
], | ||
"python.testing.unittestEnabled": false, | ||
"python.testing.pytestEnabled": true, | ||
"python.testing.pytestPath": "/home/p064033/projects/forks/textfsm-aos/.venv/bin/pytest" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
pytest | ||
pyyaml | ||
scrapli | ||
scrapli[community] | ||
scrapli[ssh2] | ||
textfsm | ||
tox-travis |
58 changes: 58 additions & 0 deletions
58
tests/ale_aos8_show_interfaces/ale_aos8_show_interfaces.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
Chassis/Slot/Port : 1/1/1 | ||
Operational Status : up, | ||
Port-Down/Violation Reason: None, | ||
Last Time Link Changed : Sat Mar 19 16:23:13 2022, | ||
Number of Status Change : 31, | ||
Type : Ethernet, | ||
SFP/XFP : N/A, | ||
Interface Type : Copper, | ||
EPP : Disabled, | ||
Link-Quality : N/A, | ||
MAC address : 94:24:e1:56:cd:ba, | ||
BandWidth (Megabits) : 1000, Duplex : Full, | ||
Autonegotiation : 1 [ 1000-F 100-F 100-H 10-F 10-H ], | ||
Long Frame Size(Bytes) : 9216, | ||
Inter Frame Gap(Bytes) : 12, | ||
loopback mode : N/A, | ||
Rx : | ||
Bytes Received : 59594072906, Unicast Frames : 185795516, | ||
Broadcast Frames: 681, M-cast Frames : 550006, | ||
UnderSize Frames: 0, OverSize Frames: 0, | ||
Lost Frames : 0, Error Frames : 0, | ||
CRC Error Frames: 0, Alignments Err : 0, | ||
Tx : | ||
Bytes Xmitted : 306228410627, Unicast Frames : 262707153, | ||
Broadcast Frames: 11045175, M-cast Frames : 6102302, | ||
UnderSize Frames: 0, OverSize Frames: 0, | ||
Lost Frames : 0, Collided Frames: 0, | ||
Error Frames : 0, Collisions : 0, | ||
Late collisions : 0, Exc-Collisions : 0 | ||
Chassis/Slot/Port : 1/1/2 | ||
Operational Status : up, | ||
Port-Down/Violation Reason: None, | ||
Last Time Link Changed : Fri May 13 18:22:39 2022, | ||
Number of Status Change : 146, | ||
Type : Ethernet, | ||
SFP/XFP : N/A, | ||
Interface Type : Copper, | ||
EPP : Disabled, | ||
Link-Quality : N/A, | ||
MAC address : 94:24:e1:56:cd:bb, | ||
BandWidth (Megabits) : 100, Duplex : Full, | ||
Autonegotiation : 1 [ 1000-F 100-F 100-H 10-F 10-H ], | ||
Long Frame Size(Bytes) : 1552, | ||
Inter Frame Gap(Bytes) : 12, | ||
loopback mode : N/A, | ||
Rx : | ||
Bytes Received : 204986659, Unicast Frames : 1943330, | ||
Broadcast Frames: 151600, M-cast Frames : 0, | ||
UnderSize Frames: 0, OverSize Frames: 0, | ||
Lost Frames : 0, Error Frames : 5, | ||
CRC Error Frames: 0, Alignments Err : 0, | ||
Tx : | ||
Bytes Xmitted : 4738744836, Unicast Frames : 7071910, | ||
Broadcast Frames: 11042646, M-cast Frames : 6102320, | ||
UnderSize Frames: 0, OverSize Frames: 0, | ||
Lost Frames : 0, Collided Frames: 0, | ||
Error Frames : 0, Collisions : 0, | ||
Late collisions : 0, Exc-Collisions : 0 |
79 changes: 79 additions & 0 deletions
79
tests/ale_aos8_show_interfaces/ale_aos8_show_interfaces.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
--- | ||
- chassis_slot_port: '1/1/1' | ||
operation_status: 'up' | ||
port_down_violation_reason: 'None' | ||
last_time_link_changed: 'Sat Mar 19 16:23:13 2022' | ||
number_of_status_change: '31' | ||
type: 'Ethernet' | ||
sfp_xfp: 'N/A' | ||
interface_type: 'Copper' | ||
epp: 'Disabled' | ||
link_quality: 'N/A' | ||
mac_address: '94:24:e1:56:cd:ba' | ||
bandwidth: '1000' | ||
duplex: 'Full' | ||
autonegotiation: '1 [ 1000-F 100-F 100-H 10-F 10-H ]' | ||
long_frame_size: '9216' | ||
inter_frame_gap: '12' | ||
loopback_mode: 'N/A' | ||
bytes_received: '59594072906' | ||
rx_unicast_frames: '185795516' | ||
rx_broadcast_frames: '681' | ||
rx_mcast_frames: '550006' | ||
rx_undersize_frames: '0' | ||
rx_oversize_frames: '0' | ||
rx_lost_frames: '0' | ||
rx_error_frames: '0' | ||
rx_crc_error_frames: '0' | ||
rx_alignments_err: '0' | ||
bytes_xmitted: '306228410627' | ||
tx_unicast_frames: '262707153' | ||
tx_broadcast_frames: '11045175' | ||
tx_mcast_frames: '6102302' | ||
tx_undersize_frames: '0' | ||
tx_oversize_frames: '0' | ||
tx_lost_frames: '0' | ||
tx_collided_frames: '0' | ||
tx_error_frames: '0' | ||
collisions: '0' | ||
late_collisions: '0' | ||
exc_collisions: '0' | ||
- chassis_slot_port: '1/1/2' | ||
operation_status: 'up' | ||
port_down_violation_reason: 'None' | ||
last_time_link_changed: 'Fri May 13 18:22:39 2022' | ||
number_of_status_change: '146' | ||
type: 'Ethernet' | ||
sfp_xfp: 'N/A' | ||
interface_type: 'Copper' | ||
epp: 'Disabled' | ||
link_quality: 'N/A' | ||
mac_address: '94:24:e1:56:cd:bb' | ||
bandwidth: '100' | ||
duplex: 'Full' | ||
autonegotiation: '1 [ 1000-F 100-F 100-H 10-F 10-H ]' | ||
long_frame_size: '1552' | ||
inter_frame_gap: '12' | ||
loopback_mode: 'N/A' | ||
bytes_received: '204986659' | ||
rx_unicast_frames: '1943330' | ||
rx_broadcast_frames: '151600' | ||
rx_mcast_frames: '0' | ||
rx_undersize_frames: '0' | ||
rx_oversize_frames: '0' | ||
rx_lost_frames: '0' | ||
rx_error_frames: '5' | ||
rx_crc_error_frames: '0' | ||
rx_alignments_err: '0' | ||
bytes_xmitted: '4738744836' | ||
tx_unicast_frames: '7071910' | ||
tx_broadcast_frames: '11042646' | ||
tx_mcast_frames: '6102320' | ||
tx_undersize_frames: '0' | ||
tx_oversize_frames: '0' | ||
tx_lost_frames: '0' | ||
tx_collided_frames: '0' | ||
tx_error_frames: '0' | ||
collisions: '0' | ||
late_collisions: '0' | ||
exc_collisions: '0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
Value Key,Required chassis_slot_port (\d\/\d+\/\d+[\w]*) | ||
Value operation_status (up|down|dormant) | ||
Value port_down_violation_reason (.+\s*) | ||
Value last_time_link_changed (.+\s*) | ||
Value number_of_status_change (\d+) | ||
Value type (Ethernet|Fast Ethernet|Gigabit Ethernet) | ||
Value sfp_xfp (.+\s*) | ||
Value interface_type (Copper|Fiber|Combo-copper|Combo-Fiber) | ||
Value epp (Enabled|Disabled) | ||
Value link_quality (GOOD|FAIR|POOR|N/A) | ||
Value mac_address (([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]){2}) | ||
Value bandwidth (\d+|-) | ||
Value duplex (Half|Full|Auto|-) | ||
Value autonegotiation (.+\s*) | ||
Value long_frame_size (\d+) | ||
Value inter_frame_gap (\d+) | ||
Value loopback_mode (N/A|SPB-VPN) | ||
Value bytes_received (\d+) | ||
Value rx_unicast_frames (\d+) | ||
Value rx_broadcast_frames (\d+) | ||
Value rx_mcast_frames (\d+) | ||
Value rx_undersize_frames (\d+) | ||
Value rx_oversize_frames (\d+) | ||
Value rx_lost_frames (\d+) | ||
Value rx_error_frames (\d+) | ||
Value rx_crc_error_frames (\d+) | ||
Value rx_alignments_err (\d+) | ||
Value bytes_xmitted (\d+) | ||
Value tx_unicast_frames (\d+) | ||
Value tx_broadcast_frames (\d+) | ||
Value tx_mcast_frames (\d+) | ||
Value tx_undersize_frames (\d+) | ||
Value tx_oversize_frames (\d+) | ||
Value tx_lost_frames (\d+) | ||
Value tx_collided_frames (\d+) | ||
Value tx_error_frames (\d+) | ||
Value collisions (\d+) | ||
Value late_collisions (\d+) | ||
Value exc_collisions (\d+) | ||
|
||
Start | ||
^Chassis\/Slot\/Port\s+:\s${chassis_slot_port}\s+$$ | ||
^\sOperational Status\s+:\s${operation_status},$$ | ||
^\sPort-Down\/Violation Reason:\s${port_down_violation_reason},$$ | ||
^\sLast Time Link Changed\s+:\s${last_time_link_changed},$$ | ||
^\sNumber of Status Change\s+:\s${number_of_status_change},$$ | ||
^\sType\s+:\s${type},$$ | ||
^\sSFP/XFP\s+:\s${sfp_xfp},$$ | ||
^\sInterface Type\s+:\s${interface_type},$$ | ||
^\sEPP\s+:\s${epp},$$ | ||
^\sLink-Quality\s+:\s${link_quality},$$ | ||
^\sMAC address\s+:\s${mac_address},$$ | ||
^\sBandWidth \(Megabits\)\s+:\s+${bandwidth}\s*,\s+Duplex\s+:\s${duplex}\s*,$$ | ||
^\sAutonegotiation\s+:\s+${autonegotiation},$$ | ||
^\sLong Frame Size\(Bytes\)\s+:\s${long_frame_size},$$ | ||
^\sInter Frame Gap\(Bytes\)\s+:\s${inter_frame_gap},$$ | ||
^\sloopback mode\s+:\s${loopback_mode},$$ -> Rx | ||
|
||
Rx | ||
^\sRx\s+:$$ | ||
^\sBytes Received\s*:\s+${bytes_received}, Unicast Frames\s*:\s+${rx_unicast_frames},$$ | ||
^\sBroadcast Frames\s*:\s+${rx_broadcast_frames}, M-cast Frames\s*:\s+${rx_mcast_frames},$$ | ||
^\sUnderSize Frames\s*:\s+${rx_undersize_frames}, OverSize Frames\s*:\s+${rx_oversize_frames},$$ | ||
^\sLost Frames\s*:\s+${rx_lost_frames}, Error Frames\s*:\s+${rx_error_frames},$$ | ||
^\sCRC Error Frames\s*:\s+${rx_crc_error_frames}, Alignments Err\s*:\s+${rx_alignments_err},$$ -> Tx | ||
|
||
Tx | ||
^\sTx\s+:$$ | ||
^\sBytes Xmitted\s*:\s+${bytes_xmitted},\s*Unicast Frames\s*:\s+${tx_unicast_frames},$$ | ||
^\sBroadcast Frames\s*:\s+${tx_broadcast_frames}, M-cast Frames\s*:\s+${tx_mcast_frames},$$ | ||
^\sUnderSize Frames\s*:\s+${tx_undersize_frames}, OverSize Frames\s*:\s+${tx_oversize_frames},$$ | ||
^\sLost Frames\s*:\s+${tx_lost_frames},\s*Collided Frames\s*:\s+${tx_collided_frames},$$ | ||
^\sError Frames\s*:\s+${tx_error_frames},\s*Collisions\s*:\s+${collisions},$$ | ||
^\sLate collisions\s*:\s+${late_collisions},\s*Exc-Collisions\s*:\s+${exc_collisions}$$ -> Record Start | ||
^. -> Error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters