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 ipv6 vApp network creation #1007

Merged
merged 26 commits into from
Mar 21, 2023
Merged

Fix ipv6 vApp network creation #1007

merged 26 commits into from
Mar 21, 2023

Conversation

adezxc
Copy link

@adezxc adezxc commented Feb 24, 2023

Description

This PR fixes bug of not being able to create ipv6 vApp networks, as there was no prefix_length field, only netmask. With the addition of prefix_length, netmask is also marked as Deprecated as `prefix_length is more universal and can be used by both ipv4 and ipv6.

Removes netmask field's Default (255.255.255.0) due to Terraform's limitations when using ExactlyOneOf or ConflictsWith together with Default. Because of this, users will be required to explicitly specify netmask in their .tf files or Terraform will re-create the resource.

All changes are related to resourceVcdVappNetwork

Changes

  • Add prefix_length to resourceVcdVappNetwork
  • Add ExactlyOneOf to both prefix_length and netmask fields.
  • Remove Default value of netmask
  • Mark netmask as Deprecated as prefix length is supported by both ipv4 and ipv6.

Testing

  • Create TestAccVcdVappNetwork_Isolated_ipv6 to test creation of ipv6 networks.

Adam Jasinski added 4 commits February 22, 2023 16:58
Signed-off-by: Adam Jasinski <[email protected]>
Signed-off-by: Adam Jasinski <[email protected]>
Signed-off-by: Adam Jasinski <[email protected]>
@vmwclabot
Copy link
Member

@adezxc, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding Signed-off-by: John Doe <[email protected]> to the last line of each Git commit message. The e-mail address used to sign must match the e-mail address of the Git author. Click here to view the Developer Certificate of Origin agreement.

1 similar comment
@vmwclabot
Copy link
Member

@adezxc, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding Signed-off-by: John Doe <[email protected]> to the last line of each Git commit message. The e-mail address used to sign must match the e-mail address of the Git author. Click here to view the Developer Certificate of Origin agreement.

Adam Jasinski added 3 commits February 24, 2023 14:48
@adezxc adezxc changed the title Add prefix length support to vApp network resource. Fix Ipv6 vApp network creation Feb 24, 2023
@adezxc adezxc changed the title Fix Ipv6 vApp network creation Fix ipv6 vApp network creation Feb 24, 2023
Signed-off-by: Adam Jasinski <[email protected]>
@adezxc adezxc marked this pull request as ready for review February 27, 2023 07:44
@adezxc adezxc self-assigned this Feb 27, 2023
go.mod Outdated Show resolved Hide resolved
website/docs/r/vapp_network.html.markdown Show resolved Hide resolved
Copy link
Collaborator

@Didainius Didainius left a comment

Choose a reason for hiding this comment

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

First comments

website/docs/r/vapp_network.html.markdown Outdated Show resolved Hide resolved
vcd/resource_vcd_vapp_network_test.go Show resolved Hide resolved
vcd/resource_vcd_vapp_network.go Outdated Show resolved Hide resolved
website/docs/r/vapp_network.html.markdown Show resolved Hide resolved
@adezxc
Copy link
Author

adezxc commented Mar 1, 2023

Putting this in draft as there is a bug related to updating vApp networks with DHCP.

@adezxc adezxc marked this pull request as draft March 1, 2023 16:41
Signed-off-by: Adam Jasinski <[email protected]>
@adezxc adezxc marked this pull request as ready for review March 10, 2023 11:43
@adezxc adezxc marked this pull request as draft March 10, 2023 11:44
@vmwclabot
Copy link
Member

@adezxc, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding Signed-off-by: John Doe <[email protected]> to the last line of each Git commit message. The e-mail address used to sign must match the e-mail address of the Git author. Click here to view the Developer Certificate of Origin agreement.

Signed-off-by: Adam Jasinski <[email protected]>
.changes/v3.9.0/1007-bug-fixes.md Outdated Show resolved Hide resolved
vcd/resource_vcd_vapp_network.go Outdated Show resolved Hide resolved
vcd/resource_vcd_vapp_network.go Outdated Show resolved Hide resolved
vcd/resource_vcd_vapp_network.go Show resolved Hide resolved
vcd/resource_vcd_vapp_network_test.go Outdated Show resolved Hide resolved
vcd/resource_vcd_vapp_network_test.go Show resolved Hide resolved
Adam Jasinski added 2 commits March 15, 2023 16:46
Signed-off-by: Adam Jasinski <[email protected]>
Signed-off-by: Adam Jasinski <[email protected]>
website/docs/r/vapp_network.html.markdown Outdated Show resolved Hide resolved
website/docs/r/vapp_network.html.markdown Outdated Show resolved Hide resolved
website/docs/r/vapp_network.html.markdown Outdated Show resolved Hide resolved
Signed-off-by: Adam Jasinski <[email protected]>
Adam Jasinski added 2 commits March 16, 2023 16:11
Signed-off-by: Adam Jasinski <[email protected]>
Signed-off-by: Adam Jasinski <[email protected]>
.changes/v3.9.0/1007-bug-fixes.md Outdated Show resolved Hide resolved
.changes/v3.9.0/1007-bug-fixes.md Outdated Show resolved Hide resolved
Signed-off-by: Adam Jasinski <[email protected]>
.changes/v3.9.0/1007-bug-fixes.md Outdated Show resolved Hide resolved
.changes/v3.9.0/1007-bug-fixes.md Outdated Show resolved Hide resolved
.changes/v3.9.0/1007-bug-fixes.md Outdated Show resolved Hide resolved
Adam Jasinski added 2 commits March 17, 2023 16:31
Signed-off-by: Adam Jasinski <[email protected]>
Signed-off-by: Adam Jasinski <[email protected]>
Signed-off-by: Adam Jasinski <[email protected]>
Signed-off-by: Adam Jasinski <[email protected]>
@adezxc adezxc merged commit 64c0827 into vmware:main Mar 21, 2023
@adezxc adezxc deleted the vapp_network_ipv6 branch November 14, 2023 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants