Skip to content

Commit

Permalink
removed irrelevant functions setupAggregateAtomically and clearAggreg…
Browse files Browse the repository at this point in the history
…ate, not used in this test
  • Loading branch information
ram-mac committed Jan 16, 2025
1 parent b819069 commit 201d743
Showing 1 changed file with 0 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -604,38 +604,3 @@ func waitOTGARPEntry(t *testing.T) {

}

func (tc *testCase) setupAggregateAtomically(t *testing.T) {
d := &oc.Root{}

if tc.lagType == lagTypeLACP {
d.GetOrCreateLacp().GetOrCreateInterface(tc.aggID)
}

agg := d.GetOrCreateInterface(tc.aggID)
agg.GetOrCreateAggregation().LagType = tc.lagType
agg.Type = ieee8023adLag

for _, port := range tc.dutPorts[1:] {
i := d.GetOrCreateInterface(port.Name())
i.GetOrCreateEthernet().AggregateId = ygot.String(tc.aggID)
i.Type = ethernetCsmacd

if deviations.InterfaceEnabled(tc.dut) {
i.Enabled = ygot.Bool(true)
}
}

p := gnmi.OC()
fptest.LogQuery(t, fmt.Sprintf("%s to Update()", tc.dut), p.Config(), d)
gnmi.Update(t, tc.dut, p.Config(), d)
}

func (tc *testCase) clearAggregate(t *testing.T) {
// Clear the aggregate minlink.
gnmi.Delete(t, tc.dut, gnmi.OC().Interface(tc.aggID).Aggregation().MinLinks().Config())

// Clear the members of the aggregate.
for _, port := range tc.dutPorts[1:] {
gnmi.Delete(t, tc.dut, gnmi.OC().Interface(port.Name()).Ethernet().AggregateId().Config())
}
}

0 comments on commit 201d743

Please sign in to comment.