Skip to content

Commit

Permalink
fixed string to convert to int32 as string is not supported anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
ram-mac committed Feb 4, 2025
1 parent bc09c83 commit fb9a735
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@ func configureASLocalPrefMEDPolicy(t *testing.T, dut *ondatra.DUTDevice, policyT
t.Fatalf("BgpSetMedV7Unsupported deviation needs cli configuration for vendor %s which is not defined", dut.Vendor())
}
} else {
actions.GetOrCreateBgpActions().SetMed = oc.UnionInt32(policyValue)
metric, _ := strconv.Atoi(policyValue)
actions.GetOrCreateBgpActions().SetMed = oc.UnionInt32(uint32(metric))
actions.GetOrCreateBgpActions().SetMedAction = oc.BgpPolicy_BgpSetMedAction_SET
actions.PolicyResult = oc.RoutingPolicy_PolicyResultType_ACCEPT_ROUTE
}
Expand Down

0 comments on commit fb9a735

Please sign in to comment.