vpcagent: ovn: use cmp() when claimVpc

This commit is contained in:
Yousong Zhou
2020-04-24 18:32:40 +08:00
parent 08ef2c5cf6
commit 4cb1fbbd8f
+7 -2
View File
@@ -95,8 +95,13 @@ func (keeper *OVNNorthboundKeeper) ClaimVpc(ctx context.Context, vpc *agentmodel
"router-port": vpcRhpName(vpc.Id),
},
}
if m := keeper.DB.LogicalRouter.FindOneMatchNonZeros(vpcLr); m != nil {
m.OvnSetExternalIds(externalKeyOcVersion, ocVersion)
allFound, args := cmp(&keeper.DB, ocVersion,
vpcLr,
vpcHostLs,
vpcRhp,
vpcHrp,
)
if allFound {
return nil
}
args = append(args, ovnCreateArgs(vpcLr, vpcLr.Name)...)