Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Wenqi Qiu <[email protected]>
  • Loading branch information
wenqiq committed Aug 9, 2024
1 parent 77cacc1 commit 627f075
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions build/yaml/samples/nsx_v1alpha1_vpcnetworkconfigurations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@ kind: VPCNetworkConfiguration
metadata:
name: vpc-network-config1
spec:
defaultGatewayPath: /infra/tier-0s/t0
edgeClusterPath: /infra/sites/default/enforcement-points/default/edge-clusters/2d9df59f-6dc6-4911-8865-21fadc23d4da
defaultSubnetSize: 32
nsxProject: proj-1
externalIPv4Blocks:
- block1
privateIPs:
- 172.26.0.0/16
- 172.36.0.0/16
Expand Down
2 changes: 1 addition & 1 deletion pkg/controllers/networkinfo/vpcnetworkconfig_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ var VPCNetworkConfigurationPredicate = predicate.Funcs{
func buildNetworkConfigInfo(vpcConfigCR v1alpha1.VPCNetworkConfiguration) (*commontypes.VPCNetworkConfigInfo, error) {
org, project, err := nsxtProjectPathToId(vpcConfigCR.Spec.NSXProject)
if err != nil {
log.Error(err, "failed to parse nsx-t project in network config", "Project Path", vpcConfigCR.Spec.NSXProject)
log.Error(err, "failed to parse NSX project in network config", "Project Path", vpcConfigCR.Spec.NSXProject)
return nil, err
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/nsx/services/vpc/compare.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
// currently we only support appending public/private cidrs
// so only comparing list size is enough to identify if vcp changed
func IsVPCChanged(nc common.VPCNetworkConfigInfo, vpc *model.Vpc) bool {
if len(nc.PrivateIPs) != len(vpc.PrivateIpv4Blocks) {
if len(nc.PrivateIPs) != len(vpc.PrivateIps) {
return true
}

Expand Down

0 comments on commit 627f075

Please sign in to comment.