Skip to content

Commit bee72ee

Browse files
authored
Default to accelnet behavior in CNI for SwiftV2 windows (#3020)
* modify accelnet path in cni * remove all occurences of accelnetnic type since not sent by cns middleware * remove all accelnet specific UTs * remove additional UTs referring to accelnet in invoker_cns & network_test * fix: additional UTs in endpoint_windows invoker_mock - removed accelnet flags
1 parent 3a6959c commit bee72ee

17 files changed

+46
-1103
lines changed

cni/network/invoker_cns.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ func (invoker *CNSIPAMInvoker) Add(addConfig IPAMAddConfig) (IPAMAddResult, erro
169169
// Do we want to leverage this lint skip in other places of our code?
170170
key := invoker.getInterfaceInfoKey(info.nicType, info.macAddress)
171171
switch info.nicType {
172-
case cns.NodeNetworkInterfaceFrontendNIC, cns.NodeNetworkInterfaceAccelnetFrontendNIC:
172+
case cns.NodeNetworkInterfaceFrontendNIC:
173173
// only handling single v4 PodIPInfo for NodeNetworkInterfaceFrontendNIC and AccelnetNIC at the moment, will have to update once v6 gets added
174174
if !info.skipDefaultRoutes {
175175
numInterfacesWithDefaultRoutes++
@@ -527,7 +527,7 @@ func addBackendNICToResult(info *IPResultInfo, addResult *IPAMAddResult, key str
527527
}
528528

529529
func (invoker *CNSIPAMInvoker) getInterfaceInfoKey(nicType cns.NICType, macAddress string) string {
530-
if nicType == cns.NodeNetworkInterfaceFrontendNIC || nicType == cns.BackendNIC || nicType == cns.NodeNetworkInterfaceAccelnetFrontendNIC {
530+
if nicType == cns.NodeNetworkInterfaceFrontendNIC || nicType == cns.BackendNIC {
531531
return macAddress
532532
}
533533
return string(nicType)

0 commit comments

Comments
 (0)