Skip to content

Commit

Permalink
[minor_change] Add support for endpoint move detection mode in schema…
Browse files Browse the repository at this point in the history
…_template_bd
  • Loading branch information
akinross authored and lhercot committed Jan 13, 2025
1 parent f8a751e commit 3bff7e8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion models/schema_template_bd.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type TemplateBD struct {
Value map[string]interface{} `json:",omitempty"`
}

func NewTemplateBD(ops, path, name, displayName, layer2Unicast, unkMcastAct, multiDstPktAct, v6unkMcastAct, vmac, description string, intersiteBumTrafficAllow, optimizeWanBandwidth, l2Stretch, l3MCast, arpFlood, unicastRouting bool, vrfRef, dhcpLabel map[string]interface{}, dhcpLabels []interface{}) *PatchPayload {
func NewTemplateBD(ops, path, name, displayName, layer2Unicast, unkMcastAct, multiDstPktAct, v6unkMcastAct, vmac, epMoveDetectMode, description string, intersiteBumTrafficAllow, optimizeWanBandwidth, l2Stretch, l3MCast, arpFlood, unicastRouting bool, vrfRef, dhcpLabel map[string]interface{}, dhcpLabels []interface{}) *PatchPayload {
var bdMap map[string]interface{}
bdMap = map[string]interface{}{
"name": name,
Expand Down Expand Up @@ -57,6 +57,10 @@ func NewTemplateBD(ops, path, name, displayName, layer2Unicast, unkMcastAct, mul
delete(bdMap, "vmac")
}

if epMoveDetectMode != "" {
bdMap["epMoveDetectMode"] = epMoveDetectMode
}

if len(dhcpLabel) == 0 {
delete(bdMap, "dhcpLabel")
}
Expand Down

0 comments on commit 3bff7e8

Please sign in to comment.