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

Fix the problem that any type of DNAT rule cannot open all ports #886

Merged
merged 1 commit into from
Feb 1, 2021
Merged

Fix the problem that any type of DNAT rule cannot open all ports #886

merged 1 commit into from
Feb 1, 2021

Conversation

Lance52259
Copy link
Contributor

What this PR does / why we need it:
Nat dnat rule cannot create which request set with zero service port.
This issue because of isEmptyValue function return false when service port is zero(int) and program will abandom setting data.

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

Special notes for your reviewer:

Release note:

1. remove isEmptyValue function check because service port can be set with zero.

PR Checklist

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

Acceptance Steps Performed

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

@ShiChangkuo ShiChangkuo merged commit 655f9d0 into huaweicloud:master Feb 1, 2021
@Lance52259 Lance52259 deleted the DnatProtocolPatch branch February 1, 2021 06:35
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.

Can't create dnat rule for all ports
2 participants