diff --git a/build/yaml/samples/nsx_v1alpha1_vpcnetworkconfigurations.yaml b/build/yaml/samples/nsx_v1alpha1_vpcnetworkconfigurations.yaml index b45221eb0..e6802178e 100644 --- a/build/yaml/samples/nsx_v1alpha1_vpcnetworkconfigurations.yaml +++ b/build/yaml/samples/nsx_v1alpha1_vpcnetworkconfigurations.yaml @@ -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 diff --git a/pkg/controllers/networkinfo/vpcnetworkconfig_handler.go b/pkg/controllers/networkinfo/vpcnetworkconfig_handler.go index b84ac39f9..21bc9c402 100644 --- a/pkg/controllers/networkinfo/vpcnetworkconfig_handler.go +++ b/pkg/controllers/networkinfo/vpcnetworkconfig_handler.go @@ -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 } diff --git a/pkg/nsx/services/vpc/compare.go b/pkg/nsx/services/vpc/compare.go index 3a5354c6c..45686a7bd 100644 --- a/pkg/nsx/services/vpc/compare.go +++ b/pkg/nsx/services/vpc/compare.go @@ -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 }