Skip to content

Commit 968df8a

Browse files
author
John Howard
committed
Rever isDSR breaking change to HNSAddLoadBalancer
Signed-off-by: John Howard <jhoward@microsoft.com>
1 parent 371bbcb commit 968df8a

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

hnspolicylist.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ func GetPolicyListByID(policyListID string) (*PolicyList, error) {
3737
}
3838

3939
// AddLoadBalancer policy list for the specified endpoints
40-
func AddLoadBalancer(endpoints []HNSEndpoint, isILB bool, isDSR bool, sourceVIP, vip string, protocol uint16, internalPort uint16, externalPort uint16) (*PolicyList, error) {
41-
return hns.AddLoadBalancer(endpoints, isILB, isDSR, sourceVIP, vip, protocol, internalPort, externalPort)
40+
// @madhanrm. TODO: isDSR was a breaking change. Removed. Introduced in #356
41+
func AddLoadBalancer(endpoints []HNSEndpoint, isILB bool, sourceVIP, vip string, protocol uint16, internalPort uint16, externalPort uint16) (*PolicyList, error) {
42+
return hns.AddLoadBalancer(endpoints, isILB, sourceVIP, vip, protocol, internalPort, externalPort)
4243
}
4344

4445
// AddRoute adds route policy list for the specified endpoints

internal/hns/hnspolicylist.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ func (policylist *PolicyList) RemoveEndpoint(endpoint *HNSEndpoint) (*PolicyList
140140
}
141141

142142
// AddLoadBalancer policy list for the specified endpoints
143-
func AddLoadBalancer(endpoints []HNSEndpoint, isILB bool, isDSR bool, sourceVIP, vip string, protocol uint16, internalPort uint16, externalPort uint16) (*PolicyList, error) {
143+
// @madhanrm TODO
144+
//func AddLoadBalancer(endpoints []HNSEndpoint, isILB bool, isDSR bool, sourceVIP, vip string, protocol uint16, internalPort uint16, externalPort uint16) (*PolicyList, error) {
145+
func AddLoadBalancer(endpoints []HNSEndpoint, isILB bool, sourceVIP, vip string, protocol uint16, internalPort uint16, externalPort uint16) (*PolicyList, error) {
144146
operation := "AddLoadBalancer"
145147
title := "hcsshim::PolicyList::" + operation
146148
logrus.Debugf(title+" endpointId=%v, isILB=%v, sourceVIP=%s, vip=%s, protocol=%v, internalPort=%v, externalPort=%v", endpoints, isILB, sourceVIP, vip, protocol, internalPort, externalPort)
@@ -150,7 +152,7 @@ func AddLoadBalancer(endpoints []HNSEndpoint, isILB bool, isDSR bool, sourceVIP,
150152
elbPolicy := &ELBPolicy{
151153
SourceVIP: sourceVIP,
152154
ILB: isILB,
153-
DSR: isDSR,
155+
//DSR: isDSR, // @madhanrm TODO
154156
}
155157

156158
if len(vip) > 0 {

0 commit comments

Comments
 (0)