Skip to content

Commit

Permalink
change typos
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-lacoo committed Apr 19, 2024
1 parent 001f259 commit 6caba11
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions pkg/controller/infrastructure/infraflow/aliclient/actor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
}
}

Expand Down
18 changes: 9 additions & 9 deletions pkg/controller/infrastructure/infraflow/aliclient/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions pkg/controller/infrastructure/infraflow/reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 6caba11

Please sign in to comment.