Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Subnet supports enable IPv6 #989

Merged
merged 2 commits into from
Mar 18, 2021
Merged

[Feature] Subnet supports enable IPv6 #989

merged 2 commits into from
Mar 18, 2021

Conversation

Lance52259
Copy link
Contributor

What this PR does / why we need it:

  1. API supports enable IPv6 of VPC subnet.
  2. New parameter updation in datasource but code of acc test doesn't meet the design specifications.

Which issue this PR fixes:
(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

NONE

Special notes for your reviewer:

Release note:

1. new 'ipv6_enable', 'ipv6_cidr' and 'ipv6_gateway' parameters.
2. refactor datasource test.
3. new 'ipv6_enable', 'ipv6_cidr' and 'ipv6_gateway' parameters description in documents.

PR Checklist

  • Tests added/passed.
  • Documentation updated.
  • Schema updated.

Acceptance Steps Performed

Resource: check IPv6 enable

make testacc TEST='./huaweicloud' TESTARGS='-run=TestAccVpcSubnetV1_ipv6'                                                                                                                                            
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./huaweicloud -v -run=TestAccVpcSubnetV1_ipv6 -timeout 360m -parallel 4
=== RUN   TestAccVpcSubnetV1_ipv6
=== PAUSE TestAccVpcSubnetV1_ipv6
=== CONT  TestAccVpcSubnetV1_ipv6
--- PASS: TestAccVpcSubnetV1_ipv6 (90.44s)
PASS
ok      github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud       90.514s

Data Source: basic check

make testacc TEST='./huaweicloud' TESTARGS='-run=TestAccVpcSubnetV1DataSource_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./huaweicloud -v -run=TestAccVpcSubnetV1DataSource_basic -timeout 360m -parallel 4
=== RUN   TestAccVpcSubnetV1DataSource_basic
=== PAUSE TestAccVpcSubnetV1DataSource_basic
=== CONT  TestAccVpcSubnetV1DataSource_basic
--- PASS: TestAccVpcSubnetV1DataSource_basic (65.90s)
PASS
ok      github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud       65.950s

Data Source: check IPv6 enable

make testacc TEST='./huaweicloud' TESTARGS='-run=TestAccVpcSubnetV1DataSource_ipv6'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./huaweicloud -v -run=TestAccVpcSubnetV1DataSource_ipv6 -timeout 360m -parallel 4
=== RUN   TestAccVpcSubnetV1DataSource_ipv6
=== PAUSE TestAccVpcSubnetV1DataSource_ipv6
=== CONT  TestAccVpcSubnetV1DataSource_ipv6
--- PASS: TestAccVpcSubnetV1DataSource_ipv6 (72.46s)
PASS
ok      github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud       72.513s

docs/resources/vpc_subnet.md Outdated Show resolved Hide resolved
huaweicloud/resource_huaweicloud_vpc_subnet.go Outdated Show resolved Hide resolved
subnetRs, ok := s.RootModule().Resources["huaweicloud_vpc_subnet.test"]
if !ok {
return fmt.Errorf("can't find huaweicloud_vpc_subnet.test in state")
return fmt.Errorf("Can't find vpc subnet connection data source: %s", n)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how to understand connection here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This description is confusing to read. Updation has completed.

go.sum Outdated
@@ -138,6 +138,7 @@ github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w=
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does the file is auto-generated by go get xxx?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

@ShiChangkuo ShiChangkuo merged commit f2818e6 into huaweicloud:master Mar 18, 2021
@Lance52259 Lance52259 deleted the br_IPv6_Enable_active branch April 2, 2021 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants