aristanetworks / anta

What do you call an ant with frogs legs?
https://anta.arista.com/
Apache License 2.0
46 stars 24 forks source link

Add test case to verify Link Aggregation Control Protocol (LACP) functionality #762

Open vitthalmagadum opened 1 month ago

vitthalmagadum commented 1 month ago

Verify LACP functionality using show lacp interface <MLAG interface>.

Pass/Fail Criteria

  1. Interface should be bundled in given port channel.
  2. Aggregated link state should be active, LongTimeout( Indicates a longer interval for LACPDU transmission), Aggregable, InSync (Indicates actively participating in both transmit and receive operations), Collecting and Distributing(Indicates the interface is functioning correctly in aggregation group. i.e capable of receiving and sending the traffic.)

Sample Output

State: A = Active, P = Passive; S=ShortTimeout, L=LongTimeout; G = Aggregable, I = Individual; s+=InSync, s-=OutOfSync; C = Collecting, X = state machine expired, D = Distributing, d = default neighbor state

Port Status Sys-id Port# State OperKey PortPri Port# State OperKey PortPriority TimeoutMultiplier

Port Channel Port-Channel$MLAG_PO: Et4 Bundled | 8000,c4-ca-2a-b1-b9-f3 221 ALGs+CD 0x0064 32768 221 ALGs+CD 0x0064 32768

gmuloc commented 1 month ago

please use json outputs

gmuloc commented 1 month ago

also check if this is not partly redundant with: https://anta.arista.com/stable/api/tests.interfaces/#anta.tests.interfaces.VerifyPortChannels

vitthalmagadum commented 1 month ago

@gmuloc Thanks for the review.

Sure. I'll use json output for verification. Here I have added test output as for sample output only. Also VerifyPortChannels test case, verifies there are no inactive ports in all port channels. However this test case verifies the correct operation and configuration of LACP on the specified interfaces. It ensures that the interfaces are properly aggregated in to Link Aggregation group and checks the synchronization, collecting and distributing statuses.

Thanks!!