Add per-VNI multisite ingress replication (Cisco NX-OS) - #577
adamtrizuljak-sap wants to merge 2 commits into
Conversation
aa68674 to
729a3f7
Compare
729a3f7 to
7ca72f8
Compare
Merging this branch will not change overall coverage
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. Changed unit test files
|
| // Typically used on Border Gateway (BGW) nodes. | ||
| // +optional | ||
| // +kubebuilder:default=Disabled | ||
| MultisiteIngRepl MultisiteIngReplMode `json:"multisiteIngRepl,omitempty"` |
There was a problem hiding this comment.
The Kubernetes API conventions suggest to "not use abbreviations in the API". ref/ https://github.com/kubernetes/community/blob/main/contributors/devel/sig-architecture/api-conventions.md#:~:text=Do%20not%20use%20abbreviations%20in%20the%20API
So I'rather spell it out like
| MultisiteIngRepl MultisiteIngReplMode `json:"multisiteIngRepl,omitempty"` | |
| MultisiteIngressReplication MultisiteIngReplMode `json:"multisiteIngressReplication,omitempty"` |
There was a problem hiding this comment.
I originally used the name as-is from the YANG mode, but the full spelling is better to understand indeed. I'm leaving it as-is in internal/provider/cisco/nxos/nve.go to match the YANG model.
…ecific configuration MultisiteIngRepl does not have direct support in Openconfig -> we make it provider-specific configuration Signed-off-by: Adam Trizuljak <adam.trizuljak@sap.com>
Signed-off-by: Adam Trizuljak <adam.trizuljak@sap.com>
7ca72f8 to
a79c024
Compare
Adds support for per-VNI multisite ingress replication on Border Gateway (BGW) nodes. Because this is a Cisco NX-OS–specific feature with no OpenConfig equivalent, it is exposed through a new provider-specific configuration resource,
EVPNInstanceConfig, rather than on the vendor-neutral core API.When enabled, BUM traffic for a VNI is replicated to remote VTEP peers in the multisite domain via ingress replication. Three modes are supported:
Disabled(default),Enabled, andEnabledOptimized.This maps to the NX-OS CLI:
and the YANG leaf
multisiteIngReplat:multisiteIngRepl: Enabledrequiresevpn multisite border-gatewayto be enabled, which is not yet supported in network-operator. See the Testing section for details. This PR is a pre-requisite for supportingevpn multisite border-gateway.Changes
API
EVPNInstanceConfigresource underapi/cisco/nx/v1alpha1with theMultisiteIngReplenum field (Disabled/Enabled/EnabledOptimized, defaultDisabled), registered as anEVPNInstancedependency.Provider (Cisco NX-OS)
EnsureEVPNInstancereadsmultisiteIngReplfrom the referencedEVPNInstanceConfigand maps it to the VNI's device enum.nve.gofor the three modes.Generated / scaffolding
kustomization entries.
Samples
EVPNInstanceConfigsample plus Tiltfile wiring; the EVI sample now references it viaproviderConfigRef(commented out by default).Generated artifacts
config/crd/bases), Helm chart CRD copy, and API referencedocs to reflect the new enum field and its
Disableddefault.Notes
Disabled, so existingEVPNInstanceresources are unaffected.Testing
disable,enable,enableOptimized).evpninstance.txtar) updated: a default EVPNInstance now emits"multisiteIngRepl": "disable".make manifests generate helm fmt lint testandmake test-gnmi PROVIDER=cisco-nxos-gnmiall pass.Simulated device
Tested against a simulated Cisco N9K-C9300v in Clabernets. Results of reading the path using
gnmic -a 127.0.0.1 --port 9339 -u *** -p *** --skip-verify get -e json --values-only --path 'System/eps-items/epId-items/Ep-list[epId=1]/nws-items/vni-items/Nw-list[vni=100010]/multisiteIngRepl'spec.multisiteIngRepl"Disabled"["disabled"]Enabled[]- causes controller errorEnabledOptimized["enableOptimized"]Setting
multisiteIngRepl: Enabledproduces the following error. This is expected, becauseevpn multisite border-gatewayis not yet supported in network-operator. This PR is a pre-requisite for supportingevpn multisite border-gateway.YANG
Reference https://github.com/YangModels/yang/blob/main/vendor/cisco/nx/10.6-3/Cisco-NX-OS-device.yang
Allowed values of
multisiteIngRepl: