From 3bff7e8e9ef8d6b91cb2d7496806a7bb23792481 Mon Sep 17 00:00:00 2001 From: akinross Date: Mon, 13 Jan 2025 14:18:01 +0100 Subject: [PATCH] [minor_change] Add support for endpoint move detection mode in schema_template_bd --- models/schema_template_bd.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/models/schema_template_bd.go b/models/schema_template_bd.go index 737a5b6..a1d45cd 100644 --- a/models/schema_template_bd.go +++ b/models/schema_template_bd.go @@ -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, @@ -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") }