Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions api/core/v1alpha1/evpninstance_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ type EVPNInstanceSpec struct {
// +optional
// +kubebuilder:validation:XValidation:rule="self.name == oldSelf.name",message="VRFRef is immutable"
VRFRef *LocalObjectReference `json:"vrfRef,omitempty"`

// SuppressARP overrides the NVE-level ARP suppression setting for this VNI.
// When unset, the NVE-level SuppressARP setting takes precedence.
// +optional
SuppressARP *bool `json:"suppressARP,omitempty"`
}

// EVPNInstanceType defines the type of EVPN instance.
Expand Down
5 changes: 5 additions & 0 deletions api/core/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/api-reference/index.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions internal/provider/cisco/nxos/nve.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ type VNI struct {
AssociateVrfFlag bool `json:"associateVrfFlag"`
McastGroup Option[string] `json:"mcastGroup"`
Vni int32 `json:"vni"`
SuppressARP Option[bool] `json:"suppressARP"`
}

func (*VNI) IsListItem() {}
Expand Down
14 changes: 14 additions & 0 deletions internal/provider/cisco/nxos/nve_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,20 @@ func init() {
McastGroup: NewOption("239.1.1.100"),
}
Register("vni", vni)

suppressARPTrue := true
vniSuppressARPTrue := &VNI{
Vni: 100011,
SuppressARP: Option[bool]{Value: &suppressARPTrue},
}
Register("vni_suppress_arp_true", vniSuppressARPTrue)

suppressARPFalse := false
vniSuppressARPFalse := &VNI{
Vni: 100012,
SuppressARP: Option[bool]{Value: &suppressARPFalse},
}
Register("vni_suppress_arp_false", vniSuppressARPFalse)
nveInfraVLANs := &NVEInfraVLANs{
InfraVLANList: []*NVEInfraVLAN{
{ID: 4052},
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/cisco/nxos/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (o Option[T]) MarshalJSON() ([]byte, error) {
}

func (o *Option[T]) UnmarshalJSON(b []byte) error {
if len(b) == 0 || string(b) == `null` {
if len(b) == 0 || string(b) == `null` || string(b) == `"DME_UNSET_PROPERTY_MARKER"` {
o.Value = nil
return nil
}
Expand Down
4 changes: 4 additions & 0 deletions internal/provider/cisco/nxos/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -1117,6 +1117,10 @@ func (p *Provider) EnsureEVPNInstance(ctx context.Context, req *provider.EVPNIns
if req.EVPNInstance.Spec.MulticastGroupAddress != "" {
vni.McastGroup = NewOption(req.EVPNInstance.Spec.MulticastGroupAddress)
}
if req.EVPNInstance.Spec.SuppressARP != nil {
v := *req.EVPNInstance.Spec.SuppressARP
vni.SuppressARP = Option[bool]{Value: &v}
}
sb.Update(vni)

switch req.EVPNInstance.Spec.Type {
Expand Down
3 changes: 2 additions & 1 deletion internal/provider/cisco/nxos/testdata/vni.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
{
"associateVrfFlag": false,
"mcastGroup": "239.1.1.100",
"vni": 100010
"vni": 100010,
"suppressARP": "DME_UNSET_PROPERTY_MARKER"
}
]
}
Expand Down
23 changes: 23 additions & 0 deletions internal/provider/cisco/nxos/testdata/vni_suppress_arp_false.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"eps-items": {
"epId-items": {
"Ep-list": [
{
"epId": "1",
"nws-items": {
"vni-items": {
"Nw-list": [
{
"associateVrfFlag": false,
"mcastGroup": "DME_UNSET_PROPERTY_MARKER",
"vni": 100012,
"suppressARP": false
}
]
}
}
}
]
}
}
}
23 changes: 23 additions & 0 deletions internal/provider/cisco/nxos/testdata/vni_suppress_arp_true.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"eps-items": {
"epId-items": {
"Ep-list": [
{
"epId": "1",
"nws-items": {
"vni-items": {
"Nw-list": [
{
"associateVrfFlag": false,
"mcastGroup": "DME_UNSET_PROPERTY_MARKER",
"vni": 100011,
"suppressARP": true
}
]
}
}
}
]
}
}
}
3 changes: 2 additions & 1 deletion test/gnmi/testdata/cisco-nxos-gnmi/evpninstance.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ spec:
{
"associateVrfFlag": false,
"mcastGroup": "DME_UNSET_PROPERTY_MARKER",
"vni": 10100
"vni": 10100,
"suppressARP": "DME_UNSET_PROPERTY_MARKER"
}
]
}
Expand Down
Loading