Juniper / apstra-go-sdk

Go SDK for Apstra
Apache License 2.0
3 stars 0 forks source link

Introduce detailed error handling when orphaning generic system LAGs #263

Closed chrismarget-j closed 4 months ago

chrismarget-j commented 4 months ago

"Orphaning" a generic system LAG by changing all LAG member "group labels" to a new value produces an error like:

Operation is not permitted because link group XXX has assigned structures (VN endpoints, subinterfaces, endpoint templates etc.). Either at least one link from this group should preserve original group label, or all its links should change group label to the same new value, keeping aggregation (LAG / NO LAG) and without other link being added to it.

This PR ensures that the error returned in this case produces a detail struct (type ErrLagHasAssignedStructuresDetail) which enumerates the problem group labels for handling by the calling application.