Open chrismarget-j opened 8 months ago
Each of the max_*_routes elements in the FabricSettings{} struct has 2 possible states:
max_*_routes
FabricSettings{}
null
omitempty
There's no way for a caller to indicate whether they intend to clear the current value.
One possible option:
*uint32
*int64
-1
MarshalJson
This approach is complicated by the need to support Apstra 4.2.1, 4.2.0 and 4.1.x, which each handle this data a bit differently.
Each of the
max_*_routes
elements in theFabricSettings{}
struct has 2 possible states:null
to to clear the current value (theomitempty
struct tag is not configured)There's no way for a caller to indicate whether they intend to clear the current value.
One possible option:
*uint32
to*int64
-1
(affirm clearing the value)MarshalJson
method which determines whether the values will be sent based on the-1
This approach is complicated by the need to support Apstra 4.2.1, 4.2.0 and 4.1.x, which each handle this data a bit differently.