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

Implement DHCP Forwarding Resource and Data source #1056

Merged
merged 34 commits into from
Jun 1, 2023

Conversation

adezxc
Copy link

@adezxc adezxc commented May 3, 2023

Summary

  • Resource and data source vcd_nsxt_edgegateway_dhcp_forwarding - NSX-T Edge Gateway DHCP forwarding configuration
  • Created lockParentVdcGroupOrEdgeGateway to reduce duplication

Description

Implement vcd_nsxt_edgegateway_dhcp_forwarding resource/datasource for NSX-T backed edgegateways, also with the PR, enables full management of DHCP in relay mode for router networks.

image-2022-08-03-16-10-45-988

Adam Jasinski added 14 commits May 3, 2023 12:27
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]>
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]>
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 marked this pull request as ready for review May 8, 2023 17:39
Copy link
Contributor

@dataclouder dataclouder left a comment

Choose a reason for hiding this comment

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

First pass

vcd/resource_vcd_nsxt_edgegateway_dhcp_forwarding_test.go Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_edgegateway_dhcp_forwarding_test.go Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_network_dhcp_test.go Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_network_dhcp_test.go Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_network_dhcp_test.go Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_edgegateway_dhcp_forwarding_test.go Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_edgegateway_dhcp_forwarding_test.go Outdated Show resolved Hide resolved
Adam Jasinski added 7 commits May 9, 2023 13:52
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]>
Signed-off-by: Adam Jasinski <[email protected]>
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 quick scan with an ask to improve dhcp resource docs.

Could you improve the DHCP doc sample for relay mode (this one https://registry.terraform.io/providers/vmware/vcd/latest/docs/resources/nsxt_network_dhcp#example-usage-3-routed-org-vdc-network-with-relay-mode) to include the vcd_nsxt_edgegateway_dhcp_forwarding in the snippet

I couldn't at the time of making that doc because vcd_nsxt_edgegateway_dhcp_forwarding was missing piece

test.diff Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_ipsec_vpn_tunnel.go Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_edgegateway_dhcp_forwarding_test.go Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_edgegateway_dhcp_forwarding_test.go Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_edgegateway_dhcp_forwarding_test.go Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_edgegateway_dhcp_forwarding_test.go Outdated Show resolved Hide resolved
vcd/resource_vcd_nsxt_network_dhcp_test.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@adambarreiro adambarreiro left a comment

Choose a reason for hiding this comment

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

Just a few nits/doubts/comments.

Signed-off-by: Adam Jasinski <[email protected]>
Signed-off-by: Adam Jasinski <[email protected]>
Copy link
Collaborator

@lvirbalas lvirbalas left a comment

Choose a reason for hiding this comment

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

Request to elaborate the enabled field corner case.

Also, please add more details to the PR description (front page). For example, you could add some screenshots from the UI to make it clearer to everyone who reads it the first time.

Thanks!

Adam Jasinski added 2 commits May 12, 2023 16:40
Signed-off-by: Adam Jasinski <[email protected]>
Signed-off-by: Adam Jasinski <[email protected]>
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.

I have a few inline comments and one ask - could you improve the sample snippet in DHCP resource https://registry.terraform.io/providers/vmware/vcd/latest/docs/resources/nsxt_network_dhcp#example-usage-3-routed-org-vdc-network-with-relay-mode

We didn't have forwarding resource back when this snippet was introduced

vcd/config.go Show resolved Hide resolved
vcd/config.go Show resolved Hide resolved
vcd/resource_vcd_nsxt_edgegateway_dhcp_forwarding.go Outdated Show resolved Hide resolved
Adam Jasinski added 5 commits May 15, 2023 13:25
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]>
Copy link
Collaborator

@adambarreiro adambarreiro left a comment

Choose a reason for hiding this comment

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

LGTM!

Adam Jasinski added 3 commits May 16, 2023 11:31
Signed-off-by: Adam Jasinski <[email protected]>
Signed-off-by: Adam Jasinski <[email protected]>
@adezxc adezxc merged commit e1d9aa6 into vmware:main Jun 1, 2023
@adezxc adezxc deleted the dhcp_forwarding branch November 14, 2023 14:18
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.

6 participants