From 6caba1153730b778dfe8df7006fc3d0a36b5d84b Mon Sep 17 00:00:00 2001 From: accanaryops-serviceuser Date: Fri, 19 Apr 2024 09:32:56 +0800 Subject: [PATCH] change typos --- .../infraflow/aliclient/actor.go | 4 ++-- .../infraflow/aliclient/types.go | 18 +++++++++--------- .../infrastructure/infraflow/reconcile.go | 14 +++++++------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/pkg/controller/infrastructure/infraflow/aliclient/actor.go b/pkg/controller/infrastructure/infraflow/aliclient/actor.go index 219e051da..372071532 100644 --- a/pkg/controller/infrastructure/infraflow/aliclient/actor.go +++ b/pkg/controller/infrastructure/infraflow/aliclient/actor.go @@ -917,7 +917,7 @@ func (c *actor) CreateVSwitch(ctx context.Context, vsw *VSwitch) (*VSwitch, erro req.CidrBlock = vsw.CidrBlock req.ZoneId = vsw.ZoneId if vsw.EnableIpv6 { - req.Ipv6CidrBlock = requests.NewInteger(*vsw.Ipv6CidrkSubnet) + req.Ipv6CidrBlock = requests.NewInteger(*vsw.Ipv6CidrSubnet) } resp, err := callApi(c.vpcClient.CreateVSwitch, req) @@ -1370,7 +1370,7 @@ func (c *actor) fromVSwitch(item vpc.VSwitch) (*VSwitch, error) { if isValidIPv6CIDR(item.Ipv6CidrBlock) { _, vswIpv6Subnet, err := parseAlicloudVswIpv6(item.Ipv6CidrBlock) if err == nil { - vswitch.Ipv6CidrkSubnet = &vswIpv6Subnet + vswitch.Ipv6CidrSubnet = &vswIpv6Subnet } } diff --git a/pkg/controller/infrastructure/infraflow/aliclient/types.go b/pkg/controller/infrastructure/infraflow/aliclient/types.go index 5de25a5d6..1122db8b0 100644 --- a/pkg/controller/infrastructure/infraflow/aliclient/types.go +++ b/pkg/controller/infrastructure/infraflow/aliclient/types.go @@ -42,15 +42,15 @@ type VPC struct { // VSwitch is the struct for a vswitch object type VSwitch struct { Tags - Name string - VSwitchId string - VpcId *string - CidrBlock string - ZoneId string - EnableIpv6 bool - Ipv6CidrkSubnet *int - Ipv6CidrBlock string - Status *string + Name string + VSwitchId string + VpcId *string + CidrBlock string + ZoneId string + EnableIpv6 bool + Ipv6CidrSubnet *int + Ipv6CidrBlock string + Status *string } // NatGateway is the struct for a nat gateway object diff --git a/pkg/controller/infrastructure/infraflow/reconcile.go b/pkg/controller/infrastructure/infraflow/reconcile.go index 961a507b9..96ea1c019 100644 --- a/pkg/controller/infrastructure/infraflow/reconcile.go +++ b/pkg/controller/infrastructure/infraflow/reconcile.go @@ -151,13 +151,13 @@ func (c *FlowContext) ensureIpv6VSwitches(ctx context.Context, cidrBlock, zoneId log.Info("ensureIpv6VSwitches:" + vswitchIdentifier) suffix := vswitchIdentifier desired := &aliclient.VSwitch{ - Name: c.namespace + "-" + suffix, - CidrBlock: cidrBlock, - VpcId: c.state.Get(IdentifierVPC), - Tags: c.commonTagsWithSuffix(suffix), - ZoneId: zoneId, - EnableIpv6: true, - Ipv6CidrkSubnet: &ipv6CidrSubnet, + Name: c.namespace + "-" + suffix, + CidrBlock: cidrBlock, + VpcId: c.state.Get(IdentifierVPC), + Tags: c.commonTagsWithSuffix(suffix), + ZoneId: zoneId, + EnableIpv6: true, + Ipv6CidrSubnet: &ipv6CidrSubnet, } current, err := findExisting(ctx, c.state.Get(vswitchIdentifier), c.commonTagsWithSuffix(suffix),